|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.biojava.bio.seq.db.biosql.DBHelper
Isolates all code that is specific to a particular RDBMS. To add
support for a new RDBMS, write a new DBHelper subclass
and ensure that it can be found by editing the
getDBHelperForURL method in this class.
| Nested Class Summary | |
static class |
DBHelper.DeleteStyle
|
static class |
DBHelper.JoinStyle
|
| Field Summary | |
static DBHelper.DeleteStyle |
DELETE_GENERIC
|
static DBHelper.DeleteStyle |
DELETE_MYSQL4
|
static DBHelper.DeleteStyle |
DELETE_POSTGRESQL
|
static DBHelper.JoinStyle |
JOIN_GENERIC
|
static DBHelper.JoinStyle |
JOIN_ORACLE8
|
| Constructor Summary | |
DBHelper()
|
|
| Method Summary | |
boolean |
containsTable(DataSource ds,
String tablename)
Detects whether a particular table is present in the database. |
static DBHelper |
getDBHelper(Connection conn)
Returns a DBHelper implementation suitable for a particular database. |
DBHelper.DeleteStyle |
getDeleteStyle()
Returns the an object indicating the style of deletion that this database should employ. |
abstract int |
getInsertID(Connection conn,
String table,
String columnName)
Returns the id value created during the last insert command. |
DBHelper.JoinStyle |
getJoinStyle()
Returns the an object indicating the style of table joining that this database should employ. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final DBHelper.DeleteStyle DELETE_POSTGRESQL
public static final DBHelper.DeleteStyle DELETE_MYSQL4
public static final DBHelper.DeleteStyle DELETE_GENERIC
public static final DBHelper.JoinStyle JOIN_ORACLE8
public static final DBHelper.JoinStyle JOIN_GENERIC
| Constructor Detail |
public DBHelper()
| Method Detail |
public static DBHelper getDBHelper(Connection conn)
conn - a connection to the database.
DBHelper.
public abstract int getInsertID(Connection conn,
String table,
String columnName)
throws SQLException
SQLExceptionpublic DBHelper.DeleteStyle getDeleteStyle()
public DBHelper.JoinStyle getJoinStyle()
public boolean containsTable(DataSource ds,
String tablename)
ds - a DataSource that can provide a connection to a databasetablename - the name of the table.
NullPointerException - if pool is null.
IllegalArgumentException - if tablename is null or empty.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||