|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ephman.abra.database.DatabaseSessionFactory
Manages creation of DatabaseSessions
Method Summary | |
DatabaseSession |
createNewSession()
Create a new database session |
static DatabaseSessionFactory |
getInstance()
Get the instance of the factory, Factory must be initalized first. |
static void |
init(java.lang.String host,
java.lang.String database,
java.lang.String user,
java.lang.String password,
int port)
Create the instance of the singleton object, should be called only once at initialization |
static boolean |
initialized()
Return true if the factory is initialized. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public DatabaseSession createNewSession() throws java.sql.SQLException
java.sql.SQLException
public static void init(java.lang.String host, java.lang.String database, java.lang.String user, java.lang.String password, int port) throws java.sql.SQLException
host
- host name for the database serverdatabase
- name of the database to which we are connectinguser
- user id for database connectionpassword
- password for database connection
java.sql.SQLException
public static DatabaseSessionFactory getInstance() throws java.sql.SQLException
java.sql.SQLException
public static boolean initialized()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |