org.jminor.framework.db
Class EntityConnections

java.lang.Object
  extended by org.jminor.framework.db.EntityConnections

public final class EntityConnections
extends Object

A factory class providing EntityConnection instances.


Method Summary
static EntityConnection createConnection(Connection connection, Database database, User user)
          Constructs a new EntityConnection instance
static EntityConnection createConnection(Database database, User user)
          Constructs a new EntityConnection instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createConnection

public static EntityConnection createConnection(Database database,
                                                User user)
                                         throws SQLException,
                                                ClassNotFoundException
Constructs a new EntityConnection instance

Parameters:
database - the Database instance
user - the user used for connecting to the database
Returns:
a new EntityConnection instance
Throws:
SQLException - in case there is a problem connecting to the database
ClassNotFoundException - in case the JDBC driver class is not found

createConnection

public static EntityConnection createConnection(Connection connection,
                                                Database database,
                                                User user)
                                         throws SQLException
Constructs a new EntityConnection instance

Parameters:
connection - the connection object to base the entity connection on
database - the Database instance
user - the user used for connecting to the database
Returns:
a new EntityConnection instance
Throws:
SQLException - in case there is a problem connecting to the database