|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.backend.hibernate.MCRHIBConnection
public class MCRHIBConnection
Class for hibernate connection to selected database
| Field Summary | |
|---|---|
(package private) static org.hibernate.cfg.Configuration |
HIBCFG
|
(package private) static org.hibernate.SessionFactory |
SESSION_FACTORY
|
(package private) static MCRHIBConnection |
SINGLETON
|
| Constructor Summary | |
|---|---|
protected |
MCRHIBConnection()
This method initializes the connection to the database |
| Method Summary | |
|---|---|
Element |
addStringArray(Element base,
String tagName,
String attrName,
String[] values)
|
static void |
buildSessionFactory(org.hibernate.cfg.Configuration config)
|
void |
close()
cleanly closes this object that implements Closeable. |
boolean |
containsMapping(String tablename)
This method checks existance of mapping for given sql-tablename |
protected void |
finalize()
|
org.hibernate.cfg.Configuration |
getConfiguration()
|
org.hibernate.type.Type |
getHibType(String type)
helper mehtod: translates fieldtypes into hibernate types |
org.hibernate.Query |
getNamedQuery(String name)
returns the named query from the hibernate mapping. |
org.hibernate.Session |
getSession()
This method returns the current session for queries on the database through hibernate |
org.hibernate.SessionFactory |
getSessionFactory()
|
void |
handleStatistics(org.hibernate.stat.Statistics stats)
|
static MCRHIBConnection |
instance()
|
void |
sessionEvent(MCRSessionEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static org.hibernate.cfg.Configuration HIBCFG
static org.hibernate.SessionFactory SESSION_FACTORY
static MCRHIBConnection SINGLETON
| Constructor Detail |
|---|
protected MCRHIBConnection()
throws MCRPersistenceException
MCRPersistenceException| Method Detail |
|---|
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
public static MCRHIBConnection instance()
throws MCRPersistenceException
MCRPersistenceExceptionpublic static void buildSessionFactory(org.hibernate.cfg.Configuration config)
public org.hibernate.Session getSession()
public org.hibernate.cfg.Configuration getConfiguration()
public boolean containsMapping(String tablename)
tablename - sql-table name as string
public org.hibernate.type.Type getHibType(String type)
type - typename as string
public void close()
MCRShutdownHandler.CloseableCloseable.
You can provide some functionality to close open files and sockets or
so.
close in interface MCRShutdownHandler.Closeable
public void handleStatistics(org.hibernate.stat.Statistics stats)
throws FileNotFoundException,
IOException
FileNotFoundException
IOException
public Element addStringArray(Element base,
String tagName,
String attrName,
String[] values)
public org.hibernate.SessionFactory getSessionFactory()
public void sessionEvent(MCRSessionEvent event)
sessionEvent in interface MCRSessionListenerpublic org.hibernate.Query getNamedQuery(String name)
name.<DBDialect> exists it takes precedence over a query named name
name -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||