Package org.hibernate.mapping
Class ToOne
- java.lang.Object
-
- org.hibernate.mapping.SimpleValue
-
- org.hibernate.mapping.ToOne
-
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 boolean
isUnwrapProxyImplicit
protected java.lang.String
referencedPropertyName
protected boolean
referenceToPrimaryKey
protected boolean
unwrapProxy
-
Fields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ToOne(MetadataBuildingContext buildingContext, Table table)
protected
ToOne(MetadataImplementor metadata, Table table)
Deprecated.UseToOne(MetadataBuildingContext, Table)
instead.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object
accept(ValueVisitor visitor)
abstract void
createForeignKey()
FetchMode
getFetchMode()
java.lang.String
getPropertyName()
java.lang.String
getReferencedEntityName()
java.lang.String
getReferencedPropertyName()
abstract Type
getType()
boolean
isLazy()
boolean
isReferenceToPrimaryKey()
boolean
isSame(SimpleValue other)
boolean
isSame(ToOne other)
boolean
isTypeSpecified()
boolean
isUnwrapProxy()
boolean
isUnwrapProxyImplicit()
boolean
isValid(Mapping mapping)
void
setFetchMode(FetchMode fetchMode)
void
setLazy(boolean lazy)
void
setPropertyName(java.lang.String propertyName)
void
setReferencedEntityName(java.lang.String referencedEntityName)
void
setReferencedPropertyName(java.lang.String name)
void
setReferenceToPrimaryKey(boolean referenceToPrimaryKey)
void
setTypeUsingReflection(java.lang.String className, java.lang.String propertyName)
void
setUnwrapProxy(boolean unwrapProxy)
void
setUnwrapProxyImplicit(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
-
-
-
-
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:
getFetchMode
in interfaceFetchable
- Specified by:
getFetchMode
in interfaceValue
- Overrides:
getFetchMode
in classSimpleValue
-
setFetchMode
public void setFetchMode(FetchMode fetchMode)
- Specified by:
setFetchMode
in interfaceFetchable
-
createForeignKey
public abstract void createForeignKey() throws MappingException
- Specified by:
createForeignKey
in interfaceValue
- Overrides:
createForeignKey
in classSimpleValue
- Throws:
MappingException
-
getType
public abstract Type getType() throws MappingException
- Specified by:
getType
in interfaceValue
- Overrides:
getType
in classSimpleValue
- Throws:
MappingException
-
getReferencedPropertyName
public java.lang.String getReferencedPropertyName()
-
setReferencedPropertyName
public void setReferencedPropertyName(java.lang.String name)
-
getReferencedEntityName
public java.lang.String getReferencedEntityName()
-
setReferencedEntityName
public void setReferencedEntityName(java.lang.String referencedEntityName)
-
getPropertyName
public java.lang.String getPropertyName()
-
setPropertyName
public void setPropertyName(java.lang.String propertyName)
-
setTypeUsingReflection
public void setTypeUsingReflection(java.lang.String className, java.lang.String propertyName) throws MappingException
- Specified by:
setTypeUsingReflection
in interfaceValue
- Overrides:
setTypeUsingReflection
in classSimpleValue
- Throws:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified()
- Overrides:
isTypeSpecified
in classSimpleValue
-
accept
public java.lang.Object accept(ValueVisitor visitor)
- Specified by:
accept
in interfaceValue
- Overrides:
accept
in classSimpleValue
-
isSame
public boolean isSame(SimpleValue other)
- Overrides:
isSame
in classSimpleValue
-
isSame
public boolean isSame(ToOne other)
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- Specified by:
isValid
in interfaceValue
- Overrides:
isValid
in 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)
-
-