@ws.sbf.query
Scope
Class
Multiplicity
(0..*): You can use this tag zero or more times in any Java source file that implements a CMP entity bean.
Purpose
This tag defines a set of query strings expressed in EJB Query Language (EJB QL) to retrieve a set of value objects. These query strings will be used to retrieve the data and map the results to generated value-objects. Each query string is enclosed in square brackets (“[]”) to denote the beginning and end of a query string. All root objects of the queries should be casted to the correct value-object, using the syntax below.Example:
[select {$DepartmentDeep} as d where d.deptno between ?1 and ?2] [select in(d.emps) as e where e.salary >?3]
Parameters
Parameter Type Applicability Description Mandatory name text All The abstract name of the query to retrieve a set of value objects. The name must be unique to the module and must be a valid Java identifier. The name will be used as the base name for a generated SDO class that will serve as the query root and will itself contain references to the top-level SDOs returned by the query. The name will also be used as the base name for the generated CRUD methods on the session façade. true query text All A set of query strings expressed in EJB QL. These query strings will be used to retrieve the data and map the results to generated value-objects. Each query string is enclosed in square brackets (“[]”) to denote the beginning and end of a query string. All root objects of the queries should be casted to the correct value-object. true read-only boolean All If true, indicates that only read methods should be created on the session façade. Default is false. false
Parent topic
Annotations for session facades and SDOs