goldengate.common.database.model
Class DbModelAbstract
java.lang.Object
goldengate.common.database.model.DbModelAbstract
- All Implemented Interfaces:
- DbModel
- Direct Known Subclasses:
- DbModelH2, DbModelMysql, DbModelOracle, DbModelPostgresql
public abstract class DbModelAbstract
- extends Object
- implements DbModel
This Abstract class regroups common methods for all implementation classes.
- Author:
- Frederic Bregier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DbModelAbstract
public DbModelAbstract()
closeInternalConnection
protected void closeInternalConnection(DbSession dbSession)
- Internal use for closing connection while validating it
- Parameters:
dbSession
-
validConnection
public void validConnection(DbSession dbSession)
throws GoldenGateDatabaseNoConnectionException
- Description copied from interface:
DbModel
- Validate connection
- Specified by:
validConnection
in interface DbModel
- Throws:
GoldenGateDatabaseNoConnectionException
validConnectionSelect
public void validConnectionSelect(DbSession dbSession)
throws GoldenGateDatabaseNoConnectionException
- Throws:
GoldenGateDatabaseNoConnectionException
validConnectionString
protected abstract String validConnectionString()
- Returns:
- the associated String to validate the connection (as
"select 1 frm dual")
getDbConnection
public Connection getDbConnection(String server,
String user,
String passwd)
throws SQLException
- Specified by:
getDbConnection
in interface DbModel
- Returns:
- a connection according to the underlying Database Model
- Throws:
SQLException
releaseResources
public void releaseResources()
- Description copied from interface:
DbModel
- Release any internal resources if needed
- Specified by:
releaseResources
in interface DbModel
currentNumberOfPooledConnections
public int currentNumberOfPooledConnections()
- Specified by:
currentNumberOfPooledConnections
in interface DbModel
- Returns:
- the number of Pooled Connections if any
Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.