@SuppressWarnings({ "rawtypes", "unchecked" }) public abstract class MappingFactory<R extends Entity, T extends Property> extends 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 String |
IDENTITY_PROPERTY |
|
static Set<String> |
SIMPLE_TYPES |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected boolean |
allowArbitraryCustomTypes() |
|
public static String |
associationtoString(String desc, Association a) |
|
public Basic |
createBasicCollection(PersistentEntity entity, MappingContext context, PropertyDescriptor property, Class collectionType)Creates a Basic collection type |
|
public Basic |
createBasicCollection(PersistentEntity entity, MappingContext context, PropertyDescriptor property) |
|
public Custom<T> |
createCustom(PersistentEntity owner, MappingContext context, 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, PropertyDescriptor property)Creates an Embedded type used to model an embedded association (composition) |
|
public EmbeddedCollection |
createEmbeddedCollection(PersistentEntity entity, MappingContext context, PropertyDescriptor property)Creates an EmbeddedCollection type used to model an embedded collection association (composition). |
|
public Identity<T> |
createIdentity(PersistentEntity owner, MappingContext context, PropertyDescriptor pd)Creates an identifier property |
|
public IdentityMapping |
createIdentityMapping(ClassMapping classMapping) |
|
public ManyToMany |
createManyToMany(PersistentEntity entity, MappingContext context, PropertyDescriptor property)Creates a ManyToMany type used to model a many-to-many association between entities |
|
public ToOne |
createManyToOne(PersistentEntity entity, MappingContext context, 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, PropertyDescriptor property)Creates a OneToMany type used to model a one-to-many association between entities |
|
public ToOne |
createOneToOne(PersistentEntity entity, MappingContext context, PropertyDescriptor property)Creates a one-to-one association type used for mapping a one-to-one association between entities |
|
public PropertyDescriptor |
createPropertyDescriptor(Class declaringClass, 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, 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, PropertyDescriptor pd)Creates the tenant identifier property |
|
protected CustomTypeMarshaller |
findCustomType(MappingContext context, Class<?> propertyType) |
|
public ClassMapping |
getClassMapping() |
|
public ClassMapping |
getClassMapping() |
|
public ClassMapping |
getClassMapping() |
|
public ClassMapping |
getClassMapping() |
|
public ValueGenerator |
getGenerator() |
|
public ValueGenerator |
getGenerator() |
|
public String[] |
getIdentifierName() |
|
public 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(Class<?> propertyType) |
|
public boolean |
isSimpleType(Class propType) |
|
public static boolean |
isSimpleType(String typeName) |
|
public abstract boolean |
isTenantId(PersistentEntity entity, MappingContext context, PropertyDescriptor descriptor)Return whether the given property descriptor is the tenant id |
|
public void |
registerCustomType(CustomTypeMarshaller marshallerCustom) |
|
public String |
toString() |
|
public String |
toString() |
|
public String |
toString() |
|
public String |
toString() |
|
public String |
toString() |
|
public String |
toString() |
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