|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.repository.hibernate.HibernateUtil
public class HibernateUtil
Method Summary | |
---|---|
static void |
beginTransaction()
Start a new database transaction. |
static void |
clear()
|
static void |
closeSession()
Closes the Session local to the thread. |
static void |
commitTransaction()
Commit the database transaction. |
static org.hibernate.Session |
disconnectSession()
Disconnect and return Session from current Thread. |
static void |
evict(Object obj)
Evicts the object from the Hibernate cache. |
static void |
flushSession()
|
static org.hibernate.cfg.Configuration |
getConfiguration()
Returns the original Hibernate configuration. |
static org.hibernate.Session |
getSession()
Retrieves the current Session local to the thread. |
static org.hibernate.SessionFactory |
getSessionFactory()
Returns the SessionFactory used for this static class. |
static boolean |
isOracleDialect()
HACK This method is necessary to determine whether code should execute based on Oracle in use as the RDBMS repository for the platform. |
static void |
makePersistent(Object obj)
Persists changes to the object. |
static void |
makeTransient(Object obj)
Deletes the object from Hibernate |
static void |
rebuildSessionFactory()
Rebuild the SessionFactory with the static Configuration. |
static void |
rebuildSessionFactory(org.hibernate.cfg.Configuration cfg)
Rebuild the SessionFactory with the given Hibernate Configuration. |
static void |
registerInterceptor(org.hibernate.Interceptor interceptor)
Register a Hibernate interceptor with the current thread. |
static void |
rollbackTransaction()
Commit the database transaction. |
static List |
searchForTerm(ISearchable searchable,
String searchTerm,
int searchType)
Searches an ISearchable object for a search term. |
void |
setUseNewDatasourceService(boolean useNewService)
|
void |
systemEntryPoint()
Perform operations necessary upon entry to the system. |
void |
systemExitPoint()
Perform any system cleanup actions after the thread executes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setUseNewDatasourceService(boolean useNewService)
public static org.hibernate.SessionFactory getSessionFactory()
public static org.hibernate.cfg.Configuration getConfiguration()
public static void rebuildSessionFactory() throws RepositoryException
RepositoryException
public static void rebuildSessionFactory(org.hibernate.cfg.Configuration cfg) throws RepositoryException
cfg
-
RepositoryException
public static org.hibernate.Session getSession() throws RepositoryException
RepositoryException
public static void flushSession() throws RepositoryException
RepositoryException
public static void closeSession() throws RepositoryException
RepositoryException
public static void beginTransaction() throws RepositoryException
RepositoryException
public static void commitTransaction() throws RepositoryException
RepositoryException
public static void rollbackTransaction() throws RepositoryException
RepositoryException
public static org.hibernate.Session disconnectSession() throws RepositoryException
RepositoryException
public static void registerInterceptor(org.hibernate.Interceptor interceptor)
Every Session opened is opened with this interceptor after registration. Has no effect if the current Session of the thread is already open, effective on next close()/getSession().
public static List searchForTerm(ISearchable searchable, String searchTerm, int searchType)
searchable
- ISearchable to searchsearchTerm
- Search Term - see above for rulessearchType
- One of:
ISearchable.SEARCH_TYPE_PHRASE,ISearchable.SEARCH_TYPE_WORDS_AND,
ISearchable.SEARCH_TYPE_WORDS_OR
public static void clear()
public static void makePersistent(Object obj) throws RepositoryException
obj
- The object to make persistent
RepositoryException
public static void makeTransient(Object obj) throws RepositoryException
obj
- The object to make transient
RepositoryException
public static boolean isOracleDialect()
public static void evict(Object obj)
obj
- public void systemEntryPoint()
IPentahoSystemEntryPoint
systemEntryPoint
in interface IPentahoSystemEntryPoint
public void systemExitPoint()
IPentahoSystemExitPoint
systemExitPoint
in interface IPentahoSystemExitPoint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |