|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=FIELD) @Retention(value=RUNTIME) public @interface ForeignCollectionField
Annotation that identifies a ForeignCollection
field in a class that corresponds to objects in a foreign
table that match the foreign-id of the current class.
@ForeignCollection(id = true) private ForeignCollection<Order> orders;
Optional Element Summary | |
---|---|
String |
columnName
The name of the column. |
boolean |
eager
Set to true if the collection is a an eager collection where all of the results should be retrieved when the parent object is retrieved. |
int |
maxEagerForeignCollectionLevel
Set this to be the number of times to expand an eager foreign collection's foreign collection. |
String |
orderColumnName
The name of the column in the object that we should order by. |
public abstract boolean eager
NOTE: If this is false (i.e. we have a lazy collection) then a connection is held open to the database as
you iterate through the collection. This means that you need to make sure it is closed when you finish. See
LazyForeignCollection.iterator()
for more information.
public abstract int maxEagerForeignCollectionLevel
public abstract String columnName
Dao.getEmptyForeignCollection(String)
or when you want to specify it in
QueryBuilder.selectColumns(String...)
.
public abstract String orderColumnName
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |