public class HibernateTransaction extends Object implements DataStoreTransaction
DataStoreTransaction.FeatureSupport| Modifier | Constructor and Description |
|---|---|
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(RequestScope scope) |
void |
createObject(Object entity,
RequestScope scope) |
void |
delete(Object object,
RequestScope scope) |
void |
flush(RequestScope requestScope) |
Object |
getRelation(DataStoreTransaction relationTx,
Object entity,
String relationName,
Optional<FilterExpression> filterExpression,
Optional<Sorting> sorting,
Optional<Pagination> pagination,
RequestScope scope) |
protected void |
hibernateFlush(RequestScope requestScope) |
Object |
loadObject(Class<?> entityClass,
Serializable id,
Optional<FilterExpression> filterExpression,
RequestScope scope)
load a single record with id and filter.
|
Iterable<Object> |
loadObjects(Class<?> entityClass,
Optional<FilterExpression> filterExpression,
Optional<Sorting> sorting,
Optional<Pagination> pagination,
RequestScope scope) |
void |
save(Object object,
RequestScope scope) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateNewObject, getAttribute, preCommit, setAttribute, supportsFiltering, supportsPagination, supportsSorting, updateToManyRelation, updateToOneRelationprotected 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, RequestScope scope)
delete in interface DataStoreTransactionpublic void save(Object object, RequestScope scope)
save in interface DataStoreTransactionpublic void flush(RequestScope requestScope)
flush in interface DataStoreTransactionprotected void hibernateFlush(RequestScope requestScope)
public void commit(RequestScope scope)
commit in interface DataStoreTransactionpublic void createObject(Object entity, RequestScope scope)
createObject in interface DataStoreTransactionpublic Object loadObject(Class<?> entityClass, Serializable id, Optional<FilterExpression> filterExpression, RequestScope scope)
loadObject in interface DataStoreTransactionentityClass - class of query objectid - id of the query objectfilterExpression - FilterExpression contains the predicatesscope - Request scope associated with specific requestpublic Iterable<Object> loadObjects(Class<?> entityClass, Optional<FilterExpression> filterExpression, Optional<Sorting> sorting, Optional<Pagination> pagination, RequestScope scope)
loadObjects in interface DataStoreTransactionpublic Object getRelation(DataStoreTransaction relationTx, Object entity, String relationName, Optional<FilterExpression> filterExpression, Optional<Sorting> sorting, Optional<Pagination> pagination, RequestScope scope)
getRelation in interface DataStoreTransactionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic User accessUser(Object opaqueUser)
accessUser in interface DataStoreTransactionCopyright © 2015–2019. All rights reserved.