类 ToOne
- java.lang.Object
-
- org.hibernate.mapping.SimpleValue
-
- org.hibernate.mapping.ToOne
-
- 所有已实现的接口:
Serializable,Fetchable,KeyValue,Value
public abstract class ToOne extends SimpleValue implements Fetchable
A simple-point association (ie. a reference to another entity).- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 protected StringreferencedPropertyNameprotected booleanreferenceToPrimaryKeyprotected booleanunwrapProxy-
从类继承的字段 org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
-
构造器概要
构造器 限定符 构造器 说明 protectedToOne(MetadataBuildingContext buildingContext, Table table)protectedToOne(MetadataImplementor metadata, Table table)已过时。UseToOne(MetadataBuildingContext, Table)instead.
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 Objectaccept(ValueVisitor visitor)abstract voidcreateForeignKey()FetchModegetFetchMode()StringgetPropertyName()StringgetReferencedEntityName()StringgetReferencedPropertyName()abstract TypegetType()booleanisLazy()booleanisReferenceToPrimaryKey()booleanisSame(SimpleValue other)booleanisSame(ToOne other)booleanisTypeSpecified()booleanisUnwrapProxy()booleanisValid(Mapping mapping)voidsetFetchMode(FetchMode fetchMode)voidsetLazy(boolean lazy)voidsetPropertyName(String propertyName)voidsetReferencedEntityName(String referencedEntityName)voidsetReferencedPropertyName(String name)voidsetReferenceToPrimaryKey(boolean referenceToPrimaryKey)voidsetTypeUsingReflection(String className, String propertyName)voidsetUnwrapProxy(boolean unwrapProxy)-
从类继承的方法 org.hibernate.mapping.SimpleValue
addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createIdentifierGenerator, getColumnInsertability, getColumnIterator, getColumnSpan, getColumnUpdateability, getConstraintColumns, getForeignKeyDefinition, getForeignKeyName, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getMetadata, getNullValue, getServiceRegistry, getTable, getTypeName, getTypeParameters, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isIdentityColumn, isLob, isNationalized, isNullable, isSame, isSame, isSimpleValue, isUpdateable, isVersion, makeLob, makeNationalized, makeVersion, setAlternateUniqueKey, setCascadeDeleteEnabled, setForeignKeyDefinition, setForeignKeyName, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setJpaAttributeConverterDescriptor, setNullValue, setTable, setTypeName, setTypeParameters, toString
-
-
-
-
字段详细资料
-
referencedPropertyName
protected String referencedPropertyName
-
unwrapProxy
protected boolean unwrapProxy
-
referenceToPrimaryKey
protected boolean referenceToPrimaryKey
-
-
构造器详细资料
-
ToOne
@Deprecated protected ToOne(MetadataImplementor metadata, Table table)
已过时。UseToOne(MetadataBuildingContext, Table)instead.
-
ToOne
protected ToOne(MetadataBuildingContext buildingContext, Table table)
-
-
方法详细资料
-
getFetchMode
public FetchMode getFetchMode()
- 指定者:
getFetchMode在接口中Fetchable- 指定者:
getFetchMode在接口中Value- 覆盖:
getFetchMode在类中SimpleValue
-
setFetchMode
public void setFetchMode(FetchMode fetchMode)
- 指定者:
setFetchMode在接口中Fetchable
-
createForeignKey
public abstract void createForeignKey() throws MappingException- 指定者:
createForeignKey在接口中Value- 覆盖:
createForeignKey在类中SimpleValue- 抛出:
MappingException
-
getType
public abstract Type getType() throws MappingException
- 指定者:
getType在接口中Value- 覆盖:
getType在类中SimpleValue- 抛出:
MappingException
-
getReferencedPropertyName
public String getReferencedPropertyName()
-
setReferencedPropertyName
public void setReferencedPropertyName(String name)
-
getReferencedEntityName
public String getReferencedEntityName()
-
setReferencedEntityName
public void setReferencedEntityName(String referencedEntityName)
-
getPropertyName
public String getPropertyName()
-
setPropertyName
public void setPropertyName(String propertyName)
-
setTypeUsingReflection
public void setTypeUsingReflection(String className, String propertyName) throws MappingException
- 指定者:
setTypeUsingReflection在接口中Value- 覆盖:
setTypeUsingReflection在类中SimpleValue- 抛出:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified()
- 覆盖:
isTypeSpecified在类中SimpleValue
-
accept
public Object accept(ValueVisitor visitor)
- 指定者:
accept在接口中Value- 覆盖:
accept在类中SimpleValue
-
isSame
public boolean isSame(SimpleValue other)
- 覆盖:
isSame在类中SimpleValue
-
isSame
public boolean isSame(ToOne other)
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- 指定者:
isValid在接口中Value- 覆盖:
isValid在类中SimpleValue- 抛出:
MappingException
-
isUnwrapProxy
public boolean isUnwrapProxy()
-
setUnwrapProxy
public void setUnwrapProxy(boolean unwrapProxy)
-
isReferenceToPrimaryKey
public boolean isReferenceToPrimaryKey()
-
setReferenceToPrimaryKey
public void setReferenceToPrimaryKey(boolean referenceToPrimaryKey)
-
-