|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.avaje.ebean.common.AbstractBeanCollection<E>
public abstract class AbstractBeanCollection<E>
Base class for List Set and Map implementations of BeanCollection.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.avaje.ebean.bean.BeanCollection |
|---|
BeanCollection.ModifyListenMode |
| Field Summary |
|---|
| Fields inherited from interface com.avaje.ebean.bean.BeanCollection |
|---|
DEFAULT, READONLY, SHARED |
| Constructor Summary | |
|---|---|
AbstractBeanCollection()
Constructor not non-lazy loading collection. |
|
AbstractBeanCollection(BeanCollectionLoader loader,
Object ownerBean,
String propertyName)
Used to create deferred fetch proxy. |
|
| Method Summary | |
|---|---|
void |
backgroundFetchWait()
Wait for the fetch to complete. |
void |
backgroundFetchWait(long wait,
TimeUnit timeUnit)
Wait for the fetch to complete with a given timeout. |
ExpressionList<?> |
getFilterMany()
Return the filter (if any) that was used in building this collection. |
int |
getLoaderIndex()
Return the index position of this collection in the lazy/query loader. |
Set<E> |
getModifyAdditions()
Return the list of objects added to the list set or map. |
Set<E> |
getModifyRemovals()
Return the list of objects removed from the list set or map. |
Object |
getOwnerBean()
Return the bean that owns this collection. |
String |
getPropertyName()
Return the bean property name this collection represents. |
boolean |
hasMoreRows()
Set to true if maxRows was hit and there are actually more rows available. |
boolean |
isFinishedFetch()
Returns true if the fetch has finished. |
boolean |
isReadOnly()
Return true if the collection should be treated as readOnly and no elements can be added or removed etc. |
boolean |
isSharedInstance()
Return true if this collection is owned by a sharedInstance. |
void |
modifyAddition(E bean)
Add an object to the additions list. |
void |
modifyRemoval(Object bean)
Add an object to the deletions list. |
void |
modifyReset()
Reset the set of additions and deletions. |
void |
setBackgroundFetch(Future<Integer> fetchFuture)
Set when this collection is being loaded via a background thread. |
void |
setBeanCollectionTouched(BeanCollectionTouched notify)
Set a listener to be notified when the BeanCollection is first touched. |
void |
setFilterMany(ExpressionList<?> filterMany)
Set the filter that was used in building this collection. |
void |
setFinishedFetch(boolean finishedFetch)
Set to true when a fetch has finished. |
void |
setHasMoreRows(boolean hasMoreRows)
Set to true when maxRows is hit but there are actually more rows available. |
void |
setLoader(int beanLoaderIndex,
BeanCollectionLoader loader)
Set the loader that will be used to lazy/query load this collection. |
void |
setModifyListening(BeanCollection.ModifyListenMode mode)
set modifyListening to be on or off. |
void |
setReadOnly(boolean readOnly)
Set to true if you want the BeanCollection to be treated as read only. |
void |
setSharedInstance()
Set when this collection is owned by a sharedInstance. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.avaje.ebean.bean.BeanCollection |
|---|
checkEmptyLazyLoad, getActualCollection, getActualDetails, internalAdd, isEmpty, isPopulated, size |
| Constructor Detail |
|---|
public AbstractBeanCollection()
public AbstractBeanCollection(BeanCollectionLoader loader,
Object ownerBean,
String propertyName)
| Method Detail |
|---|
public Object getOwnerBean()
BeanCollection
getOwnerBean in interface BeanCollection<E>public String getPropertyName()
BeanCollection
getPropertyName in interface BeanCollection<E>public int getLoaderIndex()
BeanCollectionUsed for batch loading of collections.
getLoaderIndex in interface BeanCollection<E>public ExpressionList<?> getFilterMany()
BeanCollectionThis is so that the filter can be applied on refresh.
getFilterMany in interface BeanCollection<E>public void setFilterMany(ExpressionList<?> filterMany)
BeanCollection
setFilterMany in interface BeanCollection<E>public void setBeanCollectionTouched(BeanCollectionTouched notify)
BeanCollection
setBeanCollectionTouched in interface BeanCollection<E>
public void setLoader(int beanLoaderIndex,
BeanCollectionLoader loader)
BeanCollection
setLoader in interface BeanCollection<E>public boolean isSharedInstance()
BeanCollectionThat is, return true if it is a Many property of a bean in the cache.
isSharedInstance in interface BeanCollection<E>public void setSharedInstance()
BeanCollectionThat is, it is a Many property on a bean in the cache.
setSharedInstance in interface BeanCollection<E>public boolean isReadOnly()
BeanCollection
isReadOnly in interface BeanCollection<E>public void setReadOnly(boolean readOnly)
BeanCollection
setReadOnly in interface BeanCollection<E>public boolean hasMoreRows()
Can be used by client code that is paging through results using setFirstRow() setMaxRows(). If this returns true then the client can display a 'next' button etc.
hasMoreRows in interface BeanCollection<E>public void setHasMoreRows(boolean hasMoreRows)
setHasMoreRows in interface BeanCollection<E>public boolean isFinishedFetch()
isFinishedFetch in interface BeanCollection<E>public void setFinishedFetch(boolean finishedFetch)
setFinishedFetch in interface BeanCollection<E>public void setBackgroundFetch(Future<Integer> fetchFuture)
BeanCollection
Refer to Query.setBackgroundFetchAfter(int)
setBackgroundFetch in interface BeanCollection<E>
public void backgroundFetchWait(long wait,
TimeUnit timeUnit)
BeanCollection
Refer to Query.setBackgroundFetchAfter(int)
backgroundFetchWait in interface BeanCollection<E>public void backgroundFetchWait()
BeanCollection
Refer to Query.setBackgroundFetchAfter(int)
backgroundFetchWait in interface BeanCollection<E>public void setModifyListening(BeanCollection.ModifyListenMode mode)
setModifyListening in interface BeanCollection<E>public void modifyAddition(E bean)
BeanCollectionThis will potentially end up as an insert into a intersection table for a ManyToMany.
modifyAddition in interface BeanCollection<E>public void modifyRemoval(Object bean)
BeanCollectionThis will potentially end up as an delete from an intersection table for a ManyToMany.
modifyRemoval in interface BeanCollection<E>public void modifyReset()
BeanCollection
modifyReset in interface BeanCollection<E>public Set<E> getModifyAdditions()
BeanCollection
getModifyAdditions in interface BeanCollection<E>public Set<E> getModifyRemovals()
BeanCollection
getModifyRemovals in interface BeanCollection<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||