Class HibernateRepository<T,ID extends Serializable>

java.lang.Object
dev.relism.flash.ext.data.core.RepositorySupport<T,ID>
dev.relism.flash.ext.data.core.Repository<T,ID>
dev.relism.flash.ext.data.hibernate.HibernateRepository<T,ID>

public abstract class HibernateRepository<T,ID extends Serializable> extends dev.relism.flash.ext.data.core.Repository<T,ID>
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    HibernateRepository(dev.relism.flash.ext.data.core.Tx tx, Class<T> type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected long
     
    protected void
    doDelete(T entity)
     
    protected int
    doDeleteAll(dev.relism.flash.ext.data.core.Spec<T> spec)
     
    protected void
     
    protected boolean
     
    protected List<T>
    doFind(dev.relism.flash.ext.data.core.Query<T> query)
     
    protected Optional<T>
     
    protected Optional<T>
    doFindOne(dev.relism.flash.ext.data.core.Spec<T> spec)
     
    protected dev.relism.flash.ext.data.core.Page<T>
    doFindPage(dev.relism.flash.ext.data.core.Query<T> query)
     
    protected T
    doSave(T entity)
     
    protected List<T>
    doSaveAll(Iterable<T> entities)
     
    protected T
    doUpdate(T entity)
     
    protected int
    doUpdateAll(dev.relism.flash.ext.data.core.Spec<T> spec, T patch)
     
    protected Class<T>
     
    protected <R> List<R>
    hql(String hql, Class<R> resultType, Consumer<jakarta.persistence.TypedQuery<R>> params)
     
    protected List<T>
    hql(String hql, Consumer<jakarta.persistence.TypedQuery<T>> params)
     
    protected int
    hqlMutate(String hql, Consumer<org.hibernate.query.MutationQuery> params)
     
    protected org.hibernate.Session
     

    Methods inherited from class dev.relism.flash.ext.data.core.Repository

    count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAll, findAll, findAll, findAll, findAll, findById, findOne, findPage, findPage, findPage, save, saveAll, update, updateAll

    Methods inherited from class dev.relism.flash.ext.data.core.RepositorySupport

    roQuery, rwQuery, tx

    Methods inherited from class java.lang.Object

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

    • HibernateRepository

      protected HibernateRepository(dev.relism.flash.ext.data.core.Tx tx, Class<T> type)
  • Method Details

    • session

      protected org.hibernate.Session session()
    • doFindById

      protected Optional<T> doFindById(ID id)
      Specified by:
      doFindById in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doFind

      protected List<T> doFind(dev.relism.flash.ext.data.core.Query<T> query)
      Specified by:
      doFind in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doFindOne

      protected Optional<T> doFindOne(dev.relism.flash.ext.data.core.Spec<T> spec)
      Specified by:
      doFindOne in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doFindPage

      protected dev.relism.flash.ext.data.core.Page<T> doFindPage(dev.relism.flash.ext.data.core.Query<T> query)
      Specified by:
      doFindPage in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doExistsById

      protected boolean doExistsById(ID id)
      Specified by:
      doExistsById in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doCount

      protected long doCount()
      Specified by:
      doCount in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doSave

      protected T doSave(T entity)
      Specified by:
      doSave in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doSaveAll

      protected List<T> doSaveAll(Iterable<T> entities)
      Specified by:
      doSaveAll in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doUpdate

      protected T doUpdate(T entity)
      Specified by:
      doUpdate in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doDelete

      protected void doDelete(T entity)
      Specified by:
      doDelete in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doDeleteById

      protected void doDeleteById(ID id)
      Specified by:
      doDeleteById in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doDeleteAll

      protected int doDeleteAll(dev.relism.flash.ext.data.core.Spec<T> spec)
      Specified by:
      doDeleteAll in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • doUpdateAll

      protected int doUpdateAll(dev.relism.flash.ext.data.core.Spec<T> spec, T patch)
      Specified by:
      doUpdateAll in class dev.relism.flash.ext.data.core.Repository<T,ID extends Serializable>
    • hql

      protected List<T> hql(String hql, Consumer<jakarta.persistence.TypedQuery<T>> params)
    • hql

      protected <R> List<R> hql(String hql, Class<R> resultType, Consumer<jakarta.persistence.TypedQuery<R>> params)
    • hqlMutate

      protected int hqlMutate(String hql, Consumer<org.hibernate.query.MutationQuery> params)
    • entityType

      protected Class<T> entityType()