Top Description Fields Constructors Methods
org.hibernate.mapping

public Class OneToOne

extends ToOne
Class Inheritance
Imports
java.util.ArrayList, .Iterator, .Objects, org.hibernate.MappingException, org.hibernate.boot.spi.MetadataBuildingContext, .MetadataImplementor, org.hibernate.type.EntityType, .ForeignKeyDirection, .Type

A one-to-one association mapping
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private boolean
private String
private ForeignKeyDirection
private KeyValue
private String
Inherited from org.hibernate.mapping.ToOne:
isUnwrapProxyImplicitreferencedPropertyNamereferenceToPrimaryKeyunwrapProxy

Constructor Summary

AccessConstructor and Description
public
public
OneToOne(MetadataBuildingContext buildingContext, Table table, PersistentClass owner)

Deprecated as a consequence of Table being deprecated.

Method Summary

Modifier and TypeMethod and Description
public Object
public void
public List<E>
public String
public ForeignKeyDirection

Returns:

AssociationType.ForeignKeyType
getForeignKeyType
()

Returns the foreignKeyType.

public KeyValue

Returns:

Value
getIdentifier
()

Returns the identifier.

public String
public Type
public boolean

Returns:

boolean
isConstrained
()

Returns the constrained.

public boolean
public boolean
public boolean
public void
setConstrained(boolean
The constrained to set
constrained
)

Sets the constrained.

public void
setEntityName(String propertyName)

public void
setForeignKeyType(ForeignKeyDirection
The foreignKeyType to set
foreignKeyType
)

Sets the foreignKeyType.

public void
setIdentifier(KeyValue
The identifier to set
identifier
)

Sets the identifier.

public void
Inherited from org.hibernate.mapping.ToOne:
getFetchModegetReferencedEntityNamegetReferencedPropertyNameisLazyisReferenceToPrimaryKeyisSameisTypeSpecifiedisUnwrapProxyisUnwrapProxyImplicitisValidsetFetchModesetLazysetReferencedEntityNamesetReferencedPropertyNamesetReferenceToPrimaryKeysetTypeUsingReflectionsetUnwrapProxysetUnwrapProxyImplicit

Field Detail

constrainedback to summary
private boolean constrained
entityNameback to summary
private String entityName
foreignKeyTypeback to summary
private ForeignKeyDirection foreignKeyType
identifierback to summary
private KeyValue identifier
propertyNameback to summary
private String propertyName

Hides org.hibernate.mapping.ToOne.propertyName.

Constructor Detail

OneToOneback to summary
public OneToOne(MetadataImplementor metadata, Table table, PersistentClass owner) throws MappingException
Annotations
@Deprecated
OneToOneback to summary
public OneToOne(MetadataBuildingContext buildingContext, Table table, PersistentClass owner) throws MappingException

Deprecated

as a consequence of Table being deprecated. See corresponding docs for further information.

Method Detail

acceptback to summary
public Object accept(ValueVisitor visitor)

Overrides org.hibernate.mapping.ToOne.accept.

Implements org.hibernate.mapping.Value.accept.

createForeignKeyback to summary
public void createForeignKey() throws MappingException

Implements abstract org.hibernate.mapping.ToOne.createForeignKey.

Implements org.hibernate.mapping.Value.createForeignKey.

getConstraintColumnsback to summary
public List<E> getConstraintColumns()

Overrides org.hibernate.mapping.SimpleValue.getConstraintColumns.

getEntityNameback to summary
public String getEntityName()
getForeignKeyTypeback to summary
public ForeignKeyDirection getForeignKeyType()

Returns the foreignKeyType.

Returns:ForeignKeyDirection

AssociationType.ForeignKeyType

getIdentifierback to summary
public KeyValue getIdentifier()

Returns the identifier.

Returns:KeyValue

Value

getPropertyNameback to summary
public String getPropertyName()

Overrides org.hibernate.mapping.ToOne.getPropertyName.

getTypeback to summary
public Type getType() throws MappingException

Implements abstract org.hibernate.mapping.ToOne.getType.

Implements org.hibernate.mapping.Value.getType.

isConstrainedback to summary
public boolean isConstrained()

Returns the constrained.

Returns:boolean

boolean

isNullableback to summary
public boolean isNullable()

Overrides org.hibernate.mapping.SimpleValue.isNullable.

Implements org.hibernate.mapping.Value.isNullable.

isSameback to summary
public boolean isSame(ToOne other)

Overrides org.hibernate.mapping.ToOne.isSame.

Annotations
@Override
isSameback to summary
public boolean isSame(OneToOne other)
setConstrainedback to summary
public void setConstrained(boolean constrained)

Sets the constrained.

Parameters
constrained:boolean

The constrained to set

setEntityNameback to summary
public void setEntityName(String propertyName)
setForeignKeyTypeback to summary
public void setForeignKeyType(ForeignKeyDirection foreignKeyType)

Sets the foreignKeyType.

Parameters
foreignKeyType:ForeignKeyDirection

The foreignKeyType to set

setIdentifierback to summary
public void setIdentifier(KeyValue identifier)

Sets the identifier.

Parameters
identifier:KeyValue

The identifier to set

setPropertyNameback to summary
public void setPropertyName(String propertyName)

Overrides org.hibernate.mapping.ToOne.setPropertyName.