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 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 |
---|---|
Basic |
createBasicCollection(PersistentEntity entity, MappingContext context, java.beans.PropertyDescriptor property) Creates a Basic collection type |
Custom<T> |
createCustom(PersistentEntity owner, MappingContext context, java.beans.PropertyDescriptor pd) Creates a custom prpoerty type |
IdentityMapping |
createDefaultIdentityMapping(ClassMapping classMapping) |
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 |
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. |
static boolean |
isCustomType(java.lang.Class<?> propertyType) |
boolean |
isSimpleType(java.lang.Class propType) |
static boolean |
isSimpleType(java.lang.String typeName) |
static 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 simple property type used for mapping basic types such as String, long, integer etc.
owner
- The ownercontext
- The MappingContextpd
- The PropertyDescriptor