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:
-
Field Summary
Fields inherited from class org.hibernate.mapping.ToOne
referencedPropertyName
Fields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
Constructor Summary
ConstructorDescriptionOneToOne
(MetadataBuildingContext buildingContext, Table table, PersistentClass owner) -
Method Summary
Modifier and TypeMethodDescriptionaccept
(ValueVisitor visitor) copy()
void
createUniqueKey
(MetadataBuildingContext context) Deprecated, for removal: This API element is subject to removal in a future version.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.boolean
Returns the constrained.boolean
boolean
boolean
void
setConstrained
(boolean constrained) Sets the constrained.void
setForeignKeyType
(ForeignKeyDirection foreignKeyType) Sets the foreignKeyType.void
setIdentifier
(KeyValue identifier) Sets the identifier.void
setMappedByProperty
(String mappedByProperty) void
setPropertyName
(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, sortProperties
Methods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createGenerator, createParameterImpl, disableForeignKey, getAttributeConverterDescriptor, getBuildingContext, getColumn, getColumnInsertability, getColumns, getColumnSpan, getColumnUpdateability, getCustomIdGeneratorCreator, getForeignKeyDefinition, getForeignKeyName, getIdentifierGeneratorParameters, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getJpaAttributeConverterDescriptor, getMetadata, getNullValue, 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, makeParameterImpl, makeVersion, setAlternateUniqueKey, setAttributeConverterDescriptor, setCascadeDeleteEnabled, setCustomIdGeneratorCreator, setForeignKeyDefinition, setForeignKeyName, setIdentifierGeneratorParameters, setIdentifierGeneratorProperties, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setJpaAttributeConverterDescriptor, setNullValue, 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.KeyValue
createIdentifierGenerator, createIdentifierGenerator
Methods 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:
getPropertyName
in classToOne
-
setPropertyName
- Overrides:
setPropertyName
in classToOne
-
getEntityName
-
getType
- Throws:
MappingException
-
createUniqueKey
- Specified by:
createUniqueKey
in interfaceValue
- Overrides:
createUniqueKey
in classSimpleValue
-
getVirtualSelectables
Description copied from interface:Value
Same asValue.getSelectables()
except it returns the PK for the non-owning side of a one-to-one association. -
getConstraintColumns
Description copied from interface:Value
Same asValue.getColumns()
except it returns the PK for the non-owning side of a one-to-one association. -
getConstraintColumnIterator
Deprecated, for removal: This API element is subject to removal in a future version.UseSimpleValue.getSelectables()
instead- Overrides:
getConstraintColumnIterator
in classSimpleValue
-
isConstrained
public boolean isConstrained()Returns the constrained.- Overrides:
isConstrained
in 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:
isNullable
in interfaceValue
- Overrides:
isNullable
in classSimpleValue
-
accept
-
isSame
-
isSame
-
getMappedByProperty
-
setMappedByProperty
-
SimpleValue.getSelectables()
instead