Class CommonJPADAO<E,K extends Serializable>

java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<E,K>
org.exoplatform.task.dao.jpa.CommonJPADAO<E,K>
All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<E,K>
Direct Known Subclasses:
CommentDAOImpl, LabelDAOImpl, LabelTaskMappingDAOImpl, ProjectDAOImpl, StatusDAOImpl, TaskDAOImpl, TaskLogDAOImpl, UserSettingDAO

public abstract class CommonJPADAO<E,K extends Serializable> extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<E,K>
Author:
Tuyen Nguyen The.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl

    modelClass
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javax.persistence.criteria.Path
    buildPath(SingleCondition condition, javax.persistence.criteria.Root<E> root)
     
    protected javax.persistence.criteria.Predicate
    buildQuery(Condition condition, javax.persistence.criteria.Root<E> root, javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.CriteriaQuery query)
     
    protected <T> javax.persistence.criteria.Predicate
    buildSingleCondition(SingleCondition<T> condition, javax.persistence.criteria.Root<E> root, javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.CriteriaQuery query)
     
    protected <E> List<E>
     
    protected <E> E
     
    create(E entity)
     
    find(K id)
     
    protected org.exoplatform.commons.utils.ListAccess<E>
    findEntities(Query query, Class<E> clazz)
     
     

    Methods inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl

    count, createAll, delete, deleteAll, deleteAll, findAll, getEntityManager, getHibernateDialect, isMSSQLDialect, isOrcaleDialect, update, updateAll

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • CommonJPADAO

      public CommonJPADAO()
  • Method Details

    • cloneEntities

      protected <E> List<E> cloneEntities(List<E> list)
    • cloneEntity

      protected <E> E cloneEntity(E e)
    • find

      public E find(K id)
      Specified by:
      find in interface org.exoplatform.commons.api.persistence.GenericDAO<E,K extends Serializable>
      Overrides:
      find in class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<E,K extends Serializable>
    • create

      public E create(E entity)
      Specified by:
      create in interface org.exoplatform.commons.api.persistence.GenericDAO<E,K extends Serializable>
      Overrides:
      create in class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<E,K extends Serializable>
    • findEntities

      protected org.exoplatform.commons.utils.ListAccess<E> findEntities(Query query, Class<E> clazz)
    • buildQuery

      protected javax.persistence.criteria.Predicate buildQuery(Condition condition, javax.persistence.criteria.Root<E> root, javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.CriteriaQuery query)
    • buildSingleCondition

      protected <T> javax.persistence.criteria.Predicate buildSingleCondition(SingleCondition<T> condition, javax.persistence.criteria.Root<E> root, javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.CriteriaQuery query)
    • buildPath

      protected javax.persistence.criteria.Path buildPath(SingleCondition condition, javax.persistence.criteria.Root<E> root)
    • getCache

      public Map<String,Class> getCache()