public class OneToOne extends java.lang.Object implements RelationField
Java class for one-to-one complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="one-to-one">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<choice>
<element name="primary-key-join-column" type="{http://java.sun.com/xml/ns/persistence/orm}primary-key-join-column" maxOccurs="unbounded" minOccurs="0"/>
<element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
<element name="join-table" type="{http://java.sun.com/xml/ns/persistence/orm}join-table" minOccurs="0"/>
</choice>
<element name="cascade" type="{http://java.sun.com/xml/ns/persistence/orm}cascade-type" minOccurs="0"/>
</sequence>
<attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
<attribute name="mapped-by" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" />
<attribute name="target-entity" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
<attribute name="orphan-removal" type="{http://www.w3.org/2001/XMLSchema}boolean" />
<attribute name="maps-id" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="id" type="{http://www.w3.org/2001/XMLSchema}boolean" />
</restriction>
</complexContent>
</complexType>
| Modifier and Type | Field and Description |
|---|---|
protected AccessType |
access |
protected CascadeType |
cascade |
protected FetchType |
fetch |
protected java.lang.Boolean |
id |
protected java.util.List<JoinColumn> |
joinColumn |
protected JoinTable |
joinTable |
protected java.lang.String |
mappedBy |
protected java.lang.String |
mapsId |
protected java.lang.String |
name |
protected java.lang.Boolean |
optional |
protected java.lang.Boolean |
orphanRemoval |
protected java.util.List<PrimaryKeyJoinColumn> |
primaryKeyJoinColumn |
protected RelationField |
relatedField |
protected boolean |
syntheticField |
protected java.lang.String |
targetEntity |
| Constructor and Description |
|---|
OneToOne() |
| Modifier and Type | Method and Description |
|---|---|
AccessType |
getAccess()
Gets the value of the access property.
|
CascadeType |
getCascade()
Gets the value of the cascade property.
|
FetchType |
getFetch()
Gets the value of the fetch property.
|
java.util.List<JoinColumn> |
getJoinColumn()
Gets the value of the joinColumn property.
|
JoinTable |
getJoinTable()
Gets the value of the joinTable property.
|
java.lang.Object |
getKey()
Gets the immutable key for this object.
|
java.lang.String |
getMappedBy()
Gets the value of the mappedBy property.
|
java.lang.String |
getMapsId()
Gets the value of the mapsId property.
|
java.lang.String |
getName()
Gets the value of the name property.
|
java.util.List<PrimaryKeyJoinColumn> |
getPrimaryKeyJoinColumn()
Gets the value of the primaryKeyJoinColumn property.
|
RelationField |
getRelatedField()
This is only used for xml converters and will normally return null.
|
java.lang.String |
getTargetEntity()
Gets the value of the targetEntity property.
|
java.lang.Boolean |
isId()
Gets the value of the id property.
|
java.lang.Boolean |
isOptional()
Gets the value of the optional property.
|
java.lang.Boolean |
isOrphanRemoval()
Gets the value of the orphanRemoval property.
|
boolean |
isSyntheticField()
This is only used for xml converters and will normally return false.
|
void |
setAccess(AccessType value)
Sets the value of the access property.
|
void |
setCascade(CascadeType value)
Sets the value of the cascade property.
|
void |
setFetch(FetchType value)
Sets the value of the fetch property.
|
void |
setId(java.lang.Boolean value)
Sets the value of the id property.
|
void |
setJoinTable(JoinTable value)
Sets the value of the joinTable property.
|
void |
setMappedBy(java.lang.String value)
Sets the value of the mappedBy property.
|
void |
setMapsId(java.lang.String value)
Sets the value of the mapsId property.
|
void |
setName(java.lang.String value)
Sets the value of the name property.
|
void |
setOptional(java.lang.Boolean value)
Sets the value of the optional property.
|
void |
setOrphanRemoval(java.lang.Boolean value)
Sets the value of the orphanRemoval property.
|
void |
setRelatedField(RelationField value)
Gets the field on the target entity for this relationship.
|
void |
setSyntheticField(boolean syntheticField)
This is only used for xml converters and will normally return false.
|
void |
setTargetEntity(java.lang.String value)
Sets the value of the targetEntity property.
|
protected java.util.List<PrimaryKeyJoinColumn> primaryKeyJoinColumn
protected java.util.List<JoinColumn> joinColumn
protected JoinTable joinTable
protected CascadeType cascade
protected FetchType fetch
protected AccessType access
protected java.lang.String mappedBy
protected java.lang.Boolean orphanRemoval
protected java.lang.String mapsId
protected java.lang.Boolean id
protected java.lang.String name
protected java.lang.Boolean optional
protected java.lang.String targetEntity
protected RelationField relatedField
protected boolean syntheticField
public java.util.List<PrimaryKeyJoinColumn> getPrimaryKeyJoinColumn()
set method for the primaryKeyJoinColumn property.
For example, to add a new item, do as follows:
getPrimaryKeyJoinColumn().add(newItem);
Objects of the following type(s) are allowed in the list
PrimaryKeyJoinColumnpublic java.util.List<JoinColumn> getJoinColumn()
set method for the joinColumn property.
For example, to add a new item, do as follows:
getJoinColumn().add(newItem);
Objects of the following type(s) are allowed in the list
JoinColumngetJoinColumn in interface RelationFieldpublic JoinTable getJoinTable()
getJoinTable in interface RelationFieldJoinTablepublic void setJoinTable(JoinTable value)
setJoinTable in interface RelationFieldvalue - allowed object is
JoinTablepublic CascadeType getCascade()
getCascade in interface RelationFieldCascadeTypepublic void setCascade(CascadeType value)
setCascade in interface RelationFieldvalue - allowed object is
CascadeTypepublic FetchType getFetch()
getFetch in interface RelationFieldFetchTypepublic void setFetch(FetchType value)
setFetch in interface RelationFieldvalue - allowed object is
FetchTypepublic AccessType getAccess()
AccessTypepublic void setAccess(AccessType value)
value - allowed object is
AccessTypepublic java.lang.String getMappedBy()
getMappedBy in interface RelationFieldStringpublic void setMappedBy(java.lang.String value)
setMappedBy in interface RelationFieldvalue - allowed object is
Stringpublic java.lang.Boolean isOrphanRemoval()
Booleanpublic void setOrphanRemoval(java.lang.Boolean value)
value - allowed object is
Booleanpublic java.lang.String getMapsId()
Stringpublic void setMapsId(java.lang.String value)
value - allowed object is
Stringpublic java.lang.Boolean isId()
Booleanpublic void setId(java.lang.Boolean value)
value - allowed object is
Booleanpublic java.lang.String getName()
getName in interface RelationFieldStringpublic void setName(java.lang.String value)
setName in interface RelationFieldvalue - allowed object is
Stringpublic java.lang.Boolean isOptional()
Booleanpublic void setOptional(java.lang.Boolean value)
value - allowed object is
Booleanpublic java.lang.String getTargetEntity()
getTargetEntity in interface RelationFieldStringpublic void setTargetEntity(java.lang.String value)
setTargetEntity in interface RelationFieldvalue - allowed object is
Stringpublic RelationField getRelatedField()
getRelatedField in interface RelationFieldpublic void setRelatedField(RelationField value)
setRelatedField in interface RelationFieldvalue - field on the target entity for this relationship.public boolean isSyntheticField()
RelationFieldisSyntheticField in interface RelationFieldpublic void setSyntheticField(boolean syntheticField)
RelationFieldsetSyntheticField in interface RelationField