Package org.hibernate.metamodel.internal
Class AttributeFactory
- java.lang.Object
-
- org.hibernate.metamodel.internal.AttributeFactory
-
-
Constructor Summary
Constructors Constructor Description AttributeFactory(MetadataContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <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
determineSingularAssociationClassification(Member member)
static ParameterizedType
getSignatureType(Member member)
static boolean
isManyToMany(Member member)
-
-
-
Constructor Detail
-
AttributeFactory
public AttributeFactory(MetadataContext context)
-
-
Method Detail
-
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
public static AttributeClassification determineSingularAssociationClassification(Member member)
-
getSignatureType
public static ParameterizedType getSignatureType(Member member)
-
isManyToMany
public static boolean isManyToMany(Member member)
-
-