Package | Description |
---|---|
org.waarp.common.database |
Classes implementing Database access
|
org.waarp.common.database.data |
Classes implementing Database Data model
|
org.waarp.common.database.model |
Classes implementing Database Model (H2, Oracle, PostgreSQL, MySQL, MariaDB)
|
Modifier and Type | Method and Description |
---|---|
void |
DbSession.checkConnection()
Check the connection to the Database and try to reopen it if possible
|
void |
DbAdmin.commit()
Commit on connection (since in autocommit, should not be used)
|
void |
DbSession.commit()
Commit everything
|
void |
DbPreparedStatement.createPrepareStatement(String requestarg)
Create a preparedStatement from request
|
void |
DbPreparedStatement.executeQuery()
Execute a Select preparedStatement
|
int |
DbPreparedStatement.executeUpdate()
Execute the Update/Insert/Delete preparedStatement
|
boolean |
DbRequest.getNext()
Move the cursor to the next result
|
boolean |
DbPreparedStatement.getNext()
Move the cursor to the next result
|
PreparedStatement |
DbPreparedStatement.getPreparedStatement() |
ResultSet |
DbRequest.getResultSet() |
ResultSet |
DbPreparedStatement.getResultSet() |
int |
DbRequest.query(String query)
Execute a UPDATE/INSERT/DELETE statement and returns the number of row.
|
void |
DbSession.recreateLongTermPreparedStatements()
Due to a reconnection, recreate all associated long term PreparedStatements
|
void |
DbPreparedStatement.recreatePreparedStatement()
In case of closing database connection, it is possible to reopen a long term
preparedStatement as it was at creation.
|
void |
DbSession.releaseSavepoint(Savepoint savepoint)
Release the savepoint
|
void |
DbSession.rollback(Savepoint savepoint)
Rollback from the savepoint or the last set if null
|
Savepoint |
DbSession.savepoint()
Make a savepoint
|
void |
DbRequest.select(String select)
Execute a SELECT statement and set of Result.
|
void |
DbRequest.select(String select,
int timeout)
Execute a SELECT statement and set of Result.
|
void |
DbSession.setAutoCommit(boolean autoCommit)
Change the autocommit feature
|
void |
DbAdmin.validConnection()
Validate connection
|
Constructor and Description |
---|
DbAdmin(DbModel model,
String server,
String user,
String passwd)
Use a default server for basic connection.
|
DbAdmin(DbModel model,
String server,
String user,
String passwd,
boolean write)
Use a default server for basic connection.
|
DbPreparedStatement(DbSession ls)
Create a DbPreparedStatement from DbSession object
|
DbPreparedStatement(DbSession ls,
String request)
Create a DbPreparedStatement from DbSession object and a request
|
DbPreparedStatement(DbSession ls,
String request,
int nbFetch)
Create a DbPreparedStatement from DbSession object and a request
|
DbRequest(DbSession ls)
Create a new request from the DbSession
|
DbSession(DbAdmin admin,
boolean isReadOnly)
Create a session and connect the current object to the server using the DbAdmin object.
|
DbSession(DbAdmin admin,
boolean isReadOnly,
boolean autoCommit)
Create a session and connect the current object to the server using the DbAdmin object.
|
Modifier and Type | Method and Description |
---|---|
static DbDataModel |
DbDataModel.getFromStatement(DbPreparedStatement preparedStatement)
For instance from Commander when getting updated information
|
static DbPreparedStatement |
DbDataModel.getUpdatedPrepareStament(DbSession session) |
protected void |
AbstractDbData.getValue(DbPreparedStatement preparedStatement,
DbValue value)
Get one value into DbValue from DbPreparedStatement
|
protected void |
AbstractDbData.getValues(DbPreparedStatement preparedStatement,
DbValue[] values)
Get several values into DbValue from DbPreparedStatement
|
protected void |
AbstractDbData.setValue(DbPreparedStatement preparedStatement,
DbValue value)
Set one value to a DbPreparedStatement
|
protected void |
AbstractDbData.setValues(DbPreparedStatement preparedStatement,
DbValue[] values)
Set several values to a DbPreparedStatement
|
Modifier and Type | Method and Description |
---|---|
void |
DbModel.createTables(DbSession session)
Create all necessary tables into the database
|
void |
DbModelOracle.createTables(DbSession session) |
void |
DbModelPostgresql.createTables(DbSession session) |
void |
DbModelMysql.createTables(DbSession session) |
void |
DbModelH2.createTables(DbSession session) |
void |
EmptyDbModel.createTables(DbSession session) |
void |
DbModelMariadb.createTables(DbSession session) |
static DbAdmin |
DbModelFactory.initialize(String dbdriver,
String dbserver,
String dbuser,
String dbpasswd,
boolean write)
Initialize the Database Model according to arguments.
|
boolean |
DbModel.needUpgradeDb(DbSession session,
String version,
boolean tryFix)
Check if Database is ok from version
|
boolean |
EmptyDbModel.needUpgradeDb(DbSession session,
String version,
boolean tryFix) |
long |
DbModel.nextSequence(DbSession dbSession) |
long |
DbModelOracle.nextSequence(DbSession dbSession) |
long |
DbModelPostgresql.nextSequence(DbSession dbSession) |
long |
DbModelMysql.nextSequence(DbSession dbSession) |
long |
DbModelH2.nextSequence(DbSession dbSession) |
long |
EmptyDbModel.nextSequence(DbSession dbSession) |
long |
DbModelMariadb.nextSequence(DbSession dbSession) |
void |
DbModel.resetSequence(DbSession session,
long newvalue)
Reset the sequence (example)
|
void |
DbModelOracle.resetSequence(DbSession session,
long newvalue) |
void |
DbModelPostgresql.resetSequence(DbSession session,
long newvalue) |
void |
DbModelMysql.resetSequence(DbSession session,
long newvalue) |
void |
DbModelH2.resetSequence(DbSession session,
long newvalue) |
void |
EmptyDbModel.resetSequence(DbSession session,
long newvalue) |
void |
DbModelMariadb.resetSequence(DbSession session,
long newvalue) |
boolean |
DbModel.upgradeDb(DbSession session,
String version)
Upgrade Database from version
|
boolean |
EmptyDbModel.upgradeDb(DbSession session,
String version) |
void |
DbModel.validConnection(DbSession dbSession)
Validate connection
|
void |
DbModelPostgresql.validConnection(DbSession dbSession) |
void |
DbModelAbstract.validConnection(DbSession dbSession) |
void |
EmptyDbModel.validConnection(DbSession dbSession) |
protected void |
DbModelAbstract.validConnectionSelect(DbSession dbSession) |
Constructor and Description |
---|
DbModelH2()
Create the object and initialize if necessary the driver
|
DbModelH2(String dbserver,
String dbuser,
String dbpasswd)
Create the object and initialize if necessary the driver
|
DbModelMariadb()
Create the object and initialize if necessary the driver
|
DbModelMariadb(String dbserver,
String dbuser,
String dbpasswd)
Create the object and initialize if necessary the driver
|
DbModelMariadb(String dbserver,
String dbuser,
String dbpasswd,
Timer timer,
long delay)
Create the object and initialize if necessary the driver
|
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,
Timer timer,
long delay)
Create the object and initialize if necessary the driver
|
DbModelOracle()
Create the object and initialize if necessary the driver
|
DbModelOracle(String dbserver,
String dbuser,
String dbpasswd)
Create the object and initialize if necessary the driver
|
DbModelOracle(String dbserver,
String dbuser,
String dbpasswd,
Timer timer,
long delay)
Create the object and initialize if necessary the driver
|
DbModelPostgresql()
Create the object and initialize if necessary the driver
|
Copyright © 2009–2019 Waarp. All rights reserved.