public class HibernateTransaction extends Object implements DataStoreTransaction
| Modifier | Constructor and Description |
|---|---|
|
HibernateTransaction(org.hibernate.Session session)
Deprecated.
since Elide 2.3.2. Will be removed no later than the release of Elide 3.0.
|
protected |
HibernateTransaction(org.hibernate.Session session,
boolean isScrollEnabled,
org.hibernate.ScrollMode scrollMode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
User |
accessUser(Object opaqueUser) |
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,
CriteriaExplorer criteriaExplorer,
Optional<Set<org.hibernate.criterion.Order>> sortingRules,
Optional<Pagination> pagination)
Generates the Hibernate ScrollableIterator for Hibernate Query.
|
<T> Iterable<T> |
loadObjects(Class<T> loadClass,
FilterScope filterScope) |
<T> Iterable<T> |
loadObjectsWithSortingAndPagination(Class<T> entityClass,
FilterScope filterScope) |
void |
save(Object object) |
@Deprecated public HibernateTransaction(org.hibernate.Session session)
session - the sessionprotected HibernateTransaction(org.hibernate.Session session,
boolean isScrollEnabled,
org.hibernate.ScrollMode scrollMode)
session - Hibernate sessionisScrollEnabled - Whether or not scrolling is enabledscrollMode - Scroll mode to use if scrolling enabledpublic 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, CriteriaExplorer criteriaExplorer, 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.criteriaExplorer - Criteria explorer to explore and construct criterionsortingRules - The possibly empty sorting rules.pagination - The Optional pagination object.public <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.