public class HibSessionImpl extends Object implements HibSession
| Constructor and Description |
|---|
HibSessionImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Begin a transaction
|
void |
cacheableQuery()
Mark the query as cacheable
|
void |
clear()
Clear a session
|
void |
close() |
void |
commit()
Commit a transaction
|
org.hibernate.Criteria |
createCriteria(Class cl)
Create a Criteria ready for the additon of Criterion.
|
void |
createNoFlushQuery(String s)
Create a query ready for parameter replacement or execution and flag it
for no flush.
|
void |
createQuery(String s)
Create a query ready for parameter replacement or execution.
|
void |
createSQLQuery(String s,
String returnAlias,
Class returnClass)
Create a sql query ready for parameter replacement or execution.
|
void |
delete(Object obj)
Delete an object
|
void |
disconnect()
Disconnect a session
|
void |
evict(Object val)
Evict an object from the session.
|
int |
executeUpdate() |
void |
flush() |
Object |
get(Class cl,
int id)
Return an object of the given class with the given id if it is
already associated with this session.
|
Object |
get(Class cl,
Serializable id)
Return an object of the given class with the given id if it is
already associated with this session.
|
List |
getList()
Return a list resulting from the query.
|
protected org.apache.log4j.Logger |
getLogger() |
String |
getQueryString() |
org.hibernate.Session |
getSession() |
Object |
getUnique()
Return the single object resulting from the query.
|
void |
init(org.hibernate.SessionFactory sessFactory,
org.apache.log4j.Logger log)
Set up for a hibernate interaction.
|
boolean |
isOpen() |
void |
lockRead(Object o) |
void |
lockUpdate(Object o) |
Object |
merge(Object obj)
Merge and update an object which may have been loaded in a previous hibernate
session
|
void |
namedQuery(String name)
Create a named query ready for parameter replacement or execution.
|
void |
reAttach(UnversionedDbentity<?> val) |
void |
restore(Object obj)
Save a new object with the given id.
|
void |
rollback()
Rollback a transaction
|
boolean |
rolledback()
Did we rollback the transaction?
|
void |
save(Object obj)
Save a new object.
|
void |
saveOrUpdate(Object obj)
Save a new object or update an object which may have been loaded in a
previous hibernate session
|
Object |
saveOrUpdateCopy(Object obj)
Copy the state of the given object onto the persistent object with the
same identifier.
|
void |
setBool(String parName,
boolean parVal)
Set the named parameter with the given value
|
void |
setDate(String parName,
Date parVal)
Set the named parameter with the given value
|
void |
setEntity(String parName,
Object parVal)
Set the named parameter with the given value
|
void |
setFirstResult(int val)
Set the first result for a paged batch
|
void |
setFlushMode(org.hibernate.FlushMode val)
set the flushmode
|
void |
setInt(String parName,
int parVal)
Set the named parameter with the given value
|
void |
setLong(String parName,
long parVal)
Set the named parameter with the given value
|
void |
setMaxResults(int val)
Set the max number of results for a paged batch
|
void |
setParameter(String parName,
Object parVal)
Set the named parameter with the given value
|
void |
setParameterList(String parName,
Collection parVal)
Set the named parameter with the given Collection
|
void |
setString(String parName,
String parVal)
Set the named parameter with the given value
|
boolean |
transactionStarted()
Return true if we have a transaction started
|
void |
update(Object obj)
Update an object which may have been loaded in a previous hibernate
session
|
public void init(org.hibernate.SessionFactory sessFactory,
org.apache.log4j.Logger log)
throws org.bedework.webdav.servlet.shared.WebdavException
init in interface HibSessionsessFactory - log - org.bedework.webdav.servlet.shared.WebdavExceptionpublic org.hibernate.Session getSession()
throws org.bedework.webdav.servlet.shared.WebdavException
getSession in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic boolean isOpen()
throws org.bedework.webdav.servlet.shared.WebdavException
isOpen in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void clear()
throws org.bedework.webdav.servlet.shared.WebdavException
clear in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void disconnect()
throws org.bedework.webdav.servlet.shared.WebdavException
disconnect in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setFlushMode(org.hibernate.FlushMode val)
throws org.bedework.webdav.servlet.shared.WebdavException
setFlushMode in interface HibSessionval - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void beginTransaction()
throws org.bedework.webdav.servlet.shared.WebdavException
beginTransaction in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic boolean transactionStarted()
transactionStarted in interface HibSessionpublic void commit()
throws org.bedework.webdav.servlet.shared.WebdavException
commit in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void rollback()
throws org.bedework.webdav.servlet.shared.WebdavException
rollback in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic boolean rolledback()
throws org.bedework.webdav.servlet.shared.WebdavException
HibSessionrolledback in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic org.hibernate.Criteria createCriteria(Class cl) throws org.bedework.webdav.servlet.shared.WebdavException
createCriteria in interface HibSessioncl - Class for criteriaorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void evict(Object val) throws org.bedework.webdav.servlet.shared.WebdavException
HibSessionevict in interface HibSessionval - Object to evictorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void createQuery(String s) throws org.bedework.webdav.servlet.shared.WebdavException
HibSessioncreateQuery in interface HibSessions - String hibernate queryorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void createNoFlushQuery(String s) throws org.bedework.webdav.servlet.shared.WebdavException
HibSessioncreateNoFlushQuery in interface HibSessions - String hibernate queryorg.bedework.webdav.servlet.shared.WebdavExceptionpublic String getQueryString() throws org.bedework.webdav.servlet.shared.WebdavException
getQueryString in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void createSQLQuery(String s, String returnAlias, Class returnClass) throws org.bedework.webdav.servlet.shared.WebdavException
createSQLQuery in interface HibSessions - String hibernate queryreturnAlias - returnClass - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void namedQuery(String name) throws org.bedework.webdav.servlet.shared.WebdavException
namedQuery in interface HibSessionname - String named query nameorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void cacheableQuery()
throws org.bedework.webdav.servlet.shared.WebdavException
cacheableQuery in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setString(String parName, String parVal) throws org.bedework.webdav.servlet.shared.WebdavException
setString in interface HibSessionparName - String parameter nameparVal - String parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setDate(String parName, Date parVal) throws org.bedework.webdav.servlet.shared.WebdavException
setDate in interface HibSessionparName - String parameter nameparVal - Date parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setBool(String parName, boolean parVal) throws org.bedework.webdav.servlet.shared.WebdavException
setBool in interface HibSessionparName - String parameter nameparVal - boolean parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setInt(String parName, int parVal) throws org.bedework.webdav.servlet.shared.WebdavException
setInt in interface HibSessionparName - String parameter nameparVal - int parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setLong(String parName, long parVal) throws org.bedework.webdav.servlet.shared.WebdavException
setLong in interface HibSessionparName - String parameter nameparVal - long parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setEntity(String parName, Object parVal) throws org.bedework.webdav.servlet.shared.WebdavException
setEntity in interface HibSessionparName - String parameter nameparVal - Object parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setParameter(String parName, Object parVal) throws org.bedework.webdav.servlet.shared.WebdavException
HibSessionsetParameter in interface HibSessionparName - String parameter nameparVal - Object parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setParameterList(String parName, Collection parVal) throws org.bedework.webdav.servlet.shared.WebdavException
HibSessionsetParameterList in interface HibSessionparName - String parameter nameparVal - Collection parameter valueorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setFirstResult(int val)
throws org.bedework.webdav.servlet.shared.WebdavException
HibSessionsetFirstResult in interface HibSessionval - int first indexorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void setMaxResults(int val)
throws org.bedework.webdav.servlet.shared.WebdavException
HibSessionsetMaxResults in interface HibSessionval - int max numberorg.bedework.webdav.servlet.shared.WebdavExceptionpublic Object getUnique() throws org.bedework.webdav.servlet.shared.WebdavException
HibSessiongetUnique in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic List getList() throws org.bedework.webdav.servlet.shared.WebdavException
getList in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic int executeUpdate()
throws org.bedework.webdav.servlet.shared.WebdavException
executeUpdate in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void update(Object obj) throws org.bedework.webdav.servlet.shared.WebdavException
update in interface HibSessionobj - org.bedework.webdav.servlet.shared.WebdavExceptionpublic Object merge(Object obj) throws org.bedework.webdav.servlet.shared.WebdavException
merge in interface HibSessionobj - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void saveOrUpdate(Object obj) throws org.bedework.webdav.servlet.shared.WebdavException
saveOrUpdate in interface HibSessionobj - org.bedework.webdav.servlet.shared.WebdavExceptionpublic Object saveOrUpdateCopy(Object obj) throws org.bedework.webdav.servlet.shared.WebdavException
saveOrUpdateCopy in interface HibSessionobj - org.bedework.webdav.servlet.shared.WebdavExceptionpublic Object get(Class cl, Serializable id) throws org.bedework.webdav.servlet.shared.WebdavException
get in interface HibSessioncl - Class of the instanceid - A serializable keyorg.bedework.webdav.servlet.shared.WebdavExceptionpublic Object get(Class cl, int id) throws org.bedework.webdav.servlet.shared.WebdavException
get in interface HibSessioncl - Class of the instanceid - int keyorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void save(Object obj) throws org.bedework.webdav.servlet.shared.WebdavException
save in interface HibSessionobj - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void delete(Object obj) throws org.bedework.webdav.servlet.shared.WebdavException
delete in interface HibSessionobj - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void restore(Object obj) throws org.bedework.webdav.servlet.shared.WebdavException
restore in interface HibSessionobj - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void reAttach(UnversionedDbentity<?> val) throws org.bedework.webdav.servlet.shared.WebdavException
reAttach in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void lockRead(Object o) throws org.bedework.webdav.servlet.shared.WebdavException
lockRead in interface HibSessiono - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void lockUpdate(Object o) throws org.bedework.webdav.servlet.shared.WebdavException
lockUpdate in interface HibSessiono - org.bedework.webdav.servlet.shared.WebdavExceptionpublic void flush()
throws org.bedework.webdav.servlet.shared.WebdavException
flush in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionpublic void close()
throws org.bedework.webdav.servlet.shared.WebdavException
close in interface HibSessionorg.bedework.webdav.servlet.shared.WebdavExceptionprotected org.apache.log4j.Logger getLogger()
Copyright © 2018 Bedework. All rights reserved.