Top Description Fields Constructors Methods
org.hibernate.mapping

public Class OneToOne

extends ToOne
Class Inheritance
Imports
java.util.ArrayList, .Iterator, org.hibernate.MappingException, org.hibernate.cfg.Mappings, org.hibernate.type.EntityType, .ForeignKeyDirection, .SpecialOneToOneType, .Type, .TypeFactory

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:
referencedPropertyNameunwrapProxy

Constructor Summary

AccessConstructor and Description
public
OneToOne(Mappings mappings, Table table, PersistentClass owner)

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 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
setPropertyName(String propertyName)

Inherited from org.hibernate.mapping.ToOne:
getFetchModegetReferencedEntityNamegetReferencedPropertyNameisEmbeddedisLazyisTypeSpecifiedisUnwrapProxyisValidsetEmbeddedsetFetchModesetLazysetReferencedEntityNamesetReferencedPropertyNamesetTypeUsingReflectionsetUnwrapProxy

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

Constructor Detail

OneToOneback to summary
public OneToOne(Mappings mappings, Table table, PersistentClass owner) throws MappingException

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()
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.

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)