This element is used to define a particular select or retrieve query. It supports the following -
Key |
Relation Type |
Purpose |
---|---|---|
id |
Attribute |
A unique Id with which this query is identified within the Logical Data Source! |
parameterMap |
Attribute |
This is a pointer to the id of the parameterMap defined within the Logical Data Source. |
parameterClass |
Attribute |
This contains the fully defined class name of the object that provides the parameters to be used for the select DML. Either parameterClass or parameterMap should be used. Not both. |
resultMap |
Attribute |
This is a pointer to the id of the resultMap defined within the Logical Data Source. |
resultClass |
Attribute |
This contains the fully defined class name of the object that is the holder for result set for the select DML. Either resultClass or resultMap should be used. Not both. |
include |
Child Element |
This is used to include a pre defined SQL item into the query at any position. |
The following code segment is a sample definition:
<select id="DEFAULT_SELECT" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT 1 FROM DUAL WHERE 1=1
<include refid="FILTER_CLAUSE" />
</select>