|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zeroexchange.dataset.criteria.CriteriaDataSet<T>
public abstract class CriteriaDataSet<T extends Persistent>
The criteria-based data set.
Constructor Summary | |
---|---|
CriteriaDataSet(Class<T> itemClass)
|
Method Summary | |
---|---|
protected abstract org.hibernate.Criteria |
createBaseCriteria()
Creates the base items criteria. |
protected org.hibernate.Criteria |
createCountCriteria()
Override in subclasses if needed. |
protected org.hibernate.Criteria |
createListCriteria(long start,
long count)
Override in subclasses if needed. |
long |
getCount()
|
Class<T> |
getItemClass()
Returns item class. |
long |
getStart()
|
long |
getTotalCount()
Returns total count of items could be returned by the current dataset. |
Iterator<T> |
iterator()
|
protected void |
processCriteria(org.hibernate.Criteria criteria,
boolean count)
Extension point to process criteria. |
void |
setCount(long count)
Sets the max size of fetching fragment. |
void |
setStart(long start)
Sets the start index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CriteriaDataSet(Class<T> itemClass)
Method Detail |
---|
public long getTotalCount()
getTotalCount
in interface DataSet<T extends Persistent>
public void setStart(long start)
setStart
in interface SlicingDataSet<T extends Persistent>
public void setCount(long count)
setCount
in interface SlicingDataSet<T extends Persistent>
public long getStart()
public long getCount()
public Iterator<T> iterator()
iterator
in interface Iterable<T extends Persistent>
protected org.hibernate.Criteria createCountCriteria()
protected void processCriteria(org.hibernate.Criteria criteria, boolean count)
protected org.hibernate.Criteria createListCriteria(long start, long count)
public Class<T> getItemClass()
getItemClass
in interface DataSet<T extends Persistent>
protected abstract org.hibernate.Criteria createBaseCriteria()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |