|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j256.ormlite.dao.BaseForeignCollection<T,ID>
public abstract class BaseForeignCollection<T,ID>
Base collection that is set on a field that as been marked with the ForeignCollectionField annotation when an
object is refreshed or queried (i.e. not created).
WARNING: Most likely for(;;) loops should not be used here since we need to be careful about closing the iterator.
| Field Summary | |
|---|---|
protected Dao<T,ID> |
dao
|
| Constructor Summary | |
|---|---|
protected |
BaseForeignCollection(Dao<T,ID> dao,
String fieldName,
Object fieldValue,
String orderColumn,
Object parent)
|
| Method Summary | |
|---|---|
boolean |
add(T data)
Add an element to the collection. |
boolean |
addAll(Collection<? extends T> collection)
Add the collection of elements to this collection. |
void |
clear()
Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection from the associated database table. |
protected PreparedQuery<T> |
getPreparedQuery()
|
abstract boolean |
remove(Object data)
Remove the item from the collection and the associated database table. |
abstract boolean |
removeAll(Collection<?> collection)
Remove the items in the collection argument from the foreign collection and the associated database table. |
boolean |
retainAll(Collection<?> collection)
Uses the iterator to run through the dao and retain only the items that are in the passed in collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.j256.ormlite.dao.ForeignCollection |
|---|
closeLastIterator, getWrappedIterable, isEager, iteratorThrow |
| Methods inherited from interface java.util.Collection |
|---|
contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArray |
| Methods inherited from interface com.j256.ormlite.dao.CloseableIterable |
|---|
closeableIterator |
| Field Detail |
|---|
protected final transient Dao<T,ID> dao
| Constructor Detail |
|---|
protected BaseForeignCollection(Dao<T,ID> dao,
String fieldName,
Object fieldValue,
String orderColumn,
Object parent)
| Method Detail |
|---|
public boolean add(T data)
add in interface Collection<T>public boolean addAll(Collection<? extends T> collection)
addAll in interface Collection<T>public abstract boolean remove(Object data)
remove in interface Collection<T>public abstract boolean removeAll(Collection<?> collection)
removeAll in interface Collection<T>public boolean retainAll(Collection<?> collection)
retainAll in interface Collection<T>public void clear()
clear in interface Collection<T>
protected PreparedQuery<T> getPreparedQuery()
throws SQLException
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||