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 | Name and description |
|---|---|
protected boolean |
allowArbitraryCustomTypes() |
static java.lang.String |
associationtoString(java.lang.String desc, Association a) |
Basic |
createBasicCollection(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property, java.lang.Class collectionType)Creates a Basic collection type |
Basic |
createBasicCollection(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property) |
Custom<T> |
createCustom(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor pd)Creates a custom prpoerty type |
IdentityMapping |
createDefaultIdentityMapping(ClassMapping classMapping) |
protected IdentityMapping |
createDefaultIdentityMapping(ClassMapping classMapping, T property) |
Embedded |
createEmbedded(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates an Embedded type used to model an embedded association (composition) |
EmbeddedCollection |
createEmbeddedCollection(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates an EmbeddedCollection type used to model an embedded collection association (composition). |
Identity<T> |
createIdentity(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor pd)Creates an identifier property |
IdentityMapping |
createIdentityMapping(ClassMapping classMapping) |
ManyToMany |
createManyToMany(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates a ManyToMany type used to model a many-to-many association between entities |
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 |
R |
createMappedForm(PersistentEntity entity)Creates the mapped form of a persistent entity |
T |
createMappedForm(PersistentProperty mpp)Creates the mapped form of a PersistentProperty instance |
OneToMany |
createOneToMany(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property)Creates a OneToMany type used to model a one-to-many association between entities |
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 |
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) |
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. |
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) |
boolean |
isCustomType(java.lang.Class<?> propertyType) |
boolean |
isSimpleType(java.lang.Class propType) |
static boolean |
isSimpleType(java.lang.String typeName) |
boolean |
isTenantId(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor descriptor)Return whether the given property descriptor is the tenant id |
void |
registerCustomType(CustomTypeMarshaller marshallerCustom) |
| 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