Specifies the fetch group configuration for fields and relationships. The fetched-with element has different allowed and default subelements based on its parent element and the data types of the fields.
If there is no fetched-with subelement of a cmp-field-mapping, and the data type is not BLOB, CLOB, VARBINARY, LONGVARBINARY, or OTHER, fetched-with can have any valid subelement. The default subelement is as follows:
<fetched-with><default/></fetched-with>
If there is no fetched-with subelement of a cmp-field-mapping, and the data type is BLOB, CLOB, VARBINARY, LONGVARBINARY, or OTHER, fetched-with can have any valid subelement except <default/>. The default subelement is as follows:
<fetched-with><none/></fetched-with>
If there is no fetched-with subelement of a cmr-field-mapping, fetched-with can have any valid subelement. The default subelement is as follows:
<fetched-with><none/></fetched-with>
Managed fields are multiple CMP or CMR fields that are mapped to the same column. A managed field can have any fetched-with subelement except <default/>. For additional information, see Managed Fields in Sun GlassFish Communications Server 2.0 Developer’s Guide.
cmp-field-mapping, cmr-field-mapping (sun-cmp-mappings.xml)
The following table describes subelements for the fetched-with element.
Table A–47 fetched-with Subelements
Element |
Required |
Description |
---|---|---|
exactly one subelement is required |
Specifies that a CMP field belongs to the default hierarchical fetch group, which means it is fetched any time the bean is loaded from a database. Enables prefetching of a CMR field. |
|
exactly one subelement is required |
Specifies the level number of a hierarchical fetch group. |
|
exactly one subelement is required |
Specifies the name of an independent fetch group. |
|
exactly one subelement is required |
Specifies that this field or relationship is placed into its own individual fetch group, which means it is loaded from a database the first time it is accessed in this transaction. |
Specifies the Java identifier of a field. This identifier must match the value of the field-name subelement of the cmp-field element in the ejb-jar.xml file.
cmp-field-mapping (sun-cmp-mappings.xml)
none - contains data
Describes the finders for CMP 1.1 with a method name and query.
one-one-finders (sun-ejb-jar.xml)
The following table describes subelements for the finder element.
Table A–48 finder Subelements
Element |
Required |
Description |
---|---|---|
only one |
Specifies the method name for the finder. |
|
zero or one |
Specifies the query parameters for the CMP 1.1 finder. |
|
zero or one |
Specifies the query filter for the CMP 1.1 finder. |
|
zero or one |
Specifies variables in query expression for the CMP 1.1 finder. |
|
zero or one |
Specifies the query ordering for the CMP 1.1 finder. |
Specifies the methods that force a database flush after execution. Applicable to entity beans.
ejb (sun-ejb-jar.xml)
The following table describes subelements for the flush-at-end-of-method element.
Table A–49 flush-at-end-of-method Subelements
Element |
Required |
Description |
---|---|---|
one or more |
Specifies a bean method. |