|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgoldengate.common.database.model.DbModelAbstract
goldengate.common.database.model.DbModelMysql
public abstract class DbModelMysql

MySQL Database Model implementation
| Nested Class Summary | |
|---|---|
protected static class |
DbModelMysql.DBType
|
| Field Summary | |
|---|---|
protected static com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource |
mysqlConnectionPoolDataSource
|
protected static DbConnectionPool |
pool
|
static DbType |
type
|
| Constructor Summary | |
|---|---|
protected |
DbModelMysql()
Create the object and initialize if necessary the driver |
|
DbModelMysql(String dbserver,
String dbuser,
String dbpasswd)
Create the object and initialize if necessary the driver |
|
DbModelMysql(String dbserver,
String dbuser,
String dbpasswd,
org.jboss.netty.util.Timer timer,
long delay)
Create the object and initialize if necessary the driver |
| Method Summary | |
|---|---|
void |
createTables(DbSession session)
Create all necessary tables into the database |
int |
currentNumberOfPooledConnections()
|
Connection |
getDbConnection(String server,
String user,
String passwd)
|
DbType |
getDbType()
|
String |
limitRequest(String allfields,
String request,
int nb)
Add a limit on the request to get the "limit" first rows. |
long |
nextSequence(DbSession dbSession)
|
void |
releaseResources()
Release any internal resources if needed |
void |
resetSequence(DbSession session,
long newvalue)
Reset the sequence (example) |
protected String |
validConnectionString()
|
| Methods inherited from class goldengate.common.database.model.DbModelAbstract |
|---|
closeInternalConnection, validConnection, validConnectionSelect |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static DbType type
protected static com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource mysqlConnectionPoolDataSource
protected static DbConnectionPool pool
| Constructor Detail |
|---|
public DbModelMysql(String dbserver,
String dbuser,
String dbpasswd,
org.jboss.netty.util.Timer timer,
long delay)
throws GoldenGateDatabaseNoConnectionException
dbserver - dbuser - dbpasswd - timer - delay -
GoldenGateDatabaseNoConnectionException
public DbModelMysql(String dbserver,
String dbuser,
String dbpasswd)
throws GoldenGateDatabaseNoConnectionException
dbserver - dbuser - dbpasswd -
GoldenGateDatabaseNoConnectionException
protected DbModelMysql()
throws GoldenGateDatabaseNoConnectionException
GoldenGateDatabaseNoConnectionException| Method Detail |
|---|
public DbType getDbType()
public void releaseResources()
DbModel
releaseResources in interface DbModelreleaseResources in class DbModelAbstractpublic int currentNumberOfPooledConnections()
currentNumberOfPooledConnections in interface DbModelcurrentNumberOfPooledConnections in class DbModelAbstract
public Connection getDbConnection(String server,
String user,
String passwd)
throws SQLException
getDbConnection in interface DbModelgetDbConnection in class DbModelAbstractSQLException
public void createTables(DbSession session)
throws GoldenGateDatabaseNoConnectionException
DbModel
session - SQL session
GoldenGateDatabaseNoConnectionException
public void resetSequence(DbSession session,
long newvalue)
throws GoldenGateDatabaseNoConnectionException
DbModel
session - SQL session
GoldenGateDatabaseNoConnectionException
public long nextSequence(DbSession dbSession)
throws GoldenGateDatabaseNoConnectionException,
GoldenGateDatabaseSqlException,
GoldenGateDatabaseNoDataException
GoldenGateDatabaseNoConnectionException
GoldenGateDatabaseSqlException
GoldenGateDatabaseNoDataExceptionprotected String validConnectionString()
validConnectionString in class DbModelAbstract
public String limitRequest(String allfields,
String request,
int nb)
DbModel
allfields - string representing the equivalent to "*" in "select *" but more precisely
as "field1, field2" in "select field1, field2"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||