public class HibernateTransaction extends Object implements DataStoreTransaction
| Constructor and Description |
|---|
HibernateTransaction(org.hibernate.Session session)
Instantiates a new Hibernate transaction.
|
| Modifier and Type | Method and Description |
|---|---|
User |
accessUser(Object opaqueUser) |
org.hibernate.criterion.Criterion |
buildCheckCriterion(FilterScope filterScope)
builds criterion if all checks implement CriteriaCheck.
|
void |
close() |
void |
commit() |
<T> T |
createObject(Class<T> entityClass) |
void |
delete(Object object) |
<T> Collection |
filterCollection(Collection collection,
Class<T> entityClass,
Set<Predicate> predicates) |
<T> Collection |
filterCollectionWithSortingAndPagination(Collection collection,
Class<T> entityClass,
EntityDictionary dictionary,
Optional<Set<Predicate>> filters,
Optional<Sorting> sorting,
Optional<Pagination> pagination) |
void |
flush() |
<T> T |
loadObject(Class<T> loadClass,
Serializable id) |
<T> Iterable<T> |
loadObjects(Class<T> loadClass) |
<T> Iterable<T> |
loadObjects(Class<T> loadClass,
FilterScope filterScope) |
<T> Iterable<T> |
loadObjects(Class<T> loadClass,
Optional<org.hibernate.criterion.Criterion> criterion,
Optional<Set<org.hibernate.criterion.Order>> sortingRules,
Optional<Pagination> pagination)
Generates the Hibernate ScrollableIterator for Hibernate Query.
|
<T> Iterable<T> |
loadObjectsWithSortingAndPagination(Class<T> entityClass,
FilterScope filterScope) |
void |
save(Object object) |
public HibernateTransaction(org.hibernate.Session session)
session - the sessionpublic void delete(Object object)
delete in interface DataStoreTransactionpublic void save(Object object)
save in interface DataStoreTransactionpublic void flush()
flush in interface DataStoreTransactionpublic void commit()
commit in interface DataStoreTransactionpublic <T> T createObject(Class<T> entityClass)
createObject in interface DataStoreTransactionpublic <T> T loadObject(Class<T> loadClass, Serializable id)
loadObject in interface DataStoreTransactionpublic <T> Iterable<T> loadObjects(Class<T> loadClass)
loadObjects in interface DataStoreTransactionpublic <T> Iterable<T> loadObjects(Class<T> loadClass, FilterScope filterScope)
loadObjects in interface DataStoreTransactionpublic <T> Iterable<T> loadObjectsWithSortingAndPagination(Class<T> entityClass, FilterScope filterScope)
loadObjectsWithSortingAndPagination in interface DataStoreTransactionpublic <T> Iterable<T> loadObjects(Class<T> loadClass, Optional<org.hibernate.criterion.Criterion> criterion, Optional<Set<org.hibernate.criterion.Order>> sortingRules, Optional<Pagination> pagination)
T - The return Iterable type.loadClass - The hibernate class to build the query off of.criterion - The Optional criterion object.sortingRules - The possibly empty sorting rules.pagination - The Optional pagination object.public org.hibernate.criterion.Criterion buildCheckCriterion(FilterScope filterScope)
filterScope - the filterScopepublic <T> Collection filterCollection(Collection collection, Class<T> entityClass, Set<Predicate> predicates)
filterCollection in interface DataStoreTransactionpublic <T> Collection filterCollectionWithSortingAndPagination(Collection collection, Class<T> entityClass, EntityDictionary dictionary, Optional<Set<Predicate>> filters, Optional<Sorting> sorting, Optional<Pagination> pagination)
filterCollectionWithSortingAndPagination in interface DataStoreTransactionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic User accessUser(Object opaqueUser)
accessUser in interface DataStoreTransactionCopyright © 2015–2016. All rights reserved.