|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.util.jpa.JPAGenericDAO<K,E>
fr.paris.lutece.portal.service.jpa.JPALuteceDAO<K,E>
fr.paris.lutece.plugins.userban.dao.AbstractDAO<K,E>
K - the class for entity KeyE - the entity classpublic abstract class AbstractDAO<K,E>
The abstract class for all DAO
| Field Summary | |
|---|---|
static String |
LIKE_ENCLOSING
|
static org.apache.log4j.Logger |
LOGGER
|
| Constructor Summary | |
|---|---|
AbstractDAO()
|
|
| Method Summary | ||
|---|---|---|
protected void |
addRestriction(javax.persistence.criteria.CriteriaQuery<?> query,
javax.persistence.criteria.Expression<Boolean> exp)
Add a predicate to an existing query |
|
static String |
buildCriteriaLikeString(String strToEnclose)
Encloses string with percent "%" |
|
protected void |
buildCriteriaQuery(AbstractFilter<K> filter,
javax.persistence.criteria.Root<E> root,
javax.persistence.criteria.CriteriaQuery<E> query,
javax.persistence.criteria.CriteriaBuilder builder)
the method to implement to add the constraint |
|
protected void |
buildSortQuery(AbstractFilter<K> filter,
javax.persistence.criteria.Root<E> root,
javax.persistence.criteria.CriteriaQuery<E> query,
javax.persistence.criteria.CriteriaBuilder builder)
Add the order by parameter to the query. |
|
protected
|
createPagedQuery(javax.persistence.criteria.CriteriaQuery<T> criteriaQuery,
PaginationProperties paginationProperties)
Generate count query from criteria query and return a paged query. |
|
ResultList<E> |
find(AbstractFilter<K> filter,
Class<E> type,
PaginationProperties paginationProperties)
Find the bean which correspond to the filter given |
|
ResultList<E> |
findAll(PaginationProperties paginationProperties)
Return all entities paged. |
|
| Methods inherited from class fr.paris.lutece.portal.service.jpa.JPALuteceDAO |
|---|
createNativeQuery, getEntityManagerFactory, getPluginName |
| Methods inherited from class fr.paris.lutece.util.jpa.JPAGenericDAO |
|---|
create, detach, findAll, findById, flush, getEM, getEntityClass, getEntityClassName, remove, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface fr.paris.lutece.util.jpa.IGenericDAO |
|---|
create, detach, findAll, findById, flush, remove, update |
| Field Detail |
|---|
public static final org.apache.log4j.Logger LOGGER
public static final String LIKE_ENCLOSING
| Constructor Detail |
|---|
public AbstractDAO()
| Method Detail |
|---|
protected void buildCriteriaQuery(AbstractFilter<K> filter,
javax.persistence.criteria.Root<E> root,
javax.persistence.criteria.CriteriaQuery<E> query,
javax.persistence.criteria.CriteriaBuilder builder)
filter - the bean filterroot - the table rootquery - the criteria querybuilder - the criteria builder
protected <T> PagedQuery<E> createPagedQuery(javax.persistence.criteria.CriteriaQuery<T> criteriaQuery,
PaginationProperties paginationProperties)
T - the generic type of criteria querycriteriaQuery - criteria querypaginationProperties - pagination data
public ResultList<E> findAll(PaginationProperties paginationProperties)
findAll in interface IAbstractDAO<K,E>paginationProperties - properties for pagination
protected void addRestriction(javax.persistence.criteria.CriteriaQuery<?> query,
javax.persistence.criteria.Expression<Boolean> exp)
query - existing queryexp - restriction
protected void buildSortQuery(AbstractFilter<K> filter,
javax.persistence.criteria.Root<E> root,
javax.persistence.criteria.CriteriaQuery<E> query,
javax.persistence.criteria.CriteriaBuilder builder)
filter - the filterroot - the offer rootquery - the criteria querybuilder - the criteria builder
public ResultList<E> find(AbstractFilter<K> filter,
Class<E> type,
PaginationProperties paginationProperties)
IAbstractDAO
find in interface IAbstractDAO<K,E>filter - the filter to usetype - the type class of the beanpaginationProperties - the pagination properties
public static String buildCriteriaLikeString(String strToEnclose)
strToEnclose - string to enclose
"%" + strToEnclose + "%"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||