public class SessionDecorator extends Object implements org.hibernate.classic.Session
Constructor and Description |
---|
SessionDecorator(org.hibernate.classic.Session delegate) |
Modifier and Type | Method and Description |
---|---|
org.hibernate.Transaction |
beginTransaction() |
org.hibernate.Session.LockRequest |
buildLockRequest(org.hibernate.LockOptions lockOptions) |
void |
cancelQuery() |
void |
clear() |
Connection |
close() |
Connection |
connection() |
boolean |
contains(Object object) |
org.hibernate.Criteria |
createCriteria(Class persistentClass) |
org.hibernate.Criteria |
createCriteria(Class persistentClass,
String alias) |
org.hibernate.Criteria |
createCriteria(String entityName) |
org.hibernate.Criteria |
createCriteria(String entityName,
String alias) |
org.hibernate.Query |
createFilter(Object collection,
String queryString) |
org.hibernate.Query |
createQuery(String queryString) |
org.hibernate.SQLQuery |
createSQLQuery(String queryString) |
org.hibernate.Query |
createSQLQuery(String sql,
String[] returnAliases,
Class[] returnClasses)
Deprecated.
|
org.hibernate.Query |
createSQLQuery(String sql,
String returnAlias,
Class returnClass)
Deprecated.
|
void |
delete(Object object) |
int |
delete(String query) |
void |
delete(String entityName,
Object object) |
int |
delete(String query,
Object[] values,
org.hibernate.type.Type[] types) |
int |
delete(String query,
Object value,
org.hibernate.type.Type type) |
void |
disableFetchProfile(String name) |
void |
disableFilter(String filterName) |
Connection |
disconnect() |
void |
doWork(org.hibernate.jdbc.Work work) |
void |
enableFetchProfile(String name) |
org.hibernate.Filter |
enableFilter(String filterName) |
void |
evict(Object object) |
Collection |
filter(Object collection,
String filter) |
Collection |
filter(Object collection,
String filter,
Object[] values,
org.hibernate.type.Type[] types) |
Collection |
filter(Object collection,
String filter,
Object value,
org.hibernate.type.Type type) |
List |
find(String query) |
List |
find(String query,
Object[] values,
org.hibernate.type.Type[] types) |
List |
find(String query,
Object value,
org.hibernate.type.Type type) |
void |
flush() |
Object |
get(Class clazz,
Serializable id) |
Object |
get(Class clazz,
Serializable id,
org.hibernate.LockMode lockMode) |
Object |
get(Class clazz,
Serializable id,
org.hibernate.LockOptions lockOptions) |
Object |
get(String entityName,
Serializable id) |
Object |
get(String entityName,
Serializable id,
org.hibernate.LockMode lockMode) |
Object |
get(String entityName,
Serializable id,
org.hibernate.LockOptions lockOptions) |
org.hibernate.CacheMode |
getCacheMode() |
org.hibernate.LockMode |
getCurrentLockMode(Object object) |
protected org.hibernate.classic.Session |
getDelegate() |
org.hibernate.Filter |
getEnabledFilter(String filterName) |
org.hibernate.EntityMode |
getEntityMode() |
String |
getEntityName(Object object) |
org.hibernate.FlushMode |
getFlushMode() |
Serializable |
getIdentifier(Object object) |
org.hibernate.LobHelper |
getLobHelper() |
org.hibernate.Query |
getNamedQuery(String queryName) |
org.hibernate.Session |
getSession(org.hibernate.EntityMode entityMode) |
org.hibernate.SessionFactory |
getSessionFactory() |
org.hibernate.stat.SessionStatistics |
getStatistics() |
org.hibernate.Transaction |
getTransaction() |
org.hibernate.TypeHelper |
getTypeHelper() |
boolean |
isConnected() |
boolean |
isDefaultReadOnly() |
boolean |
isDirty() |
boolean |
isFetchProfileEnabled(String name) |
boolean |
isOpen() |
boolean |
isReadOnly(Object entityOrProxy) |
Iterator |
iterate(String query) |
Iterator |
iterate(String query,
Object[] values,
org.hibernate.type.Type[] types) |
Iterator |
iterate(String query,
Object value,
org.hibernate.type.Type type) |
Object |
load(Class theClass,
Serializable id) |
Object |
load(Class theClass,
Serializable id,
org.hibernate.LockMode lockMode) |
Object |
load(Class theClass,
Serializable id,
org.hibernate.LockOptions lockOptions) |
void |
load(Object object,
Serializable id) |
Object |
load(String entityName,
Serializable id) |
Object |
load(String entityName,
Serializable id,
org.hibernate.LockMode lockMode) |
Object |
load(String entityName,
Serializable id,
org.hibernate.LockOptions lockOptions) |
void |
lock(Object object,
org.hibernate.LockMode lockMode) |
void |
lock(String entityName,
Object object,
org.hibernate.LockMode lockMode) |
Object |
merge(Object object) |
Object |
merge(String entityName,
Object object) |
void |
persist(Object object) |
void |
persist(String entityName,
Object object) |
void |
reconnect() |
void |
reconnect(Connection connection) |
void |
refresh(Object object) |
void |
refresh(Object object,
org.hibernate.LockMode lockMode) |
void |
refresh(Object object,
org.hibernate.LockOptions lockOptions) |
void |
replicate(Object object,
org.hibernate.ReplicationMode replicationMode) |
void |
replicate(String entityName,
Object object,
org.hibernate.ReplicationMode replicationMode) |
Serializable |
save(Object object) |
void |
save(Object object,
Serializable id) |
Serializable |
save(String entityName,
Object object) |
void |
save(String entityName,
Object object,
Serializable id) |
void |
saveOrUpdate(Object object) |
void |
saveOrUpdate(String entityName,
Object object) |
Object |
saveOrUpdateCopy(Object object) |
Object |
saveOrUpdateCopy(Object object,
Serializable id) |
Object |
saveOrUpdateCopy(String entityName,
Object object) |
Object |
saveOrUpdateCopy(String entityName,
Object object,
Serializable id) |
void |
setCacheMode(org.hibernate.CacheMode cacheMode) |
void |
setDefaultReadOnly(boolean readOnly) |
void |
setFlushMode(org.hibernate.FlushMode flushMode) |
void |
setReadOnly(Object entityOrProxy,
boolean readOnly) |
void |
update(Object object) |
void |
update(Object object,
Serializable id) |
void |
update(String entityName,
Object object) |
void |
update(String entityName,
Object object,
Serializable id) |
public SessionDecorator(@Nonnull org.hibernate.classic.Session delegate)
@Nonnull protected org.hibernate.classic.Session getDelegate()
public Object saveOrUpdateCopy(Object object) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Object saveOrUpdateCopy(Object object, Serializable id) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Object saveOrUpdateCopy(String entityName, Object object) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Object saveOrUpdateCopy(String entityName, Object object, Serializable id) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public List find(String query) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public List find(String query, Object value, org.hibernate.type.Type type) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public List find(String query, Object[] values, org.hibernate.type.Type[] types) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Iterator iterate(String query) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Iterator iterate(String query, Object value, org.hibernate.type.Type type) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Iterator iterate(String query, Object[] values, org.hibernate.type.Type[] types) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Collection filter(Object collection, String filter) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Collection filter(Object collection, String filter, Object value, org.hibernate.type.Type type) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public Collection filter(Object collection, String filter, Object[] values, org.hibernate.type.Type[] types) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public int delete(String query) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public int delete(String query, Object value, org.hibernate.type.Type type) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public int delete(String query, Object[] values, org.hibernate.type.Type[] types) throws org.hibernate.HibernateException
org.hibernate.HibernateException
@Deprecated public org.hibernate.Query createSQLQuery(String sql, String returnAlias, Class returnClass)
@Deprecated public org.hibernate.Query createSQLQuery(String sql, String[] returnAliases, Class[] returnClasses)
public void save(Object object, Serializable id) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public void save(String entityName, Object object, Serializable id) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public void update(Object object, Serializable id) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public void update(String entityName, Object object, Serializable id) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public org.hibernate.EntityMode getEntityMode()
getEntityMode
in interface org.hibernate.Session
public org.hibernate.Session getSession(org.hibernate.EntityMode entityMode)
getSession
in interface org.hibernate.Session
public void flush() throws org.hibernate.HibernateException
flush
in interface org.hibernate.Session
org.hibernate.HibernateException
public void setFlushMode(org.hibernate.FlushMode flushMode)
setFlushMode
in interface org.hibernate.Session
public org.hibernate.FlushMode getFlushMode()
getFlushMode
in interface org.hibernate.Session
public void setCacheMode(org.hibernate.CacheMode cacheMode)
setCacheMode
in interface org.hibernate.Session
public org.hibernate.CacheMode getCacheMode()
getCacheMode
in interface org.hibernate.Session
public org.hibernate.SessionFactory getSessionFactory()
getSessionFactory
in interface org.hibernate.Session
public Connection connection() throws org.hibernate.HibernateException
connection
in interface org.hibernate.Session
org.hibernate.HibernateException
public Connection close() throws org.hibernate.HibernateException
close
in interface org.hibernate.Session
org.hibernate.HibernateException
public void cancelQuery() throws org.hibernate.HibernateException
cancelQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean isOpen()
isOpen
in interface org.hibernate.Session
public boolean isConnected()
isConnected
in interface org.hibernate.Session
public boolean isDirty() throws org.hibernate.HibernateException
isDirty
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean isDefaultReadOnly()
isDefaultReadOnly
in interface org.hibernate.Session
public void setDefaultReadOnly(boolean readOnly)
setDefaultReadOnly
in interface org.hibernate.Session
public Serializable getIdentifier(Object object) throws org.hibernate.HibernateException
getIdentifier
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean contains(Object object)
contains
in interface org.hibernate.Session
public void evict(Object object) throws org.hibernate.HibernateException
evict
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(Class theClass, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(Class theClass, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(String entityName, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(Class theClass, Serializable id) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object load(String entityName, Serializable id) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public void load(Object object, Serializable id) throws org.hibernate.HibernateException
load
in interface org.hibernate.Session
org.hibernate.HibernateException
public void replicate(Object object, org.hibernate.ReplicationMode replicationMode) throws org.hibernate.HibernateException
replicate
in interface org.hibernate.Session
org.hibernate.HibernateException
public void replicate(String entityName, Object object, org.hibernate.ReplicationMode replicationMode) throws org.hibernate.HibernateException
replicate
in interface org.hibernate.Session
org.hibernate.HibernateException
public Serializable save(Object object) throws org.hibernate.HibernateException
save
in interface org.hibernate.Session
org.hibernate.HibernateException
public Serializable save(String entityName, Object object) throws org.hibernate.HibernateException
save
in interface org.hibernate.Session
org.hibernate.HibernateException
public void saveOrUpdate(Object object) throws org.hibernate.HibernateException
saveOrUpdate
in interface org.hibernate.Session
org.hibernate.HibernateException
public void saveOrUpdate(String entityName, Object object) throws org.hibernate.HibernateException
saveOrUpdate
in interface org.hibernate.Session
org.hibernate.HibernateException
public void update(Object object) throws org.hibernate.HibernateException
update
in interface org.hibernate.Session
org.hibernate.HibernateException
public void update(String entityName, Object object) throws org.hibernate.HibernateException
update
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object merge(Object object) throws org.hibernate.HibernateException
merge
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object merge(String entityName, Object object) throws org.hibernate.HibernateException
merge
in interface org.hibernate.Session
org.hibernate.HibernateException
public void persist(Object object) throws org.hibernate.HibernateException
persist
in interface org.hibernate.Session
org.hibernate.HibernateException
public void persist(String entityName, Object object) throws org.hibernate.HibernateException
persist
in interface org.hibernate.Session
org.hibernate.HibernateException
public void delete(Object object) throws org.hibernate.HibernateException
delete
in interface org.hibernate.Session
org.hibernate.HibernateException
public void delete(String entityName, Object object) throws org.hibernate.HibernateException
delete
in interface org.hibernate.Session
org.hibernate.HibernateException
public void lock(Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
lock
in interface org.hibernate.Session
org.hibernate.HibernateException
public void lock(String entityName, Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
lock
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Session.LockRequest buildLockRequest(org.hibernate.LockOptions lockOptions)
buildLockRequest
in interface org.hibernate.Session
public void refresh(Object object) throws org.hibernate.HibernateException
refresh
in interface org.hibernate.Session
org.hibernate.HibernateException
public void refresh(Object object, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
refresh
in interface org.hibernate.Session
org.hibernate.HibernateException
public void refresh(Object object, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
refresh
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.LockMode getCurrentLockMode(Object object) throws org.hibernate.HibernateException
getCurrentLockMode
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Transaction beginTransaction() throws org.hibernate.HibernateException
beginTransaction
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Transaction getTransaction()
getTransaction
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(Class persistentClass)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(Class persistentClass, String alias)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(String entityName)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Criteria createCriteria(String entityName, String alias)
createCriteria
in interface org.hibernate.Session
public org.hibernate.Query createQuery(String queryString) throws org.hibernate.HibernateException
createQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.SQLQuery createSQLQuery(String queryString) throws org.hibernate.HibernateException
createSQLQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Query createFilter(Object collection, String queryString) throws org.hibernate.HibernateException
createFilter
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Query getNamedQuery(String queryName) throws org.hibernate.HibernateException
getNamedQuery
in interface org.hibernate.Session
org.hibernate.HibernateException
public void clear()
clear
in interface org.hibernate.Session
public Object get(Class clazz, Serializable id) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(Class clazz, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(Class clazz, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(String entityName, Serializable id) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public Object get(String entityName, Serializable id, org.hibernate.LockOptions lockOptions) throws org.hibernate.HibernateException
get
in interface org.hibernate.Session
org.hibernate.HibernateException
public String getEntityName(Object object) throws org.hibernate.HibernateException
getEntityName
in interface org.hibernate.Session
org.hibernate.HibernateException
public org.hibernate.Filter enableFilter(String filterName)
enableFilter
in interface org.hibernate.Session
public org.hibernate.Filter getEnabledFilter(String filterName)
getEnabledFilter
in interface org.hibernate.Session
public void disableFilter(String filterName)
disableFilter
in interface org.hibernate.Session
public org.hibernate.stat.SessionStatistics getStatistics()
getStatistics
in interface org.hibernate.Session
public boolean isReadOnly(Object entityOrProxy)
isReadOnly
in interface org.hibernate.Session
public void setReadOnly(Object entityOrProxy, boolean readOnly)
setReadOnly
in interface org.hibernate.Session
public void doWork(org.hibernate.jdbc.Work work) throws org.hibernate.HibernateException
doWork
in interface org.hibernate.Session
org.hibernate.HibernateException
public Connection disconnect() throws org.hibernate.HibernateException
disconnect
in interface org.hibernate.Session
org.hibernate.HibernateException
public void reconnect() throws org.hibernate.HibernateException
reconnect
in interface org.hibernate.Session
org.hibernate.HibernateException
public void reconnect(Connection connection) throws org.hibernate.HibernateException
reconnect
in interface org.hibernate.Session
org.hibernate.HibernateException
public boolean isFetchProfileEnabled(String name) throws org.hibernate.UnknownProfileException
isFetchProfileEnabled
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public void enableFetchProfile(String name) throws org.hibernate.UnknownProfileException
enableFetchProfile
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public void disableFetchProfile(String name) throws org.hibernate.UnknownProfileException
disableFetchProfile
in interface org.hibernate.Session
org.hibernate.UnknownProfileException
public org.hibernate.TypeHelper getTypeHelper()
getTypeHelper
in interface org.hibernate.Session
public org.hibernate.LobHelper getLobHelper()
getLobHelper
in interface org.hibernate.Session