类 AttributeFactory
- java.lang.Object
-
- org.hibernate.metamodel.internal.AttributeFactory
-
public class AttributeFactory extends Object
A factory for buildingAttributeinstances. Exposes 3 main services for building- 作者:
- Steve Ebersole, Emmanuel Bernard
-
-
构造器概要
构造器 构造器 说明 AttributeFactory(org.hibernate.metamodel.internal.MetadataContext context)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 protected <Y> Class<Y>accountForPrimitiveTypes(Class<Y> declaredType)<X,Y>
PersistentAttributeDescriptor<X,Y>buildAttribute(ManagedTypeDescriptor<X> ownerType, Property property)Build a normal attribute.<X,Y>
SingularPersistentAttribute<X,Y>buildIdAttribute(IdentifiableTypeDescriptor<X> ownerType, Property property)Build the identifier attribute descriptor<X,Y>
SingularAttributeImpl<X,Y>buildVersionAttribute(IdentifiableTypeDescriptor<X> ownerType, Property property)Build the version attribute descriptorstatic javax.persistence.metamodel.PluralAttribute.CollectionTypedetermineCollectionType(Class javaType)static javax.persistence.metamodel.Attribute.PersistentAttributeTypedetermineSingularAssociationAttributeType(Member member)static ParameterizedTypegetSignatureType(Member member)static booleanisManyToMany(Member member)
-
-
-
方法详细资料
-
buildAttribute
public <X,Y> PersistentAttributeDescriptor<X,Y> buildAttribute(ManagedTypeDescriptor<X> ownerType, Property property)
Build a normal attribute.- 类型参数:
X- The type of the ownerY- The attribute type- 参数:
ownerType- The descriptor of the attribute owner (aka declarer).property- The Hibernate property descriptor for the attribute- 返回:
- The built attribute descriptor or null if the attribute is not part of the JPA 2 model (eg backrefs)
-
buildIdAttribute
public <X,Y> SingularPersistentAttribute<X,Y> buildIdAttribute(IdentifiableTypeDescriptor<X> ownerType, Property property)
Build the identifier attribute descriptor- 类型参数:
X- The type of the ownerY- The attribute type- 参数:
ownerType- The descriptor of the attribute owner (aka declarer).property- The Hibernate property descriptor for the identifier attribute- 返回:
- The built attribute descriptor
-
buildVersionAttribute
public <X,Y> SingularAttributeImpl<X,Y> buildVersionAttribute(IdentifiableTypeDescriptor<X> ownerType, Property property)
Build the version attribute descriptor- 类型参数:
X- The type of the ownerY- The attribute type- 参数:
ownerType- The descriptor of the attribute owner (aka declarer).property- The Hibernate property descriptor for the version attribute- 返回:
- The built attribute descriptor
-
determineSingularAssociationAttributeType
public static javax.persistence.metamodel.Attribute.PersistentAttributeType determineSingularAssociationAttributeType(Member member)
-
getSignatureType
public static ParameterizedType getSignatureType(Member member)
-
determineCollectionType
public static javax.persistence.metamodel.PluralAttribute.CollectionType determineCollectionType(Class javaType)
-
isManyToMany
public static boolean isManyToMany(Member member)
-
-