Package org.hibernate.mapping
Class OneToOne
java.lang.Object
org.hibernate.mapping.SimpleValue
org.hibernate.mapping.ToOne
org.hibernate.mapping.OneToOne
- All Implemented Interfaces:
Serializable,Fetchable,KeyValue,SortableValue,Value
A mapping model object representing a many-to-one association.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.mapping.KeyValue
KeyValue.NullValueSemantic -
Field Summary
Fields inherited from class org.hibernate.mapping.ToOne
referencedPropertyNameFields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY -
Constructor Summary
ConstructorsConstructorDescriptionOneToOne(MetadataBuildingContext buildingContext, Table table, PersistentClass owner) -
Method Summary
Modifier and TypeMethodDescriptionaccept(ValueVisitor visitor) copy()voidcreateUniqueKey(MetadataBuildingContext context) Same asValue.getColumns()except it returns the PK for the non-owning side of a one-to-one association.Returns the foreignKeyType.Returns the identifier.getType()Same asValue.getSelectables()except it returns the PK for the non-owning side of a one-to-one association.booleanReturns the constrained.booleanbooleanbooleanvoidsetConstrained(boolean constrained) Sets the constrained.voidsetForeignKeyType(ForeignKeyDirection foreignKeyType) Sets the foreignKeyType.voidsetIdentifier(KeyValue identifier) Sets the identifier.voidsetMappedByProperty(String mappedByProperty) voidsetPropertyName(String propertyName) Methods inherited from class org.hibernate.mapping.ToOne
createForeignKey, createForeignKey, getFetchMode, getReferencedEntityName, getReferencedPropertyName, isLazy, isReferenceToPrimaryKey, isSame, isSorted, isTypeSpecified, isUnwrapProxy, isUnwrapProxyImplicit, isValid, setFetchMode, setLazy, setReferencedEntityName, setReferencedPropertyName, setReferenceToPrimaryKey, setSorted, setTypeUsingReflection, setUnwrapProxy, setUnwrapProxyImplicit, sortPropertiesMethods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createForeignKeyOfEntity, createGenerator, createGenerator, createParameterType, 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, isForeignKeyEnabled, isLob, isNationalized, 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, getExtraCreateTableInfo, getSelectableType
-
Constructor Details
-
OneToOne
public OneToOne(MetadataBuildingContext buildingContext, Table table, PersistentClass owner) throws MappingException - Throws:
MappingException
-
-
Method Details
-
copy
-
getPropertyName
- Overrides:
getPropertyNamein classToOne
-
setPropertyName
- Overrides:
setPropertyNamein classToOne
-
getEntityName
-
getType
- Throws:
MappingException
-
createUniqueKey
- Specified by:
createUniqueKeyin interfaceValue- Overrides:
createUniqueKeyin classSimpleValue
-
getVirtualSelectables
Description copied from interface:ValueSame asValue.getSelectables()except it returns the PK for the non-owning side of a one-to-one association. -
getConstraintColumns
Description copied from interface:ValueSame asValue.getColumns()except it returns the PK for the non-owning side of a one-to-one association. -
isConstrained
public boolean isConstrained()Returns the constrained.- Overrides:
isConstrainedin classSimpleValue- Returns:
- boolean
-
getForeignKeyType
Returns the foreignKeyType.- Returns:
- AssociationType.ForeignKeyType
-
getIdentifier
Returns the identifier.- Returns:
- Value
-
setConstrained
public void setConstrained(boolean constrained) Sets the constrained.- Parameters:
constrained- The constrained to set
-
setForeignKeyType
Sets the foreignKeyType.- Parameters:
foreignKeyType- The foreignKeyType to set
-
setIdentifier
Sets the identifier.- Parameters:
identifier- The identifier to set
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceValue- Overrides:
isNullablein classSimpleValue
-
accept
- Specified by:
acceptin interfaceValue- Overrides:
acceptin classSimpleValue
-
isSame
-
isSame
-
getMappedByProperty
-
setMappedByProperty
-