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

public Class JaxbOneToOne

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

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

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>
          <sequence>
            <element name="primary-key-join-column" type="{http://www.hibernate.org/xsd/orm/mapping}primary-key-join-column" maxOccurs="unbounded" minOccurs="0"/>
            <element name="primary-key-foreign-key" type="{http://www.hibernate.org/xsd/orm/mapping}foreign-key" minOccurs="0"/>
          </sequence>
          <sequence>
            <element name="join-column" type="{http://www.hibernate.org/xsd/orm/mapping}join-column" maxOccurs="unbounded" minOccurs="0"/>
            <element name="foreign-key" type="{http://www.hibernate.org/xsd/orm/mapping}foreign-key" minOccurs="0"/>
          </sequence>
          <element name="join-table" type="{http://www.hibernate.org/xsd/orm/mapping}join-table" minOccurs="0"/>
        </choice>
        <element name="cascade" type="{http://www.hibernate.org/xsd/orm/mapping}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://www.hibernate.org/xsd/orm/mapping}fetch-type" />
      <attribute name="fetch-mode" type="{http://www.hibernate.org/xsd/orm/mapping}singular-fetch-mode" />
      <attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" />
      <attribute name="access" type="{http://www.hibernate.org/xsd/orm/mapping}access-type" />
      <attribute name="attribute-accessor" type="{http://www.w3.org/2001/XMLSchema}string" />
      <attribute name="mapped-by" type="{http://www.w3.org/2001/XMLSchema}string" />
      <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>

Field Summary

Modifier and TypeField and Description
protected AccessType
protected String
protected JaxbCascadeType
protected FetchType
protected JaxbSingularFetchMode
protected JaxbForeignKey
protected Boolean
protected List<JaxbJoinColumn>
protected JaxbJoinTable
protected String
protected String
protected String
protected Boolean
protected Boolean
protected JaxbForeignKey
protected List<JaxbPrimaryKeyJoinColumn>
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.PersistentAttribute.getAccess.

Gets the value of the access property.
public String

Returns:

possible object is String
getAttributeAccessor
()

Implements org.hibernate.boot.jaxb.mapping.PersistentAttribute.getAttributeAccessor.

Gets the value of the attributeAccessor property.
public JaxbCascadeType

Returns:

possible object is JaxbCascadeType
getCascade
()

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

Gets the value of the cascade property.
public FetchType

Returns:

possible object is String
getFetch
()

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

Gets the value of the fetch property.
public JaxbSingularFetchMode

Returns:

possible object is JaxbSingularFetchMode
getFetchMode
()

Implements org.hibernate.boot.jaxb.mapping.ToOneAttribute.getFetchMode.

Gets the value of the fetchMode property.
public JaxbForeignKey

Returns:

possible object is JaxbForeignKey
getForeignKey
()

Gets the value of the foreignKey property.

public List<JaxbJoinColumn>

Returns:

The value of the joinColumn property.
getJoinColumn
()

Gets the value of the joinColumn property.

public JaxbJoinTable

Returns:

possible object is JaxbJoinTable
getJoinTable
()

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

Gets the value of the joinTable property.
public String

Returns:

possible object is String
getMappedBy
()

Gets the value of the mappedBy 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.PersistentAttribute.getName.

Gets the value of the name property.
public JaxbForeignKey

Returns:

possible object is JaxbForeignKey
getPrimaryKeyForeignKey
()

Gets the value of the primaryKeyForeignKey property.

public List<JaxbPrimaryKeyJoinColumn>

Returns:

The value of the primaryKeyJoinColumn property.
getPrimaryKeyJoinColumn
()

Gets the value of the primaryKeyJoinColumn property.

public String

Returns:

possible object is String
getTargetEntity
()

Implements org.hibernate.boot.jaxb.mapping.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 Boolean

Returns:

possible object is Boolean
isOrphanRemoval
()

Gets the value of the orphanRemoval property.

public void
setAccess(AccessType
allowed object is String
value
)

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

Sets the value of the access property.
public void
setAttributeAccessor(String
allowed object is String
value
)

Implements org.hibernate.boot.jaxb.mapping.PersistentAttribute.setAttributeAccessor.

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

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

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

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

Sets the value of the fetch property.
public void
setFetchMode(JaxbSingularFetchMode
allowed object is JaxbSingularFetchMode
value
)

Implements org.hibernate.boot.jaxb.mapping.ToOneAttribute.setFetchMode.

Sets the value of the fetchMode 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.AssociationAttribute.setJoinTable.

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

Sets the value of the mappedBy 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
)

Implements org.hibernate.boot.jaxb.mapping.PersistentAttribute.setName.

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
setOrphanRemoval(Boolean
allowed object is Boolean
value
)

Sets the value of the orphanRemoval property.

public void
setPrimaryKeyForeignKey(JaxbForeignKey
allowed object is JaxbForeignKey
value
)

Sets the value of the primaryKeyForeignKey property.

public void
setTargetEntity(String
allowed object is String
value
)

Implements org.hibernate.boot.jaxb.mapping.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
attributeAccessorback to summary
protected String attributeAccessor
Annotations
@XmlAttribute
name:attribute-accessor
cascadeback to summary
protected JaxbCascadeType cascade
Annotations
@XmlElement
namespace:http://www.hibernate.org/xsd/orm/mapping
fetchback to summary
protected FetchType fetch
Annotations
@XmlAttribute
name:fetch
@XmlJavaTypeAdapter:Adapter9
fetchModeback to summary
protected JaxbSingularFetchMode fetchMode
Annotations
@XmlAttribute
name:fetch-mode
foreignKeyback to summary
protected JaxbForeignKey foreignKey
Annotations
@XmlElement
name:foreign-key
namespace:http://www.hibernate.org/xsd/orm/mapping
idback to summary
protected Boolean id
Annotations
@XmlAttribute
name:id
joinColumnback to summary
protected List<JaxbJoinColumn> joinColumn
Annotations
@XmlElement
name:join-column
namespace:http://www.hibernate.org/xsd/orm/mapping
joinTableback to summary
protected JaxbJoinTable joinTable
Annotations
@XmlElement
name:join-table
namespace:http://www.hibernate.org/xsd/orm/mapping
mappedByback to summary
protected String mappedBy
Annotations
@XmlAttribute
name:mapped-by
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
orphanRemovalback to summary
protected Boolean orphanRemoval
Annotations
@XmlAttribute
name:orphan-removal
primaryKeyForeignKeyback to summary
protected JaxbForeignKey primaryKeyForeignKey
Annotations
@XmlElement
name:primary-key-foreign-key
namespace:http://www.hibernate.org/xsd/orm/mapping
primaryKeyJoinColumnback to summary
protected List<JaxbPrimaryKeyJoinColumn> primaryKeyJoinColumn
Annotations
@XmlElement
name:primary-key-join-column
namespace:http://www.hibernate.org/xsd/orm/mapping
targetEntityback to summary
protected String targetEntity
Annotations
@XmlAttribute
name:target-entity

Constructor Detail

JaxbOneToOneback to summary
public JaxbOneToOne()

Method Detail

getAccessback to summary
public AccessType getAccess()

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

Gets the value of the access property.

Returns:AccessType

possible object is String

getAttributeAccessorback to summary
public String getAttributeAccessor()

Implements org.hibernate.boot.jaxb.mapping.PersistentAttribute.getAttributeAccessor.

Gets the value of the attributeAccessor property.

Returns:String

possible object is String

getCascadeback to summary
public JaxbCascadeType getCascade()

Implements org.hibernate.boot.jaxb.mapping.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.FetchableAttribute.getFetch.

Gets the value of the fetch property.

Returns:FetchType

possible object is String

getFetchModeback to summary
public JaxbSingularFetchMode getFetchMode()

Implements org.hibernate.boot.jaxb.mapping.ToOneAttribute.getFetchMode.

Gets the value of the fetchMode property.

Returns:JaxbSingularFetchMode

possible object is JaxbSingularFetchMode

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 Jakarta XML Binding 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

Returns:List<JaxbJoinColumn>

The value of the joinColumn property.

getJoinTableback to summary
public JaxbJoinTable getJoinTable()

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

Gets the value of the joinTable property.

Returns:JaxbJoinTable

possible object is JaxbJoinTable

getMappedByback to summary
public String getMappedBy()

Gets the value of the mappedBy property.

Returns:String

possible object is String

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.PersistentAttribute.getName.

Gets the value of the name property.

Returns:String

possible object is String

getPrimaryKeyForeignKeyback to summary
public JaxbForeignKey getPrimaryKeyForeignKey()

Gets the value of the primaryKeyForeignKey property.

Returns:JaxbForeignKey

possible object is JaxbForeignKey

getPrimaryKeyJoinColumnback to summary
public List<JaxbPrimaryKeyJoinColumn> getPrimaryKeyJoinColumn()

Gets the value of the primaryKeyJoinColumn 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 Jakarta XML Binding object. This is why there is not a 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 JaxbPrimaryKeyJoinColumn

Returns:List<JaxbPrimaryKeyJoinColumn>

The value of the primaryKeyJoinColumn property.

getTargetEntityback to summary
public String getTargetEntity()

Implements org.hibernate.boot.jaxb.mapping.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

isOrphanRemovalback to summary
public Boolean isOrphanRemoval()

Gets the value of the orphanRemoval property.

Returns:Boolean

possible object is Boolean

setAccessback to summary
public void setAccess(AccessType value)

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

Sets the value of the access property.

Parameters
value:AccessType

allowed object is String

setAttributeAccessorback to summary
public void setAttributeAccessor(String value)

Implements org.hibernate.boot.jaxb.mapping.PersistentAttribute.setAttributeAccessor.

Sets the value of the attributeAccessor property.

Parameters
value:String

allowed object is String

setCascadeback to summary
public void setCascade(JaxbCascadeType value)

Implements org.hibernate.boot.jaxb.mapping.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.FetchableAttribute.setFetch.

Sets the value of the fetch property.

Parameters
value:FetchType

allowed object is String

setFetchModeback to summary
public void setFetchMode(JaxbSingularFetchMode value)

Implements org.hibernate.boot.jaxb.mapping.ToOneAttribute.setFetchMode.

Sets the value of the fetchMode property.

Parameters
value:JaxbSingularFetchMode

allowed object is JaxbSingularFetchMode

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.AssociationAttribute.setJoinTable.

Sets the value of the joinTable property.

Parameters
value:JaxbJoinTable

allowed object is JaxbJoinTable

setMappedByback to summary
public void setMappedBy(String value)

Sets the value of the mappedBy property.

Parameters
value:String

allowed object is String

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)

Implements org.hibernate.boot.jaxb.mapping.PersistentAttribute.setName.

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

setOrphanRemovalback to summary
public void setOrphanRemoval(Boolean value)

Sets the value of the orphanRemoval property.

Parameters
value:Boolean

allowed object is Boolean

setPrimaryKeyForeignKeyback to summary
public void setPrimaryKeyForeignKey(JaxbForeignKey value)

Sets the value of the primaryKeyForeignKey property.

Parameters
value:JaxbForeignKey

allowed object is JaxbForeignKey

setTargetEntityback to summary
public void setTargetEntity(String value)

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

Sets the value of the targetEntity property.

Parameters
value:String

allowed object is String