站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.3 正式版 API 英文文档

OneToOne (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档


org.hibernate.mapping
Class OneToOne

java.lang.Object
  extended byorg.hibernate.mapping.SimpleValue
      extended byorg.hibernate.mapping.ToOne
          extended byorg.hibernate.mapping.OneToOne
All Implemented Interfaces:
Fetchable, KeyValue, Serializable, Value

public class OneToOne
extends ToOne

A one-to-one association mapping

Author:
Gavin King
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.mapping.ToOne
referencedPropertyName, unwrapProxy
 
Constructor Summary
OneToOne(Table table, PersistentClass owner)
           
 
Method Summary
 Object accept(ValueVisitor visitor)
           
 void createForeignKey()
           
 List getConstraintColumns()
           
 String getEntityName()
           
 ForeignKeyDirection getForeignKeyType()
          Returns the foreignKeyType.
 KeyValue getIdentifier()
          Returns the identifier.
 String getPropertyName()
           
 Type getType()
           
 boolean isConstrained()
          Returns the constrained.
 boolean isNullable()
           
 void setConstrained(boolean constrained)
          Sets the constrained.
 void setEntityName(String propertyName)
           
 void setForeignKeyType(ForeignKeyDirection foreignKeyType)
          Sets the foreignKeyType.
 void setIdentifier(KeyValue identifier)
          Sets the identifier.
 void setPropertyName(String propertyName)
           
 
Methods inherited from class org.hibernate.mapping.ToOne
getFetchMode, getReferencedEntityName, getReferencedPropertyName, isEmbedded, isLazy, isTypeSpecified, isUnwrapProxy, isValid, setEmbedded, setFetchMode, setLazy, setReferencedEntityName, setReferencedPropertyName, setTypeUsingReflection, setUnwrapProxy
 
Methods inherited from class org.hibernate.mapping.SimpleValue
addColumn, addFormula, createForeignKeyOfEntity, createIdentifierGenerator, getColumnInsertability, getColumnIterator, getColumnSpan, getColumnUpdateability, getForeignKeyName, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getNullValue, getTable, getTypeName, getTypeParameters, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isIdentityColumn, isSimpleValue, isUpdateable, setAlternateUniqueKey, setCascadeDeleteEnabled, setForeignKeyName, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setNullValue, setTable, setTypeName, setTypeParameters, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneToOne

public OneToOne(Table table,
                PersistentClass owner)
         throws MappingException
Method Detail

getPropertyName

public String getPropertyName()

setPropertyName

public void setPropertyName(String propertyName)

getEntityName

public String getEntityName()

setEntityName

public void setEntityName(String propertyName)

getType

public Type getType()
             throws MappingException
Specified by:
getType in interface Value
Specified by:
getType in class ToOne
Throws:
MappingException

createForeignKey

public void createForeignKey()
                      throws MappingException
Specified by:
createForeignKey in interface Value
Specified by:
createForeignKey in class ToOne
Throws:
MappingException

getConstraintColumns

public List getConstraintColumns()
Overrides:
getConstraintColumns in class SimpleValue

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 interface Value
Overrides:
isNullable in class SimpleValue

accept

public Object accept(ValueVisitor visitor)
Specified by:
accept in interface Value
Overrides:
accept in class ToOne