public class ManyToOne extends java.lang.Object implements RelationField
Java class for many-to-one complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="many-to-one">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<choice>
<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="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="target-entity" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
<attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" />
<attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
<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 |
mapsId |
protected java.lang.String |
name |
protected java.lang.Boolean |
optional |
protected RelationField |
relatedField |
protected boolean |
syntheticField |
protected java.lang.String |
targetEntity |
| Constructor and Description |
|---|
ManyToOne() |
| 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() |
java.lang.String |
getMapsId()
Gets the value of the mapsId property.
|
java.lang.String |
getName()
Gets the value of the name 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.
|
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) |
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 |
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<JoinColumn> joinColumn
protected JoinTable joinTable
protected CascadeType cascade
protected FetchType fetch
protected java.lang.String name
protected java.lang.Boolean optional
protected java.lang.String targetEntity
protected RelationField relatedField
protected boolean syntheticField
protected AccessType access
protected java.lang.String mapsId
protected java.lang.Boolean id
public 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 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 java.lang.String getMappedBy()
getMappedBy in interface RelationFieldpublic void setMappedBy(java.lang.String value)
setMappedBy in interface RelationFieldpublic 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()
isSyntheticField in interface RelationFieldpublic void setSyntheticField(boolean syntheticField)
setSyntheticField in interface RelationFieldpublic java.lang.Object getKey()
Keyablepublic AccessType getAccess()
AccessTypepublic void setAccess(AccessType value)
value - allowed object is
AccessTypepublic 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
Boolean