Query
This type is a class for model objects.
The query element is used to specify 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; a specification of the return type mapping, if any, if the query is for a select method; and 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.
Package: ejb
Classifier ID: -1
Instance class name: * Unspecified *
Instance class: * Unspecified *
Reference attributes having this type:
QueryMethod.query
Collection attributes having this type:
ContainerManagedEntity.queries
Attributes Summary description : EString @version J2EE1.4 deprecated, becomes descriptions The description is used by the ejb-jar file producer to provide text describing the query. The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. ejbQL : EString Contains the EJB QL query string that defines a finder or select query. This element is defined within the scope of a query element whose contents specify the finder or the select method that uses the query. The content must be a valid EJB QL query string for the entity bean for which the query is specified. The ejb-ql element must be specified for all queries that are expressible in EJB QL. @invariant The value must be a valid EJB QL query string for the entity bean or dependent object class for which the query is specified. @invariant The ejb-ql element must be specified for all queries that are expressible in EJB QL. Example: ejbSelectPendingLineitems SELECT ENTITY(l) FROM LineItems l WHERE l.shipped is FALSE returnTypeMapping : ReturnTypeMapping The return-type-mapping element is used in the query element to specify whether an abstract schema type that is returned by a query for a select method is to be mapped to an EJBLocalObject or EJBObject type. The value of the return-type-mapping element, if specified must be one of the following. queryMethod : QueryMethod @ The query-method element is used to specify the method (DB/SR/CM-"on the home") for a finder or select query. The method-name element specifies the name of a finder or select method in the entity bean's implementation class or a select method in the dependent object class. Each method-param must be defined for a query-method using the method-params element. Used in: query Example: Example: Method finds large orders findLargeOrders SELECT ENTITY(o) FROM Order o WHERE o.amount > 1000 entity : ContainerManagedEntity @ * No description is available * descriptions : Description * * No description is available *
Attribute Details
description - @version J2EE1.4 deprecated, becomes descriptions The description is used by the ejb-jar file producer to provide text describing the query. The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents.
Data Type: EString
Default value: unspecified
Required: false
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
ejbQL - Contains the EJB QL query string that defines a finder or select query. This element is defined within the scope of a query element whose contents specify the finder or the select method that uses the query. The content must be a valid EJB QL query string for the entity bean for which the query is specified. The ejb-ql element must be specified for all queries that are expressible in EJB QL. @invariant The value must be a valid EJB QL query string for the entity bean or dependent object class for which the query is specified. @invariant The ejb-ql element must be specified for all queries that are expressible in EJB QL. Example:ejbSelectPendingLineitems SELECT ENTITY(l) FROM LineItems l WHERE l.shipped is FALSE
Data Type: EString
Default value: unspecified
Required: false
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
returnTypeMapping - The return-type-mapping element is used in the query element to specify whether an abstract schema type that is returned by a query for a select method is to be mapped to an EJBLocalObject or EJBObject type. The value of the return-type-mapping element, if specified must be one of the following.
Data Type: ReturnTypeMapping
Default value: unspecified
Allowed values:
0 - Local
1 - Remote
Required: false
Changeable: true
Unsettable: true
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
queryMethod - The query-method element is used to specify the method (DB/SR/CM-"on the home") for a finder or select query. The method-name element specifies the name of a finder or select method in the entity bean's implementation class or a select method in the dependent object class. Each method-param must be defined for a query-method using the method-params element. Used in: query Example: Example:Method finds large orders findLargeOrders SELECT ENTITY(o) FROM Order o WHERE o.amount > 1000
Reference Type: QueryMethod @
Containment: true
Container: false
Required: true
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 1
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
Opposite: QueryMethod.query
entity - * No description is available *
Reference Type: ContainerManagedEntity @
Containment: false
Container: true
Required: false
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: true
Volatile: false
Opposite: ContainerManagedEntity.queries
descriptions - * No description is available *
Reference Type: Description *
Containment: true
Container: false
Required: false
Changeable: true
Unsettable: false
Many: true
Ordered: true
Lower bound: 0
Upper bound: Unbounded
Unique: true
Derived: false
Transient: false
Volatile: false
(C) COPYRIGHT International Business Machines Corp. 1996-2006