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

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


net.sf.hibernate.mapping
Class OneToOne

java.lang.Object
  extended bynet.sf.hibernate.mapping.SimpleValue
      extended bynet.sf.hibernate.mapping.ToOne
          extended bynet.sf.hibernate.mapping.OneToOne
All Implemented Interfaces:
Fetchable, Value

public class OneToOne
extends ToOne

A one-to-one association mapping

Author:
Gavin King

Field Summary
 
Fields inherited from class net.sf.hibernate.mapping.ToOne
referencedPropertyName
 
Constructor Summary
OneToOne(Table table, SimpleValue identifier)
           
 
Method Summary
 void createForeignKey()
           
 List getConstraintColumns()
           
 ForeignKeyDirection getForeignKeyType()
          Returns the foreignKeyType.
 Value getIdentifier()
          Returns the identifier.
 boolean isConstrained()
          Returns the constrained.
 boolean isNullable()
           
 void setConstrained(boolean constrained)
          Sets the constrained.
 void setForeignKeyType(ForeignKeyDirection foreignKeyType)
          Sets the foreignKeyType.
 void setIdentifier(SimpleValue identifier)
          Sets the identifier.
 void setTypeByReflection(Class propertyClass, String propertyName)
           
 
Methods inherited from class net.sf.hibernate.mapping.ToOne
getOuterJoinFetchSetting, getReferencedPropertyName, setOuterJoinFetchSetting, setReferencedPropertyName
 
Methods inherited from class net.sf.hibernate.mapping.SimpleValue
addColumn, createForeignKeyOfClass, createIdentifierGenerator, getColumnIterator, getColumnSpan, getForeignKeyName, getFormula, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getNullValue, getTable, getType, isSimpleValue, isUnique, isValid, setForeignKeyName, setFormula, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setNullValue, setTable, setType, setUnique
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneToOne

public OneToOne(Table table,
                SimpleValue identifier)
         throws MappingException
Method Detail

setTypeByReflection

public void setTypeByReflection(Class propertyClass,
                                String propertyName)
                         throws MappingException
Specified by:
setTypeByReflection in class ToOne
Throws:
MappingException

createForeignKey

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

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 Value 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(SimpleValue 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