Top Description Fields Constructors Methods
org.hibernate.boot.jaxb.mapping.spi

public Class JaxbManyToOne

extends Object
implements Serializable, AssociationAttribute, FetchableAttribute, PersistentAttribute
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.jaxb.mapping.spi.PersistentAttribute, org.hibernate.boot.jaxb.mapping.spi.FetchableAttribute, org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute, java.io.Serializable
Annotations
@XmlAccessorType:FIELD
@XmlType
name:many-to-one
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
propOrder:joinColumn, foreignKey, joinTable, cascade
Imports
java.io.Serializable, java.util.ArrayList, .List, javax.persistence.AccessType, .FetchType, javax.xml.bind.annotation.XmlAccessType, .XmlAccessorType, .XmlAttribute, .XmlElement, .XmlType, javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

@Target({METHOD, FIELD}) @Retention(RUNTIME) public @interface ManyToOne { Class targetEntity() default void.class; CascadeType[] cascade() default {}; FetchType fetch() default EAGER; boolean optional() default true; }

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>
          <sequence>
            <element name="join-column" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
            <element name="foreign-key" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}foreign-key" minOccurs="0"/>
          </sequence>
          <element name="join-table" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}join-table" minOccurs="0"/>
        </choice>
        <element name="cascade" type="{http://xmlns.jcp.org/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://xmlns.jcp.org/xml/ns/persistence/orm}fetch-type" />
      <attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" />
      <attribute name="access" type="{http://xmlns.jcp.org/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>

Field Summary

Modifier and TypeField and Description
protected AccessType
protected JaxbCascadeType
protected FetchType
protected JaxbForeignKey
protected Boolean
protected List<JaxbJoinColumn>
protected JaxbJoinTable
protected String
protected String
protected Boolean
protected String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AccessType

Returns:

possible object is String
getAccess
()

Implements org.hibernate.boot.jaxb.mapping.spi.PersistentAttribute.getAccess.

Gets the value of the access property.
public JaxbCascadeType

Returns:

possible object is JaxbCascadeType
getCascade
()

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.getCascade.

Gets the value of the cascade property.
public FetchType

Returns:

possible object is String
getFetch
()

Implements org.hibernate.boot.jaxb.mapping.spi.FetchableAttribute.getFetch.

Gets the value of the fetch property.
public JaxbForeignKey

Returns:

possible object is JaxbForeignKey
getForeignKey
()

Gets the value of the foreignKey property.

public List<JaxbJoinColumn>
getJoinColumn()

Gets the value of the joinColumn property.

public JaxbJoinTable

Returns:

possible object is JaxbJoinTable
getJoinTable
()

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.getJoinTable.

Gets the value of the joinTable property.
public String

Returns:

possible object is String
getMapsId
()

Gets the value of the mapsId property.

public String

Returns:

possible object is String
getName
()

Implements org.hibernate.boot.jaxb.mapping.spi.PersistentAttribute.getName.

Gets the value of the name property.
public String

Returns:

possible object is String
getTargetEntity
()

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.getTargetEntity.

Gets the value of the targetEntity property.
public Boolean

Returns:

possible object is Boolean
isId
()

Gets the value of the id property.

public Boolean

Returns:

possible object is Boolean
isOptional
()

Gets the value of the optional property.

public void
setAccess(AccessType
allowed object is String
value
)

Implements org.hibernate.boot.jaxb.mapping.spi.PersistentAttribute.setAccess.

Sets the value of the access property.
public void
setCascade(JaxbCascadeType
allowed object is JaxbCascadeType
value
)

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.setCascade.

Sets the value of the cascade property.
public void
setFetch(FetchType
allowed object is String
value
)

Implements org.hibernate.boot.jaxb.mapping.spi.FetchableAttribute.setFetch.

Sets the value of the fetch property.
public void
setForeignKey(JaxbForeignKey
allowed object is JaxbForeignKey
value
)

Sets the value of the foreignKey property.

public void
setId(Boolean
allowed object is Boolean
value
)

Sets the value of the id property.

public void
setJoinTable(JaxbJoinTable
allowed object is JaxbJoinTable
value
)

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.setJoinTable.

Sets the value of the joinTable property.
public void
setMapsId(String
allowed object is String
value
)

Sets the value of the mapsId property.

public void
setName(String
allowed object is String
value
)

Sets the value of the name property.

public void
setOptional(Boolean
allowed object is Boolean
value
)

Sets the value of the optional property.

public void
setTargetEntity(String
allowed object is String
value
)

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.setTargetEntity.

Sets the value of the targetEntity property.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessback to summary
protected AccessType access
Annotations
@XmlAttribute
name:access
@XmlJavaTypeAdapter:Adapter1
cascadeback to summary
protected JaxbCascadeType cascade
Annotations
@XmlElement
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
fetchback to summary
protected FetchType fetch
Annotations
@XmlAttribute
name:fetch
@XmlJavaTypeAdapter:Adapter5
foreignKeyback to summary
protected JaxbForeignKey foreignKey
Annotations
@XmlElement
name:foreign-key
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
idback to summary
protected Boolean id
Annotations
@XmlAttribute
name:id
joinColumnback to summary
protected List<JaxbJoinColumn> joinColumn
Annotations
@XmlElement
name:join-column
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
joinTableback to summary
protected JaxbJoinTable joinTable
Annotations
@XmlElement
name:join-table
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
mapsIdback to summary
protected String mapsId
Annotations
@XmlAttribute
name:maps-id
nameback to summary
protected String name
Annotations
@XmlAttribute
name:name
required:true
optionalback to summary
protected Boolean optional
Annotations
@XmlAttribute
name:optional
targetEntityback to summary
protected String targetEntity
Annotations
@XmlAttribute
name:target-entity

Constructor Detail

JaxbManyToOneback to summary
public JaxbManyToOne()

Method Detail

getAccessback to summary
public AccessType getAccess()

Implements org.hibernate.boot.jaxb.mapping.spi.PersistentAttribute.getAccess.

Gets the value of the access property.

Returns:AccessType

possible object is String

getCascadeback to summary
public JaxbCascadeType getCascade()

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.getCascade.

Gets the value of the cascade property.

Returns:JaxbCascadeType

possible object is JaxbCascadeType

getFetchback to summary
public FetchType getFetch()

Implements org.hibernate.boot.jaxb.mapping.spi.FetchableAttribute.getFetch.

Gets the value of the fetch property.

Returns:FetchType

possible object is String

getForeignKeyback to summary
public JaxbForeignKey getForeignKey()

Gets the value of the foreignKey property.

Returns:JaxbForeignKey

possible object is JaxbForeignKey

getJoinColumnback to summary
public List<JaxbJoinColumn> getJoinColumn()

Gets the value of the joinColumn property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a 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 JaxbJoinColumn

getJoinTableback to summary
public JaxbJoinTable getJoinTable()

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.getJoinTable.

Gets the value of the joinTable property.

Returns:JaxbJoinTable

possible object is JaxbJoinTable

getMapsIdback to summary
public String getMapsId()

Gets the value of the mapsId property.

Returns:String

possible object is String

getNameback to summary
public String getName()

Implements org.hibernate.boot.jaxb.mapping.spi.PersistentAttribute.getName.

Gets the value of the name property.

Returns:String

possible object is String

getTargetEntityback to summary
public String getTargetEntity()

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.getTargetEntity.

Gets the value of the targetEntity property.

Returns:String

possible object is String

isIdback to summary
public Boolean isId()

Gets the value of the id property.

Returns:Boolean

possible object is Boolean

isOptionalback to summary
public Boolean isOptional()

Gets the value of the optional property.

Returns:Boolean

possible object is Boolean

setAccessback to summary
public void setAccess(AccessType value)

Implements org.hibernate.boot.jaxb.mapping.spi.PersistentAttribute.setAccess.

Sets the value of the access property.

Parameters
value:AccessType

allowed object is String

setCascadeback to summary
public void setCascade(JaxbCascadeType value)

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.setCascade.

Sets the value of the cascade property.

Parameters
value:JaxbCascadeType

allowed object is JaxbCascadeType

setFetchback to summary
public void setFetch(FetchType value)

Implements org.hibernate.boot.jaxb.mapping.spi.FetchableAttribute.setFetch.

Sets the value of the fetch property.

Parameters
value:FetchType

allowed object is String

setForeignKeyback to summary
public void setForeignKey(JaxbForeignKey value)

Sets the value of the foreignKey property.

Parameters
value:JaxbForeignKey

allowed object is JaxbForeignKey

setIdback to summary
public void setId(Boolean value)

Sets the value of the id property.

Parameters
value:Boolean

allowed object is Boolean

setJoinTableback to summary
public void setJoinTable(JaxbJoinTable value)

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.setJoinTable.

Sets the value of the joinTable property.

Parameters
value:JaxbJoinTable

allowed object is JaxbJoinTable

setMapsIdback to summary
public void setMapsId(String value)

Sets the value of the mapsId property.

Parameters
value:String

allowed object is String

setNameback to summary
public void setName(String value)

Sets the value of the name property.

Parameters
value:String

allowed object is String

setOptionalback to summary
public void setOptional(Boolean value)

Sets the value of the optional property.

Parameters
value:Boolean

allowed object is Boolean

setTargetEntityback to summary
public void setTargetEntity(String value)

Implements org.hibernate.boot.jaxb.mapping.spi.AssociationAttribute.setTargetEntity.

Sets the value of the targetEntity property.

Parameters
value:String

allowed object is String