org.hibernate.tuple
Class PropertyFactory
java.lang.Object
org.hibernate.tuple.PropertyFactory
public class PropertyFactory
extends java.lang.Object
Responsible for generation of runtime metamodel
Property
representations.
Makes distinction between identifier, version, and other (standard) properties.
buildIdentifierProperty
public static IdentifierProperty buildIdentifierProperty(PersistentClass mappedEntity,
IdentifierGenerator generator)
Generates an IdentifierProperty representation of the for a given entity mapping.
mappedEntity
- The mapping definition of the entity.generator
- The identifier value generator to use for this identifier.
- The appropriate IdentifierProperty definition.
buildStandardProperty
public static StandardProperty buildStandardProperty(Property property,
boolean lazyAvailable)
Generate a "standard" (i.e., non-identifier and non-version) based on the given
mapped property.
property
- The mapped property.lazyAvailable
- Is property lazy loading currently available.
- The appropriate StandardProperty definition.
buildVersionProperty
public static VersionProperty buildVersionProperty(Property property,
boolean lazyAvailable)
Generates a VersionProperty representation for an entity mapping given its
version mapping Property.
property
- The version mapping Property.lazyAvailable
- Is property lazy loading currently available.
- The appropriate VersionProperty definition.