Package org.hibernate.tuple
Class PropertyFactory
- java.lang.Object
-
- org.hibernate.tuple.PropertyFactory
-
public final class PropertyFactory extends java.lang.Object
Responsible for generation of runtime metamodelProperty
representations. Makes distinction between identifier, version, and other (standard) properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PropertyFactory.NonIdentifierAttributeNature
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static NonIdentifierAttribute
buildEntityBasedAttribute(EntityPersister persister, SessionFactoryImplementor sessionFactory, int attributeNumber, Property property, boolean lazyAvailable, PersisterCreationContext creationContext)
Generate a non-identifier (and non-version) attribute based on the given mapped property from the given entitystatic IdentifierProperty
buildIdentifierAttribute(PersistentClass mappedEntity, IdentifierGenerator generator)
Generates the attribute representation of the identifier for a given entity mapping.static StandardProperty
buildStandardProperty(Property property, boolean lazyAvailable)
static VersionProperty
buildVersionProperty(EntityPersister persister, SessionFactoryImplementor sessionFactory, int attributeNumber, Property property, boolean lazyAvailable)
Generates a VersionProperty representation for an entity mapping given its version mapping Property.
-
-
-
Method Detail
-
buildIdentifierAttribute
public static IdentifierProperty buildIdentifierAttribute(PersistentClass mappedEntity, IdentifierGenerator generator)
Generates the attribute representation of the identifier for a given entity mapping.- Parameters:
mappedEntity
- The mapping definition of the entity.generator
- The identifier value generator to use for this identifier.- Returns:
- The appropriate IdentifierProperty definition.
-
buildVersionProperty
public static VersionProperty buildVersionProperty(EntityPersister persister, SessionFactoryImplementor sessionFactory, int attributeNumber, Property property, boolean lazyAvailable)
Generates a VersionProperty representation for an entity mapping given its version mapping Property.- Parameters:
property
- The version mapping Property.lazyAvailable
- Is property lazy loading currently available.- Returns:
- The appropriate VersionProperty definition.
-
buildEntityBasedAttribute
public static NonIdentifierAttribute buildEntityBasedAttribute(EntityPersister persister, SessionFactoryImplementor sessionFactory, int attributeNumber, Property property, boolean lazyAvailable, PersisterCreationContext creationContext)
Generate a non-identifier (and non-version) attribute based on the given mapped property from the given entity- Parameters:
property
- The mapped property.lazyAvailable
- Is property lazy loading currently available.- Returns:
- The appropriate NonIdentifierProperty definition.
-
buildStandardProperty
@Deprecated public static StandardProperty buildStandardProperty(Property property, boolean lazyAvailable)
-
-