Package org.hibernate.mapping
Class OneToOne
- java.lang.Object
-
- org.hibernate.mapping.SimpleValue
-
- org.hibernate.mapping.ToOne
-
- org.hibernate.mapping.OneToOne
-
public class OneToOne extends ToOne
A one-to-one association mapping- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hibernate.mapping.ToOne
isUnwrapProxyImplicit, referencedPropertyName, referenceToPrimaryKey, unwrapProxy
-
Fields inherited from class org.hibernate.mapping.SimpleValue
DEFAULT_ID_GEN_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description OneToOne(MetadataBuildingContext buildingContext, Table table, PersistentClass owner)
OneToOne(MetadataImplementor metadata, Table table, PersistentClass owner)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
accept(ValueVisitor visitor)
void
createForeignKey()
java.util.List
getConstraintColumns()
java.lang.String
getEntityName()
ForeignKeyDirection
getForeignKeyType()
Returns the foreignKeyType.KeyValue
getIdentifier()
Returns the identifier.java.lang.String
getPropertyName()
Type
getType()
boolean
isConstrained()
Returns the constrained.boolean
isNullable()
boolean
isSame(OneToOne other)
boolean
isSame(ToOne other)
void
setConstrained(boolean constrained)
Sets the constrained.void
setEntityName(java.lang.String propertyName)
void
setForeignKeyType(ForeignKeyDirection foreignKeyType)
Sets the foreignKeyType.void
setIdentifier(KeyValue identifier)
Sets the identifier.void
setPropertyName(java.lang.String propertyName)
-
Methods inherited from class org.hibernate.mapping.ToOne
getFetchMode, getReferencedEntityName, getReferencedPropertyName, isLazy, isReferenceToPrimaryKey, isSame, isTypeSpecified, isUnwrapProxy, isUnwrapProxyImplicit, isValid, setFetchMode, setLazy, setReferencedEntityName, setReferencedPropertyName, setReferenceToPrimaryKey, setTypeUsingReflection, setUnwrapProxy, setUnwrapProxyImplicit
-
Methods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addColumn, addFormula, copyTypeFrom, createForeignKeyOfEntity, createIdentifierGenerator, createIdentifierGenerator, getColumnInsertability, getColumnIterator, getColumnSpan, getColumnUpdateability, getForeignKeyDefinition, getForeignKeyName, getIdentifierGenerator, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getMetadata, getNullValue, getServiceRegistry, getTable, getTypeName, getTypeParameters, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isIdentityColumn, isLob, isNationalized, isSame, isSame, isSimpleValue, isUpdateable, isVersion, makeLob, makeNationalized, makeVersion, setAlternateUniqueKey, setCascadeDeleteEnabled, setForeignKeyDefinition, setForeignKeyName, setIdentifierGeneratorProperties, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setJpaAttributeConverterDescriptor, setNullValue, setTable, setTypeName, setTypeParameters, setTypeParameters, toString
-
-
-
-
Constructor Detail
-
OneToOne
@Deprecated public OneToOne(MetadataImplementor metadata, Table table, PersistentClass owner) throws MappingException
Deprecated.- Throws:
MappingException
-
OneToOne
public OneToOne(MetadataBuildingContext buildingContext, Table table, PersistentClass owner) throws MappingException
- Throws:
MappingException
-
-
Method Detail
-
getPropertyName
public java.lang.String getPropertyName()
- Overrides:
getPropertyName
in classToOne
-
setPropertyName
public void setPropertyName(java.lang.String propertyName)
- Overrides:
setPropertyName
in classToOne
-
getEntityName
public java.lang.String getEntityName()
-
setEntityName
public void setEntityName(java.lang.String propertyName)
-
getType
public Type getType() throws MappingException
- Specified by:
getType
in interfaceValue
- Specified by:
getType
in classToOne
- Throws:
MappingException
-
createForeignKey
public void createForeignKey() throws MappingException
- Specified by:
createForeignKey
in interfaceValue
- Specified by:
createForeignKey
in classToOne
- Throws:
MappingException
-
getConstraintColumns
public java.util.List getConstraintColumns()
- Overrides:
getConstraintColumns
in classSimpleValue
-
isConstrained
public boolean isConstrained()
Returns the constrained.- Returns:
- boolean
-
getForeignKeyType
public ForeignKeyDirection getForeignKeyType()
Returns the foreignKeyType.- Returns:
- AssociationType.ForeignKeyType
-
getIdentifier
public KeyValue getIdentifier()
Returns the identifier.- Returns:
- Value
-
setConstrained
public void setConstrained(boolean constrained)
Sets the constrained.- Parameters:
constrained
- The constrained to set
-
setForeignKeyType
public void setForeignKeyType(ForeignKeyDirection foreignKeyType)
Sets the foreignKeyType.- Parameters:
foreignKeyType
- The foreignKeyType to set
-
setIdentifier
public void setIdentifier(KeyValue identifier)
Sets the identifier.- Parameters:
identifier
- The identifier to set
-
isNullable
public boolean isNullable()
- Specified by:
isNullable
in interfaceValue
- Overrides:
isNullable
in classSimpleValue
-
accept
public java.lang.Object accept(ValueVisitor visitor)
-
isSame
public boolean isSame(OneToOne other)
-
-