Package org.hibernate.mapping
Class ToOne
java.lang.Object
org.hibernate.mapping.SimpleValue
org.hibernate.mapping.ToOne
- All Implemented Interfaces:
Serializable
,Fetchable
,KeyValue
,SortableValue
,Value
A mapping model object representing an association where the target side has cardinality one.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.mapping.KeyValue
KeyValue.NullValueSemantic
-
Field Summary
FieldsFields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ToOne
(MetadataBuildingContext buildingContext, Table table) protected
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
createForeignKey
(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns) boolean
isLazy()
boolean
boolean
isSame
(SimpleValue other) boolean
boolean
isSorted()
boolean
boolean
boolean
boolean
isValid
(MappingContext mappingContext) void
setFetchMode
(FetchMode fetchMode) void
setLazy
(boolean lazy) void
setPropertyName
(String propertyName) void
setReferencedEntityName
(String referencedEntityName) void
void
setReferenceToPrimaryKey
(boolean referenceToPrimaryKey) void
setSorted
(boolean sorted) void
setTypeUsingReflection
(String className, 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 laterint[]
Methods inherited from class org.hibernate.mapping.SimpleValue
accept, addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createGenerator, createGenerator, createParameterImpl, createUniqueKey, disableForeignKey, getAttributeConverterDescriptor, getBuildingContext, getColumn, getColumnInsertability, getColumns, getColumnSpan, getColumnUpdateability, getCustomIdGeneratorCreator, getForeignKeyDefinition, getForeignKeyName, getForeignKeyOptions, getJpaAttributeConverterDescriptor, getMetadata, getNullValue, getNullValueSemantic, getOnDeleteAction, getSelectables, getServiceRegistry, getTable, getTypeConfiguration, getTypeName, getTypeParameters, hasAnyInsertableColumns, hasAnyUpdatableColumns, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isColumnInsertable, isColumnUpdateable, isConstrained, isForeignKeyEnabled, isLob, isNationalized, isNullable, isPartitionKey, isSame, isSame, isSimpleValue, isUpdateable, isVersion, justAddColumn, justAddColumn, justAddFormula, makeLob, makeNationalized, makeParameterImpl, makeVersion, setAlternateUniqueKey, setAttributeConverterDescriptor, setColumnToIdentity, setCustomIdGeneratorCreator, setForeignKeyDefinition, setForeignKeyName, setForeignKeyOptions, setJpaAttributeConverterDescriptor, setNullValue, setNullValueSemantic, setNullValueUndefined, setOnDeleteAction, setPartitionKey, setTable, setTypeName, setTypeParameters, setTypeParameters, sortColumns, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication, copy, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getSelectableType, getType, getVirtualSelectables, isValid
-
Field Details
-
referencedPropertyName
-
-
Constructor Details
-
ToOne
-
ToOne
-
-
Method Details
-
getFetchMode
- Specified by:
getFetchMode
in interfaceFetchable
- Specified by:
getFetchMode
in interfaceValue
- Overrides:
getFetchMode
in classSimpleValue
-
setFetchMode
- Specified by:
setFetchMode
in interfaceFetchable
-
getReferencedPropertyName
-
setReferencedPropertyName
-
getReferencedEntityName
-
setReferencedEntityName
-
getPropertyName
-
setPropertyName
-
setTypeUsingReflection
- Specified by:
setTypeUsingReflection
in interfaceValue
- Overrides:
setTypeUsingReflection
in classSimpleValue
- Throws:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified()- Overrides:
isTypeSpecified
in classSimpleValue
-
isSame
- Overrides:
isSame
in classSimpleValue
-
isSame
-
isValid
- Specified by:
isValid
in interfaceValue
- Overrides:
isValid
in classSimpleValue
- Throws:
MappingException
-
isLazy
public boolean isLazy() -
setLazy
public void setLazy(boolean lazy) -
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) -
isSorted
public boolean isSorted()- Specified by:
isSorted
in interfaceSortableValue
-
setSorted
public void setSorted(boolean sorted) -
sortProperties
public int[] sortProperties()- Specified by:
sortProperties
in interfaceSortableValue
-
createForeignKey
- Overrides:
createForeignKey
in classSimpleValue
-
createForeignKey
public void createForeignKey()- Specified by:
createForeignKey
in interfaceValue
- Overrides:
createForeignKey
in classSimpleValue
-