@Test public void testContains() throws Exception { Dao<Eager, Integer> eagerDao = createDao(Eager.class, true); Dao<Foreign, Integer> foreignDao = createDao(Foreign.class, true); Eager eager = new Eager(); assertEquals(1, eagerDao.create(eager)); Foreign f0 = new Foreign(); f0.eager = eager; assertEquals(1, foreignDao.create(f0)); Foreign f1 = new Foreign(); f1.eager = eager; assertEquals(1, foreignDao.create(f1)); Eager result = eagerDao.queryForId(eager.id); for (Foreign foreign : result.foreignCollection) { assertTrue(result.foreignCollection.contains(foreign)); } }
@Override public boolean contains(Object o) { return results.contains(o); }
EagerForeignCollection extends BaseForeignCollection<T, ID> implements CloseableWrappedIterable<T>,
		Serializable { @Override public boolean contains(Object o) { return results.contains(o); } }
EagerForeignCollection extends BaseForeignCollection<T, ID> implements CloseableWrappedIterable<T>,
		Serializable { @Override public boolean contains(Object o) { return results.contains(o); } EagerForeignCollection(Dao<T, ID> dao, Object parent, Object parentId, FieldType foreignFieldType,
			String orderColumn, boolean orderAscending); }
EagerForeignCollection extends BaseForeignCollection<T, ID> implements CloseableWrappedIterable<T>,
		Serializable { @Override public boolean contains(Object o) { return results.contains(o); } EagerForeignCollection(Dao<T, ID> dao, Object parent, Object parentId, FieldType foreignFieldType,
			String orderColumn, boolean orderAscending); @Override CloseableIterator<T> iterator(); @Override CloseableIterator<T> iterator(int flags); @Override CloseableIterator<T> closeableIterator(); @Override CloseableIterator<T> closeableIterator(int flags); @Override CloseableIterator<T> iteratorThrow(); @Override CloseableIterator<T> iteratorThrow(int flags); @Override CloseableWrappedIterable<T> getWrappedIterable(); @Override CloseableWrappedIterable<T> getWrappedIterable(int flags); @Override void close(); @Override void closeLastIterator(); @Override boolean isEager(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override boolean containsAll(Collection<?> c); @Override Object[] toArray(); @Override E[] toArray(E[] array); @Override boolean add(T data); @Override boolean addAll(Collection<? extends T> collection); @Override boolean remove(Object data); @Override boolean removeAll(Collection<?> collection); @Override boolean retainAll(Collection<?> collection); @Override int updateAll(); @Override int refreshAll(); @Override int refreshCollection(); @Override boolean equals(Object obj); @Override int hashCode(); }
EagerForeignCollection extends BaseForeignCollection<T, ID> implements CloseableWrappedIterable<T>,
		Serializable { @Override public boolean contains(Object o) { return results.contains(o); } EagerForeignCollection(Dao<T, ID> dao, Object parent, Object parentId, FieldType foreignFieldType,
			String orderColumn, boolean orderAscending); @Override CloseableIterator<T> iterator(); @Override CloseableIterator<T> iterator(int flags); @Override CloseableIterator<T> closeableIterator(); @Override CloseableIterator<T> closeableIterator(int flags); @Override CloseableIterator<T> iteratorThrow(); @Override CloseableIterator<T> iteratorThrow(int flags); @Override CloseableWrappedIterable<T> getWrappedIterable(); @Override CloseableWrappedIterable<T> getWrappedIterable(int flags); @Override void close(); @Override void closeLastIterator(); @Override boolean isEager(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override boolean containsAll(Collection<?> c); @Override Object[] toArray(); @Override E[] toArray(E[] array); @Override boolean add(T data); @Override boolean addAll(Collection<? extends T> collection); @Override boolean remove(Object data); @Override boolean removeAll(Collection<?> collection); @Override boolean retainAll(Collection<?> collection); @Override int updateAll(); @Override int refreshAll(); @Override int refreshCollection(); @Override boolean equals(Object obj); @Override int hashCode();  }