|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface Linked
Links an attribute to the the results of an entity available in a Results instance.
Regular attributes of any type are allowed if the results associated are expected to contain a single value. If there
are multiple results the annotated attribute can be declared as an array or a collection type.
If linking to a Map, you must add the Group annotation to the attribute to configure how the
keys should be populated. The configuration in this Linked annotation will be used to populate the values of the map.
Group,
Results,
Result| Optional Element Summary | |
|---|---|
Class |
container
Provides the type of the collection to be instantiated for this linked attribute (if applicable). |
String |
entity
The name of the entity in the Results instance whose rows will be read
to generate instances of the given type(). |
Class |
type
The type of object that should be created for each Result associated with
the given entity() name. |
public abstract String entity
Results instance whose rows will be read
to generate instances of the given type(). If empty, the name of the attribute will be used as the
entity name.
public abstract Class type
Result associated with
the given entity() name. Defaults to the actual attribute type. A type must be provided explicitly if
the attribute is a collection.
public abstract Class container
Set or Collection initialized with a new HashSetList initialized with a new ArrayList
type()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||