Class ToOne
java.lang.Object
org.hibernate.mapping.SimpleValue
org.hibernate.mapping.ToOne
- All Implemented Interfaces:
Serializable, Fetchable, KeyValue, SortableValue, Value
public abstract sealed class ToOne
extends SimpleValue
implements Fetchable, SortableValue
permits OneToOne, ManyToOne
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 KeyValue
KeyValue.NullValueSemantic -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedToOne(MetadataBuildingContext buildingContext, Table table) protected -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcreateForeignKey(PersistentClass referencedEntity, org.hibernate.boot.model.internal.AnnotatedJoinColumns joinColumns) The fetch style explicitly requested via mapping (e.g.booleanisLazy()booleanbooleanisSame(SimpleValue other) booleanbooleanisSorted()booleanbooleanbooleanbooleanisValid(MappingContext mappingContext) voidsetFetchStyle(FetchStyle fetchStyle) voidsetLazy(boolean lazy) voidsetPropertyName(String propertyName) voidsetReferencedEntityName(String referencedEntityName) voidvoidsetReferenceToPrimaryKey(boolean referenceToPrimaryKey) voidsetSorted(boolean sorted) 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 laterint[]Methods inherited from class SimpleValue
accept, addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createForeignKeyOfEntity, createGenerator, createParameterType, createUniqueKey, disableForeignKey, getAttributeConverterDescriptor, getBuildingContext, getColumn, getColumnInsertability, getColumns, getColumnSpan, getColumnUpdateability, getCustomIdGeneratorCreator, getForeignKeyDefinition, getForeignKeyName, getForeignKeyOptions, getJpaAttributeConverterDescriptor, getMemberDetails, getMetadata, getNullValue, getNullValueSemantic, getOnDeleteAction, getSelectables, getServiceRegistry, getTable, getTypeAnnotation, getTypeConfiguration, getTypeName, getTypeParameters, hasAnyInsertableColumns, hasAnyUpdatableColumns, hasAuxiliaryColumnInPrimaryKey, hasAuxiliaryColumnInPrimaryKey, hasColumns, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isColumnInsertable, isColumnUpdateable, isConstrained, isForeignKeyEnabled, isLob, isNationalized, isNullable, isPartitionKey, isSame, isSame, isSimpleValue, isUpdateable, isVersion, justAddColumn, justAddColumn, justAddFormula, makeLob, makeNationalized, makeVersion, setAlternateUniqueKey, setAttributeConverterDescriptor, setColumnToIdentity, setCustomIdGeneratorCreator, setForeignKeyDefinition, setForeignKeyName, setForeignKeyOptions, setJpaAttributeConverterDescriptor, setMemberDetails, setNonInsertable, setNonUpdatable, setNullValue, setNullValueSemantic, setNullValueUndefined, setOnDeleteAction, setPartitionKey, setTable, setTypeAnnotation, setTypeName, setTypeParameters, setTypeParameters, sortColumns, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Value
checkColumnDuplication, copy, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getType, getVirtualSelectables
-
Field Details
-
referencedPropertyName
-
-
Constructor Details
-
ToOne
-
ToOne
-
-
Method Details
-
getFetchStyle
Description copied from interface:ValueThe fetch style explicitly requested via mapping (e.g.@Fetch), ornullif unspecified — in which case the runtime resolves the style from metadata such as batch size and proxy presence.- Specified by:
getFetchStylein interfaceFetchable- Specified by:
getFetchStylein interfaceValue- Overrides:
getFetchStylein classSimpleValue
-
setFetchStyle
- Specified by:
setFetchStylein interfaceFetchable
-
getReferencedPropertyName
-
setReferencedPropertyName
-
getReferencedEntityName
-
setReferencedEntityName
-
getPropertyName
-
setPropertyName
-
setTypeUsingReflection
- Specified by:
setTypeUsingReflectionin interfaceValue- Overrides:
setTypeUsingReflectionin classSimpleValue- Throws:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified()- Overrides:
isTypeSpecifiedin classSimpleValue
-
isSame
- Overrides:
isSamein classSimpleValue
-
isSame
-
isValid
- Specified by:
isValidin interfaceValue- Overrides:
isValidin classSimpleValue- Throws:
MappingException
-
isLazy
-
setLazy
-
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:
isSortedin interfaceSortableValue
-
setSorted
public void setSorted(boolean sorted) -
sortProperties
public int[] sortProperties()- Specified by:
sortPropertiesin interfaceSortableValue
-
createForeignKey
public void createForeignKey(PersistentClass referencedEntity, org.hibernate.boot.model.internal.AnnotatedJoinColumns joinColumns) - Overrides:
createForeignKeyin classSimpleValue
-
createForeignKey
public void createForeignKey()- Specified by:
createForeignKeyin interfaceValue- Overrides:
createForeignKeyin classSimpleValue
-