|
||||||||||
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>
com.j256.ormlite.dao.EagerForeignCollection<T,ID>
public class EagerForeignCollection<T,ID>
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).
Field Summary |
---|
Fields inherited from class com.j256.ormlite.dao.BaseForeignCollection |
---|
dao, preparedQuery |
Constructor Summary | |
---|---|
EagerForeignCollection(Dao<T,ID> dao,
String fieldName,
Object fieldValue)
|
Method Summary | ||
---|---|---|
boolean |
add(T data)
|
|
boolean |
addAll(Collection<? extends T> collection)
|
|
void |
clear()
Uses the iterator to run through the dao and delete all of the items. |
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
boolean |
equals(Object other)
|
|
int |
hashCode()
|
|
boolean |
isEmpty()
|
|
CloseableIterator<T> |
iterator()
Like Collection.iterator() but returns a closeable iterator instead. |
|
CloseableIterator<T> |
iteratorThrow()
Like Collection.iterator() but returns a closeable iterator instead and can throw a SQLException. |
|
boolean |
remove(Object data)
|
|
boolean |
removeAll(Collection<?> collection)
|
|
boolean |
retainAll(Collection<?> collection)
Uses the iterator to run through the dao and retain only the items that are in the passed in collection. |
|
int |
size()
|
|
Object[] |
toArray()
|
|
|
toArray(E[] array)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EagerForeignCollection(Dao<T,ID> dao, String fieldName, Object fieldValue) throws SQLException
SQLException
Method Detail |
---|
public CloseableIterator<T> iterator()
ForeignCollection
Collection.iterator()
but returns a closeable iterator instead. This may throw
RuntimeException
if there is any SQL exceptions unfortunately.
iterator
in interface ForeignCollection<T>
iterator
in interface Iterable<T>
iterator
in interface Collection<T>
public CloseableIterator<T> iteratorThrow()
ForeignCollection
Collection.iterator()
but returns a closeable iterator instead and can throw a SQLException.
iteratorThrow
in interface ForeignCollection<T>
public int size()
size
in interface Collection<T>
public boolean isEmpty()
isEmpty
in interface Collection<T>
public boolean contains(Object o)
contains
in interface Collection<T>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T>
public Object[] toArray()
toArray
in interface Collection<T>
public <E> E[] toArray(E[] array)
toArray
in interface Collection<T>
public boolean add(T data)
add
in interface Collection<T>
add
in class BaseForeignCollection<T,ID>
public boolean addAll(Collection<? extends T> collection)
addAll
in interface Collection<T>
addAll
in class BaseForeignCollection<T,ID>
public boolean remove(Object data)
remove
in interface Collection<T>
remove
in class BaseForeignCollection<T,ID>
public boolean removeAll(Collection<?> collection)
removeAll
in interface Collection<T>
removeAll
in class BaseForeignCollection<T,ID>
public boolean retainAll(Collection<?> collection)
BaseForeignCollection
retainAll
in interface Collection<T>
retainAll
in class BaseForeignCollection<T,ID>
public void clear()
BaseForeignCollection
clear
in interface Collection<T>
clear
in class BaseForeignCollection<T,ID>
public boolean equals(Object other)
equals
in interface Collection<T>
equals
in class Object
public int hashCode()
hashCode
in interface Collection<T>
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |