org.jboss.shrinkwrap.descriptor.api.ejbjar31
Interface QueryType<T>

All Superinterfaces:
org.jboss.shrinkwrap.descriptor.api.Child<T>
All Known Implementing Classes:
QueryTypeImpl

public interface QueryType<T>
extends org.jboss.shrinkwrap.descriptor.api.Child<T>

This interface defines the contract for the queryType xsd type

Original Documentation:



The queryType defines a finder or select
query. It contains
- an optional description of the query
- the specification of the finder or select
method it is used by
- an optional specification of the result type
mapping, if the query is for a select method
and entity objects are returned.
- the EJB QL query string that defines the query.

Queries that are expressible in EJB QL must use the ejb-ql
element to specify the query. If a query is not expressible
in EJB QL, the description element should be used to
describe the semantics of the query and the ejb-ql element
should be empty.

The result-type-mapping is an optional element. It can only
be present if the query-method specifies a select method
that returns entity objects. The default value for the
result-type-mapping element is "Local".


Since:
Generation date :2011-07-19T22:55:02.759+02:00
Author:
Ralf Battenfeld

Method Summary
 java.lang.String getDescription()
          Returns the description element
 java.lang.String getEjbQl()
          Returns the ejb-ql element
 ResultTypeMappingType getResultTypeMapping()
          Returns the result-type-mapping element
 java.lang.String getResultTypeMappingAsString()
          Returns the result-type-mapping element
 QueryMethodType<QueryType<T>> queryMethod()
          If not already created, a new query-method element will be created and returned.
 QueryType<T> removeDescription()
          Removes the description element
 QueryType<T> removeEjbQl()
          Removes the ejb-ql element
 QueryType<T> removeQueryMethod()
          Removes the query-method element
 QueryType<T> setDescription(java.lang.String description)
          If not already created, a new description element with the given value will be created.
 QueryType<T> setEjbQl(java.lang.String ejbQl)
          If not already created, a new ejb-ql element with the given value will be created.
 QueryType<T> setResultTypeMapping(ResultTypeMappingType resultTypeMapping)
          If not already created, a new result-type-mapping element with the given value will be created.
 QueryType<T> setResultTypeMapping(java.lang.String resultTypeMapping)
          If not already created, a new result-type-mapping element with the given value will be created.
 
Methods inherited from interface org.jboss.shrinkwrap.descriptor.api.Child
up
 

Method Detail

setDescription

QueryType<T> setDescription(java.lang.String description)
If not already created, a new description element with the given value will be created. Otherwise, the existing description element will be updated with the given value.

Returns:
the current instance of QueryType

removeDescription

QueryType<T> removeDescription()
Removes the description element

Returns:
the current instance of QueryType

getDescription

java.lang.String getDescription()
Returns the description element

Returns:
the node defined for the element description

removeQueryMethod

QueryType<T> removeQueryMethod()
Removes the query-method element

Returns:
the current instance of QueryType

queryMethod

QueryMethodType<QueryType<T>> queryMethod()
If not already created, a new query-method element will be created and returned. Otherwise, the existing query-method element will be returned.

Returns:
the node defined for the element query-method

setResultTypeMapping

QueryType<T> setResultTypeMapping(ResultTypeMappingType resultTypeMapping)
If not already created, a new result-type-mapping element with the given value will be created. Otherwise, the existing result-type-mapping element will be updated with the given value.

Returns:
the current instance of QueryType

setResultTypeMapping

QueryType<T> setResultTypeMapping(java.lang.String resultTypeMapping)
If not already created, a new result-type-mapping element with the given value will be created. Otherwise, the existing result-type-mapping element will be updated with the given value.

Returns:
the current instance of QueryType

getResultTypeMapping

ResultTypeMappingType getResultTypeMapping()
Returns the result-type-mapping element

Returns:
the node defined for the element result-type-mapping

getResultTypeMappingAsString

java.lang.String getResultTypeMappingAsString()
Returns the result-type-mapping element

Returns:
the node defined for the element result-type-mapping

setEjbQl

QueryType<T> setEjbQl(java.lang.String ejbQl)
If not already created, a new ejb-ql element with the given value will be created. Otherwise, the existing ejb-ql element will be updated with the given value.

Returns:
the current instance of QueryType

removeEjbQl

QueryType<T> removeEjbQl()
Removes the ejb-ql element

Returns:
the current instance of QueryType

getEjbQl

java.lang.String getEjbQl()
Returns the ejb-ql element

Returns:
the node defined for the element ejb-ql