Package org.hibernate.mapping
Class ToOne
- java.lang.Object
-
- org.hibernate.mapping.SimpleValue
-
- org.hibernate.mapping.ToOne
-
- All Implemented Interfaces:
Serializable,Fetchable,KeyValue,Value
public abstract class ToOne extends SimpleValue implements Fetchable
A simple-point association (ie. a reference to another entity).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisUnwrapProxyImplicitprotected StringreferencedPropertyNameprotected booleanreferenceToPrimaryKeyprotected booleanunwrapProxy-
Fields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedToOne(MetadataBuildingContext buildingContext, Table table)protectedToOne(MetadataImplementor metadata, Table table)Deprecated.UseToOne(MetadataBuildingContext, Table)instead.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Objectaccept(ValueVisitor visitor)abstract voidcreateForeignKey()FetchModegetFetchMode()StringgetPropertyName()StringgetReferencedEntityName()StringgetReferencedPropertyName()abstract TypegetType()booleanisLazy()booleanisReferenceToPrimaryKey()booleanisSame(SimpleValue other)booleanisSame(ToOne other)booleanisTypeSpecified()booleanisUnwrapProxy()booleanisUnwrapProxyImplicit()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)voidsetUnwrapProxyImplicit(boolean unwrapProxyImplicit)Related to HHH-13658 - keep track of whether `unwrapProxy` is an implicit value for reference later-
Methods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createIdentifierGenerator, createIdentifierGenerator, getColumnInsertability, getColumnIterator, getColumnSpan, getColumnUpdateability, getConstraintColumns, getForeignKeyDefinition, getForeignKeyName, getIdentifierGenerator, 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, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setJpaAttributeConverterDescriptor, setNullValue, setTable, setTypeName, setTypeParameters, setTypeParameters, toString
-
-
-
-
Field Detail
-
referencedPropertyName
protected String referencedPropertyName
-
unwrapProxy
protected boolean unwrapProxy
-
isUnwrapProxyImplicit
protected boolean isUnwrapProxyImplicit
-
referenceToPrimaryKey
protected boolean referenceToPrimaryKey
-
-
Constructor Detail
-
ToOne
@Deprecated protected ToOne(MetadataImplementor metadata, Table table)
Deprecated.UseToOne(MetadataBuildingContext, Table)instead.
-
ToOne
protected ToOne(MetadataBuildingContext buildingContext, Table table)
-
-
Method Detail
-
getFetchMode
public FetchMode getFetchMode()
- Specified by:
getFetchModein interfaceFetchable- Specified by:
getFetchModein interfaceValue- Overrides:
getFetchModein classSimpleValue
-
setFetchMode
public void setFetchMode(FetchMode fetchMode)
- Specified by:
setFetchModein interfaceFetchable
-
createForeignKey
public abstract void createForeignKey() throws MappingException- Specified by:
createForeignKeyin interfaceValue- Overrides:
createForeignKeyin classSimpleValue- Throws:
MappingException
-
getType
public abstract Type getType() throws MappingException
- Specified by:
getTypein interfaceValue- Overrides:
getTypein classSimpleValue- Throws:
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
- Specified by:
setTypeUsingReflectionin interfaceValue- Overrides:
setTypeUsingReflectionin classSimpleValue- Throws:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified()
- Overrides:
isTypeSpecifiedin classSimpleValue
-
accept
public Object accept(ValueVisitor visitor)
- Specified by:
acceptin interfaceValue- Overrides:
acceptin classSimpleValue
-
isSame
public boolean isSame(SimpleValue other)
- Overrides:
isSamein classSimpleValue
-
isSame
public boolean isSame(ToOne other)
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- Specified by:
isValidin interfaceValue- Overrides:
isValidin classSimpleValue- Throws:
MappingException
-
isUnwrapProxy
public boolean isUnwrapProxy()
-
setUnwrapProxy
public void setUnwrapProxy(boolean unwrapProxy)
-
isUnwrapProxyImplicit
public boolean isUnwrapProxyImplicit()
-
setUnwrapProxyImplicit
public void setUnwrapProxyImplicit(boolean unwrapProxyImplicit)
Related to HHH-13658 - keep track of whether `unwrapProxy` is an implicit value for reference later
-
isReferenceToPrimaryKey
public boolean isReferenceToPrimaryKey()
-
setReferenceToPrimaryKey
public void setReferenceToPrimaryKey(boolean referenceToPrimaryKey)
-
-