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
public abstract sealed classToOneextendsSimpleValueimplementsFetchable,SortableValuepermitsOneToOne,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 org.hibernate.mapping.KeyValue
KeyValue.NullValueSemanticField Summary
FieldsFields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGYConstructor Summary
ConstructorsModifierConstructorDescriptionprotectedToOne(MetadataBuildingContext buildingContext,Table table) protectedMethod Summary
Modifier and TypeMethodDescriptionvoidvoidcreateForeignKey(PersistentClass referencedEntity,AnnotatedJoinColumns joinColumns) booleanisLazy()booleanbooleanisSame(SimpleValue other) booleanbooleanisSorted()booleanbooleanbooleanbooleanisValid(MappingContext mappingContext) voidsetFetchMode(FetchMode fetchMode) 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 org.hibernate.mapping.SimpleValue
accept,addColumn,addColumn,addFormula,copyTypeFrom,createForeignKeyOfEntity,createForeignKeyOfEntity,createGenerator,createGenerator,createParameterType,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,makeVersion,setAlternateUniqueKey,setAttributeConverterDescriptor,setColumnToIdentity,setCustomIdGeneratorCreator,setForeignKeyDefinition,setForeignKeyName,setForeignKeyOptions,setJpaAttributeConverterDescriptor,setNullValue,setNullValueSemantic,setNullValueUndefined,setOnDeleteAction,setPartitionKey,setTable,setTypeName,setTypeParameters,setTypeParameters,sortColumns,toStringMethods inherited from class java.lang.Object
clone,equals,finalize,getClass,hashCode,notify,notifyAll,wait,wait,waitMethods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication,copy,getConstraintColumns,getExtraCreateTableInfo,getSelectableType,getType,getVirtualSelectables
Field Details
referencedPropertyName
Constructor Details
ToOne
ToOne
Method Details
getFetchMode
- Specified by:
getFetchModein interfaceFetchable- Specified by:
getFetchModein interfaceValue- Overrides:
getFetchModein classSimpleValue
setFetchMode
- Specified by:
setFetchModein 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
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 laterisReferenceToPrimaryKey
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
- Overrides:
createForeignKeyin classSimpleValue
createForeignKey
public void createForeignKey()- Specified by:
createForeignKeyin interfaceValue- Overrides:
createForeignKeyin classSimpleValue