Package org.hibernate.metamodel.internal
Class AttributeFactory
java.lang.Object
org.hibernate.metamodel.internal.AttributeFactory
A factory for building
Attribute
instances. Exposes 3 main services for building-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<X,
Y> PersistentAttribute<X, Y> buildAttribute
(ManagedDomainType<X> ownerType, Property property) Build a normal attribute.static <X,
Y> PersistentAttribute<X, Y> buildAttribute
(ManagedDomainType<X> ownerType, Property property, MetadataContext metadataContext) <X,
Y> SingularPersistentAttribute<X, Y> buildIdAttribute
(IdentifiableDomainType<X> ownerType, Property property) Build the identifier attribute descriptor<X,
Y> SingularAttributeImpl<X, Y> buildVersionAttribute
(IdentifiableDomainType<X> ownerType, Property property) Build the version attribute descriptorstatic <Y> DomainType<Y>
determineSimpleType
(ValueContext typeContext, MetadataContext context) static AttributeClassification
static ParameterizedType
getSignatureType
(Member member) static boolean
isManyToMany
(Member member)
-
Constructor Details
-
AttributeFactory
-
-
Method Details
-
buildAttribute
public <X,Y> PersistentAttribute<X,Y> buildAttribute(ManagedDomainType<X> ownerType, Property property) Build a normal attribute.- Type Parameters:
X
- The type of the ownerY
- The attribute type- Parameters:
ownerType
- The descriptor of the attribute owner (aka declarer).property
- The Hibernate property descriptor for the attribute- Returns:
- The built attribute descriptor or null if the attribute is not part of the JPA 2 model (eg backrefs)
-
buildAttribute
public static <X,Y> PersistentAttribute<X,Y> buildAttribute(ManagedDomainType<X> ownerType, Property property, MetadataContext metadataContext) -
buildIdAttribute
public <X,Y> SingularPersistentAttribute<X,Y> buildIdAttribute(IdentifiableDomainType<X> ownerType, Property property) Build the identifier attribute descriptor- Type Parameters:
X
- The type of the ownerY
- The attribute type- Parameters:
ownerType
- The descriptor of the attribute owner (aka declarer).property
- The Hibernate property descriptor for the identifier attribute- Returns:
- The built attribute descriptor
-
buildVersionAttribute
public <X,Y> SingularAttributeImpl<X,Y> buildVersionAttribute(IdentifiableDomainType<X> ownerType, Property property) Build the version attribute descriptor- Type Parameters:
X
- The type of the ownerY
- The attribute type- Parameters:
ownerType
- The descriptor of the attribute owner (aka declarer).property
- The Hibernate property descriptor for the version attribute- Returns:
- The built attribute descriptor
-
determineSimpleType
public static <Y> DomainType<Y> determineSimpleType(ValueContext typeContext, MetadataContext context) -
determineSingularAssociationClassification
-
getSignatureType
-
isManyToMany
-