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

public Class JaxbNamedQuery

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@XmlAccessorType:FIELD
@XmlType
name:named-query
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
propOrder:description, query, lockMode, hint
Imports
java.io.Serializable, java.util.ArrayList, .List, javax.persistence.LockModeType, javax.xml.bind.annotation.XmlAccessType, .XmlAccessorType, .XmlAttribute, .XmlElement, .XmlSchemaType, .XmlType, javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter

@Target({TYPE}) @Retention(RUNTIME) public @interface NamedQuery { String name(); String query(); LockModeType lockMode() default NONE; QueryHint[] hints() default {}; }

Java class for named-query complex type.

The following schema fragment specifies the expected content contained within this class.

<complexType name="named-query">
  <complexContent>
    <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
      <sequence>
        <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
        <element name="query" type="{http://www.w3.org/2001/XMLSchema}string"/>
        <element name="lock-mode" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}lock-mode-type" minOccurs="0"/>
        <element name="hint" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}query-hint" maxOccurs="unbounded" minOccurs="0"/>
      </sequence>
      <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
    </restriction>
  </complexContent>
</complexType>

Field Summary

Modifier and TypeField and Description
protected String
protected List<JaxbQueryHint>
protected LockModeType
protected String
protected String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

possible object is String
getDescription
()

Gets the value of the description property.

public List<JaxbQueryHint>
getHint()

Gets the value of the hint property.

public LockModeType

Returns:

possible object is String
getLockMode
()

Gets the value of the lockMode property.

public String

Returns:

possible object is String
getName
()

Gets the value of the name property.

public String

Returns:

possible object is String
getQuery
()

Gets the value of the query property.

public void
setDescription(String
allowed object is String
value
)

Sets the value of the description property.

public void
setLockMode(LockModeType
allowed object is String
value
)

Sets the value of the lockMode property.

public void
setName(String
allowed object is String
value
)

Sets the value of the name property.

public void
setQuery(String
allowed object is String
value
)

Sets the value of the query property.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descriptionback to summary
protected String description
Annotations
@XmlElement
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
hintback to summary
protected List<JaxbQueryHint> hint
Annotations
@XmlElement
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
lockModeback to summary
protected LockModeType lockMode
Annotations
@XmlElement
name:lock-mode
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
type:String
@XmlJavaTypeAdapter:Adapter8
@XmlSchemaType
name:token
nameback to summary
protected String name
Annotations
@XmlAttribute
name:name
required:true
queryback to summary
protected String query
Annotations
@XmlElement
namespace:http://xmlns.jcp.org/xml/ns/persistence/orm
required:true

Constructor Detail

JaxbNamedQueryback to summary
public JaxbNamedQuery()

Method Detail

getDescriptionback to summary
public String getDescription()

Gets the value of the description property.

Returns:String

possible object is String

getHintback to summary
public List<JaxbQueryHint> getHint()

Gets the value of the hint 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 hint property.

For example, to add a new item, do as follows:

   getHint().add(newItem);

Objects of the following type(s) are allowed in the list JaxbQueryHint

getLockModeback to summary
public LockModeType getLockMode()

Gets the value of the lockMode property.

Returns:LockModeType

possible object is String

getNameback to summary
public String getName()

Gets the value of the name property.

Returns:String

possible object is String

getQueryback to summary
public String getQuery()

Gets the value of the query property.

Returns:String

possible object is String

setDescriptionback to summary
public void setDescription(String value)

Sets the value of the description property.

Parameters
value:String

allowed object is String

setLockModeback to summary
public void setLockMode(LockModeType value)

Sets the value of the lockMode property.

Parameters
value:LockModeType

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

setQueryback to summary
public void setQuery(String value)

Sets the value of the query property.

Parameters
value:String

allowed object is String