@java.lang.SuppressWarnings({"rawtypes", "unchecked"})
public abstract class MappingFactory<R extends Entity, T extends Property>
extends java.lang.Object
An abstract factory for creating persistent property instances.
Subclasses should implement the createMappedForm method in order to provide a mechanisms for representing the property in a form appropriate for mapping to the underlying datastore. Example:
class RelationalPropertyFactory<Column> extends PropertyFactory {
public Column createMappedForm(PersistentProperty mpp) {
return new Column(mpp)
}
}
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
IDENTITY_PROPERTY |
|
static java.util.Set<java.lang.String> |
SIMPLE_TYPES |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected boolean |
allowArbitraryCustomTypes() |
|
public static java.lang.String |
associationtoString(java.lang.String desc, Association a) |
|
public Basic |
createBasicCollection(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property, java.lang.Class collectionType)Creates a Basic collection type |
|
public Basic |
createBasicCollection(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property) |
|
public Custom<T> |
createCustom(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor pd)Creates a custom prpoerty type |
|
public IdentityMapping |
createDefaultIdentityMapping(ClassMapping classMapping) |
|
protected IdentityMapping |
createDefaultIdentityMapping(ClassMapping classMapping, T property) |
|
public Embedded |
createEmbedded(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates an Embedded type used to model an embedded association (composition) |
|
public EmbeddedCollection |
createEmbeddedCollection(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates an EmbeddedCollection type used to model an embedded collection association (composition). |
|
public Identity<T> |
createIdentity(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor pd)Creates an identifier property |
|
public IdentityMapping |
createIdentityMapping(ClassMapping classMapping) |
|
public ManyToMany |
createManyToMany(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates a ManyToMany type used to model a many-to-many association between entities |
|
public ToOne |
createManyToOne(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates a many-to-one association type used for a mapping a many-to-one association between entities |
|
public abstract R |
createMappedForm(PersistentEntity entity)Creates the mapped form of a persistent entity |
|
public abstract T |
createMappedForm(PersistentProperty mpp)Creates the mapped form of a PersistentProperty instance |
|
public OneToMany |
createOneToMany(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates a OneToMany type used to model a one-to-many association between entities |
|
public ToOne |
createOneToOne(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates a one-to-one association type used for mapping a one-to-one association between entities |
|
public java.beans.PropertyDescriptor |
createPropertyDescriptor(java.lang.Class declaringClass, groovy.lang.MetaProperty property)Creates a PropertyDescriptor from a MetaBeanProperty |
|
protected PropertyMapping<T> |
createPropertyMapping(PersistentProperty<T> property, PersistentEntity owner) |
|
public Simple<T> |
createSimple(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor pd)Creates a simple property type used for mapping basic types such as String, long, integer etc. |
|
public TenantId<T> |
createTenantId(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor pd)Creates the tenant identifier property |
|
protected CustomTypeMarshaller |
findCustomType(MappingContext context, java.lang.Class<?> propertyType) |
|
public ClassMapping |
getClassMapping() |
|
public ClassMapping |
getClassMapping() |
|
public ClassMapping |
getClassMapping() |
|
public ClassMapping |
getClassMapping() |
|
public ValueGenerator |
getGenerator() |
|
public ValueGenerator |
getGenerator() |
|
public java.lang.String[] |
getIdentifierName() |
|
public java.lang.String[] |
getIdentifierName() |
|
public T |
getMappedForm() |
|
public T |
getMappedForm() |
|
public Property |
getMappedForm() |
|
public Property |
getMappedForm() |
|
public PropertyMapping<T> |
getMapping() |
|
public PropertyMapping<T> |
getMapping() |
|
public PropertyMapping<T> |
getMapping() |
|
public PropertyMapping<T> |
getMapping() |
|
public PropertyMapping |
getMapping() |
|
public PropertyMapping |
getMapping() |
|
public PropertyMapping |
getMapping() |
|
public PropertyMapping |
getMapping() |
|
public PropertyMapping |
getMapping() |
|
public PropertyMapping |
getMapping() |
|
public PropertyMapping |
getMapping() |
|
public boolean |
isCustomType(java.lang.Class<?> propertyType) |
|
public boolean |
isSimpleType(java.lang.Class propType) |
|
public static boolean |
isSimpleType(java.lang.String typeName) |
|
public abstract boolean |
isTenantId(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor descriptor)Return whether the given property descriptor is the tenant id |
|
public void |
registerCustomType(CustomTypeMarshaller marshallerCustom) |
|
public java.lang.String |
toString() |
|
public java.lang.String |
toString() |
|
public java.lang.String |
toString() |
|
public java.lang.String |
toString() |
|
public java.lang.String |
toString() |
|
public java.lang.String |
toString() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates a Basic collection type
entity - The entitycontext - The contextproperty - The propertyCreates a custom prpoerty type
owner - The ownercontext - The contextpd - The PropertyDescriptorCreates an Embedded type used to model an embedded association (composition)
entity - The entitycontext - The contextproperty - The propertyCreates an EmbeddedCollection type used to model an embedded collection association (composition).
entity - The entitycontext - The contextproperty - The propertyCreates an identifier property
owner - The ownercontext - The contextpd - The PropertyDescriptorCreates a ManyToMany type used to model a many-to-many association between entities
entity - The entitycontext - The contextproperty - The propertyCreates a many-to-one association type used for a mapping a many-to-one association between entities
entity - The entitycontext - The contextproperty - The propertyCreates the mapped form of a persistent entity
entity - The entityCreates the mapped form of a PersistentProperty instance
mpp - The PersistentProperty instanceCreates a OneToMany type used to model a one-to-many association between entities
entity - The entitycontext - The contextproperty - The propertyCreates a one-to-one association type used for mapping a one-to-one association between entities
entity - The entitycontext - The contextproperty - The propertyCreates a PropertyDescriptor from a MetaBeanProperty
property - The bean propertyCreates a simple property type used for mapping basic types such as String, long, integer etc.
owner - The ownercontext - The MappingContextpd - The PropertyDescriptorCreates the tenant identifier property
owner - The ownercontext - The contextpd - The PropertyDescriptorReturn whether the given property descriptor is the tenant id
entity - The entitycontext - The contextdescriptor - The descriptor