public abstract class AbstractDBQueryBuilder<T extends DBData>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Member |
author |
protected boolean |
counting |
protected org.hibernate.criterion.Order |
defaultOrder |
protected int |
firstResult |
protected int |
maxResults |
protected boolean |
noPaging |
protected org.hibernate.criterion.Order |
order |
Constructor and Description |
---|
AbstractDBQueryBuilder() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAuthorCriterion(org.hibernate.Criteria criteria)
Add the author criterion
|
protected abstract void |
addCriterions(org.hibernate.Criteria criteria)
To override to add the custom criterion
|
AbstractDBQueryBuilder<T> |
author(Member author) |
org.hibernate.Criteria |
build() |
int |
count() |
protected AbstractDBQueryBuilder |
counting(boolean counting) |
protected org.hibernate.Criteria |
createCriteria(int firstResult,
int maxResults) |
T |
first() |
AbstractDBQueryBuilder<T> |
firstResult(int firstResult) |
protected java.lang.Class<T> |
getDBDataClass() |
java.util.List<T> |
list() |
AbstractDBQueryBuilder<T> |
maxResults(int maxResults) |
AbstractDBQueryBuilder<T> |
noPaging()
Force no paging for this criteria
|
AbstractDBQueryBuilder<T> |
orderBy(org.hibernate.criterion.Order order) |
org.hibernate.ScrollableResults |
scroll() |
org.hibernate.ScrollableResults |
scroll(org.hibernate.ScrollMode scrollMode,
int fetchSize) |
protected void |
setDefaultOrder(org.hibernate.criterion.Order defaultOrder)
Sets the default order to use if no order has been defined.
|
protected Member author
protected int firstResult
protected int maxResults
protected org.hibernate.criterion.Order order
protected org.hibernate.criterion.Order defaultOrder
protected boolean counting
protected boolean noPaging
protected java.lang.Class<T> getDBDataClass()
protected void setDefaultOrder(org.hibernate.criterion.Order defaultOrder)
defaultOrder
- the default order.public AbstractDBQueryBuilder<T> author(Member author)
author
- the authorpublic AbstractDBQueryBuilder<T> firstResult(int firstResult)
firstResult
- set the first pubLink to retrieve. If <= 0, rows will be retrieved beginning from first pubLink.public AbstractDBQueryBuilder<T> maxResults(int maxResults)
maxResults
- set the maximum pubLink to retrieve. If < 0, there is no limit to the number of pubLink retrieved.public AbstractDBQueryBuilder<T> noPaging()
public AbstractDBQueryBuilder<T> orderBy(org.hibernate.criterion.Order order)
order
- the orderprotected AbstractDBQueryBuilder counting(boolean counting)
public org.hibernate.Criteria build()
protected org.hibernate.Criteria createCriteria(int firstResult, int maxResults)
protected abstract void addCriterions(org.hibernate.Criteria criteria)
criteria
- the Criteriaprotected void addAuthorCriterion(org.hibernate.Criteria criteria)
criteria
- the Criteriapublic java.util.List<T> list()
public T first()
public int count()
public org.hibernate.ScrollableResults scroll()
public org.hibernate.ScrollableResults scroll(org.hibernate.ScrollMode scrollMode, int fetchSize)
scrollMode
- the scroll modefetchSize
- the fetch sizeCopyright © 2001-2021 Jalios SA. All Rights Reserved.