Package io.tesler.model.core.dao
Interface JpaDao
-
- All Known Subinterfaces:
BaseDAO
- All Known Implementing Classes:
BaseDAOImpl
,JpaDaoImpl
public interface JpaDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description <T> void
applyGraph(Class<T> clazz, javax.persistence.criteria.Root<T> root, String fetchGraph)
<T> void
applyGraph(javax.persistence.criteria.Root<T> root, javax.persistence.EntityGraph<? super T> fetchGraph)
void
clear()
void
delete(AbstractEntity o)
<T extends BaseEntity>
Tdelete(Class<T> clazz, Long id)
<T> int
delete(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> spec)
void
deleteWithCompositeKey(EmbeddedKeyable o)
Deprecated.<T extends BaseEntity>
Tevict(T o)
<T> boolean
exists(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
<T extends BaseEntity>
TfetchBySpecification(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
<T extends BaseEntity>
TfindById(Class<T> clazz, Long id)
<T extends BaseEntity>
TfindById(String type, Long id)
Deprecated.void
flush()
Long
getCount(Class<?> clazz)
<T> Long
getCount(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
<T> javax.persistence.EntityGraph<? super T>
getEntityGraph(Class<T> clazz, String name)
<T> javax.persistence.metamodel.EntityType<T>
getEntityType(Class<T> cls)
<R,T>
TgetFirstResultOrNull(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
<T> T
getFirstResultOrNull(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
<T> List<Long>
getIds(Class<T> entityClazz, org.springframework.data.jpa.domain.Specification<T> searchSpec)
Deprecated.<R,T>
List<T>getList(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
<T> List<T>
getList(Class<T> clazz)
<T,X>
List<T>getList(Class<T> clazz, javax.persistence.metamodel.SingularAttribute<T,X> name, X value)
Deprecated.<T> List<T>
getList(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
<T> List<T>
getListByIds(Class<T> clazz, List<Long> ids)
<R,T>
ResultPage<T>getPage(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification, PageSpecification page)
<T> ResultPage<T>
getPage(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification, PageSpecification page)
<R,T>
TgetSingleResult(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
<T> T
getSingleResult(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
<R,T>
TgetSingleResultOrNull(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
<T> T
getSingleResultOrNull(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
<R,T>
Stream<T>getStream(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
<T> Stream<T>
getStream(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
void
lock(AbstractEntity entity, javax.persistence.LockModeType lockMode, int timeout)
void
lockAndRefresh(AbstractEntity entity, int timeout)
void
refresh(AbstractEntity o)
void
revert(AbstractEntity entity)
<T> T
save(Object entity)
<T> List<T>
saveAll(List<T> entities)
void
saveWithCompositeKey(EmbeddedKeyable o)
Deprecated.<T> List<T>
selectNativeQuery(Class<T> entityClazz, String sql, Map<String,Object> params)
Deprecated.<T> int
update(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> spec, UpdateSpecification<T> updateSpec)
-
-
-
Method Detail
-
findById
@Deprecated <T extends BaseEntity> T findById(String type, Long id)
Deprecated.
-
findById
<T extends BaseEntity> T findById(Class<T> clazz, Long id)
-
getEntityGraph
<T> javax.persistence.EntityGraph<? super T> getEntityGraph(Class<T> clazz, String name)
-
applyGraph
<T> void applyGraph(javax.persistence.criteria.Root<T> root, javax.persistence.EntityGraph<? super T> fetchGraph)
-
applyGraph
<T> void applyGraph(Class<T> clazz, javax.persistence.criteria.Root<T> root, String fetchGraph)
-
getCount
<T> Long getCount(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
save
<T> T save(Object entity)
-
evict
<T extends BaseEntity> T evict(T o)
-
flush
void flush()
-
refresh
void refresh(AbstractEntity o)
-
delete
void delete(AbstractEntity o)
-
delete
<T extends BaseEntity> T delete(Class<T> clazz, Long id)
-
delete
<T> int delete(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> spec)
-
update
<T> int update(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> spec, UpdateSpecification<T> updateSpec)
-
getList
@Deprecated <T,X> List<T> getList(Class<T> clazz, javax.persistence.metamodel.SingularAttribute<T,X> name, X value)
Deprecated.
-
getList
<T> List<T> getList(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
getPage
<R,T> ResultPage<T> getPage(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification, PageSpecification page)
-
getPage
<T> ResultPage<T> getPage(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification, PageSpecification page)
-
getStream
<T> Stream<T> getStream(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
getStream
<R,T> Stream<T> getStream(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
-
getList
<R,T> List<T> getList(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
-
getSingleResult
<T> T getSingleResult(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
fetchBySpecification
<T extends BaseEntity> T fetchBySpecification(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
getSingleResult
<R,T> T getSingleResult(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
-
getSingleResultOrNull
<T> T getSingleResultOrNull(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
getSingleResultOrNull
<R,T> T getSingleResultOrNull(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
-
getFirstResultOrNull
<T> T getFirstResultOrNull(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
getFirstResultOrNull
<R,T> T getFirstResultOrNull(Class<R> rootClass, Class<T> targetClass, Selector<R,T> selector, org.springframework.data.jpa.domain.Specification<R> specification)
-
exists
<T> boolean exists(Class<T> entityClass, org.springframework.data.jpa.domain.Specification<T> specification)
-
saveWithCompositeKey
@Deprecated void saveWithCompositeKey(EmbeddedKeyable o)
Deprecated.
-
deleteWithCompositeKey
@Deprecated void deleteWithCompositeKey(EmbeddedKeyable o)
Deprecated.
-
getIds
@Deprecated <T> List<Long> getIds(Class<T> entityClazz, org.springframework.data.jpa.domain.Specification<T> searchSpec)
Deprecated.
-
clear
void clear()
-
lock
void lock(AbstractEntity entity, javax.persistence.LockModeType lockMode, int timeout)
-
lockAndRefresh
void lockAndRefresh(AbstractEntity entity, int timeout)
-
revert
void revert(AbstractEntity entity)
-
selectNativeQuery
@Deprecated <T> List<T> selectNativeQuery(Class<T> entityClazz, String sql, Map<String,Object> params)
Deprecated.
-
getEntityType
<T> javax.persistence.metamodel.EntityType<T> getEntityType(Class<T> cls)
-
-