类 ComponentPropertyHolder
- java.lang.Object
-
- org.hibernate.cfg.AbstractPropertyHolder
-
- org.hibernate.cfg.ComponentPropertyHolder
-
- 所有已实现的接口:
PropertyHolder
public class ComponentPropertyHolder extends AbstractPropertyHolder
PropertyHolder for composites (Embeddable/Embedded). To facilitate code comments, I'll often refer to this example:@Embeddable @Convert( attributeName="city", ... ) class Address { ... @Convert(...) public String city; } @Entity @Convert( attributeName="homeAddress.city", ... ) class Person { ... @Embedded @Convert( attributeName="city", ... ) public Address homeAddress; }As you can see, lots of ways to specify the conversion for embeddable attributes :(- 作者:
- Steve Ebersole, Emmanuel Bernard
-
-
字段概要
-
从类继承的字段 org.hibernate.cfg.AbstractPropertyHolder
parent
-
-
构造器概要
构造器 构造器 说明 ComponentPropertyHolder(Component component, String path, PropertyData inferredData, PropertyHolder parent, MetadataBuildingContext context)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 JoinaddJoin(javax.persistence.JoinTable joinTableAnn, boolean noDelayInPkColumnCreation)voidaddProperty(Property prop, org.hibernate.annotations.common.reflection.XClass declaringClass)voidaddProperty(Property prop, Ejb3Column[] columns, org.hibernate.annotations.common.reflection.XClass declaringClass)StringgetClassName()StringgetEntityName()StringgetEntityOwnerClassName()KeyValuegetIdentifier()javax.persistence.Column[]getOverriddenColumn(String propertyName)Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.javax.persistence.JoinColumn[]getOverriddenJoinColumn(String propertyName)Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.PersistentClassgetPersistentClass()TablegetTable()booleanisComponent()booleanisEntity()booleanisOrWithinEmbeddedId()Return true if this component is or is embedded in a @EmbeddedIdbooleanisWithinElementCollection()Return true if this component is within an @ElementCollection.protected AttributeConversionInfolocateAttributeConversionInfo(String path)protected AttributeConversionInfolocateAttributeConversionInfo(org.hibernate.annotations.common.reflection.XProperty property)protected StringnormalizeCompositePath(String attributeName)protected StringnormalizeCompositePathForLogging(String attributeName)voidsetParentProperty(String parentProperty)voidstartingProperty(org.hibernate.annotations.common.reflection.XProperty property)Called during binding to allow the PropertyHolder to inspect its discovered properties.StringtoString()
-
-
-
构造器详细资料
-
ComponentPropertyHolder
public ComponentPropertyHolder(Component component, String path, PropertyData inferredData, PropertyHolder parent, MetadataBuildingContext context)
-
-
方法详细资料
-
normalizeCompositePathForLogging
protected String normalizeCompositePathForLogging(String attributeName)
-
startingProperty
public void startingProperty(org.hibernate.annotations.common.reflection.XProperty property)
从接口复制的说明:PropertyHolderCalled during binding to allow the PropertyHolder to inspect its discovered properties. Mainly this is used in collecting attribute conversion declarations (via @Convert/@Converts).- 参数:
property- The property
-
locateAttributeConversionInfo
protected AttributeConversionInfo locateAttributeConversionInfo(org.hibernate.annotations.common.reflection.XProperty property)
-
locateAttributeConversionInfo
protected AttributeConversionInfo locateAttributeConversionInfo(String path)
-
getEntityName
public String getEntityName()
-
addProperty
public void addProperty(Property prop, Ejb3Column[] columns, org.hibernate.annotations.common.reflection.XClass declaringClass)
-
addJoin
public Join addJoin(javax.persistence.JoinTable joinTableAnn, boolean noDelayInPkColumnCreation)
-
getClassName
public String getClassName()
-
getEntityOwnerClassName
public String getEntityOwnerClassName()
-
getTable
public Table getTable()
-
addProperty
public void addProperty(Property prop, org.hibernate.annotations.common.reflection.XClass declaringClass)
-
getIdentifier
public KeyValue getIdentifier()
-
isOrWithinEmbeddedId
public boolean isOrWithinEmbeddedId()
从接口复制的说明:PropertyHolderReturn true if this component is or is embedded in a @EmbeddedId
-
isWithinElementCollection
public boolean isWithinElementCollection()
从接口复制的说明:PropertyHolderReturn true if this component is within an @ElementCollection.
-
getPersistentClass
public PersistentClass getPersistentClass()
-
isComponent
public boolean isComponent()
-
isEntity
public boolean isEntity()
-
setParentProperty
public void setParentProperty(String parentProperty)
- 指定者:
setParentProperty在接口中PropertyHolder- 覆盖:
setParentProperty在类中AbstractPropertyHolder
-
getOverriddenColumn
public javax.persistence.Column[] getOverriddenColumn(String propertyName)
从类复制的说明:AbstractPropertyHolderGet column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.- 指定者:
getOverriddenColumn在接口中PropertyHolder- 覆盖:
getOverriddenColumn在类中AbstractPropertyHolder
-
getOverriddenJoinColumn
public javax.persistence.JoinColumn[] getOverriddenJoinColumn(String propertyName)
从类复制的说明:AbstractPropertyHolderGet column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.- 指定者:
getOverriddenJoinColumn在接口中PropertyHolder- 覆盖:
getOverriddenJoinColumn在类中AbstractPropertyHolder
-
-