Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide

- Previous: E
- Next: G

# F

## fetched-with

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.

### Superelements

cmp-field-mapping, cmr-field-mapping (`sun-cmp-mappings.xml`)

### Subelements

The following table describes subelements for the `fetched-with` element.

Table A–46 `fetched-with` Subelements

Element | Required | Description
--- | --- | ---
default | 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.
level | exactly one subelement is required | Specifies the level number of a hierarchical fetch group.
named-group | exactly one subelement is required | Specifies the name of an independent fetch group.
none | 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.

## field-name

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.

### Superelements

cmp-field-mapping (`sun-cmp-mappings.xml`)

### Subelements

none - contains data

## finder

Describes the finders for CMP 1.1 with a method name and query.

### Superelements

one-one-finders (`sun-ejb-jar.xml`)

### Subelements

The following table describes subelements for the `finder` element.

Table A–47 `finder` Subelements

Element | Required | Description
--- | --- | ---
method-name | only one | Specifies the method name for the finder.
query-params | zero or one | Specifies the query parameters for the CMP 1.1 finder.
query-filter | zero or one | Specifies the query filter for the CMP 1.1 finder.
query-variables | zero or one | Specifies variables in query expression for the CMP 1.1 finder.
query-ordering | zero or one | Specifies the query ordering for the CMP 1.1 finder.

## flush-at-end-of-method

Specifies the methods that force a database flush after execution. Applicable to entity beans.

### Superelements

ejb (`sun-ejb-jar.xml`)

### Subelements

The following table describes subelements for the `flush-at-end-of-method` element.

Table A–48 `flush-at-end-of-method` Subelements

Element | Required | Description
--- | --- | ---
method | one or more | Specifies a bean method.

- Previous: E
- Next: G

- © 2010, Oracle Corporation and/or its affiliates