Package | Description |
---|---|
com.feedzai.commons.sql.abstraction.batch |
Contains a batch to periodically flushes to the database.
|
com.feedzai.commons.sql.abstraction.dml.result |
Columns results implementations.
|
com.feedzai.commons.sql.abstraction.engine |
Contains the database engine core.
|
com.feedzai.commons.sql.abstraction.engine.impl |
Database specific implementations.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractBatch.add(BatchEntry batchEntry)
Adds the fields to the batch.
|
void |
AbstractBatch.add(String entityName,
EntityEntry ee)
Adds the fields to the batch.
|
Modifier and Type | Method and Description |
---|---|
Map<String,ResultColumn> |
ResultIterator.next()
Retrieves the next row in the result set.
|
Modifier and Type | Method and Description |
---|---|
void |
DatabaseEngine.addBatch(String name,
EntityEntry entry)
Adds an entry to the batch.
|
void |
AbstractDatabaseEngine.addBatch(String name,
EntityEntry entry)
Add an entry to the batch.
|
protected abstract void |
AbstractDatabaseEngine.addColumn(DbEntity entity,
DbColumn... columns)
Adds the column to an existent table.
|
void |
DatabaseEngine.addEntity(DbEntity entity)
Adds an entity to the engine.
|
void |
AbstractDatabaseEngine.addEntity(DbEntity entity)
Adds an entity to the engine.
|
protected abstract void |
AbstractDatabaseEngine.addFks(DbEntity entity)
Adds the FKs.
|
protected abstract void |
AbstractDatabaseEngine.addIndexes(DbEntity entity)
Add the desired indexes.
|
protected abstract void |
AbstractDatabaseEngine.addPrimaryKey(DbEntity entity)
Add a primary key to the entity.
|
protected abstract void |
AbstractDatabaseEngine.addSequences(DbEntity entity)
Adds the necessary sequences.
|
void |
DatabaseEngine.clearParameters(String name)
Clears the prepared statement parameters.
|
void |
AbstractDatabaseEngine.clearParameters(String name)
Clears the prepared statement parameters.
|
void |
DatabaseEngine.createPreparedStatement(String name,
Expression query)
Creates a prepared statement.
|
void |
AbstractDatabaseEngine.createPreparedStatement(String name,
Expression query) |
void |
DatabaseEngine.createPreparedStatement(String name,
Expression query,
int timeout)
Creates a prepared statement.
|
void |
AbstractDatabaseEngine.createPreparedStatement(String name,
Expression query,
int timeout) |
void |
DatabaseEngine.createPreparedStatement(String name,
String query)
Creates a prepared statement.
|
void |
AbstractDatabaseEngine.createPreparedStatement(String name,
String query) |
void |
DatabaseEngine.createPreparedStatement(String name,
String query,
int timeout)
Creates a prepared statement.
|
void |
AbstractDatabaseEngine.createPreparedStatement(String name,
String query,
int timeout) |
protected abstract MappedEntity |
AbstractDatabaseEngine.createPreparedStatementForInserts(DbEntity entity)
Creates and gets the prepared statement that will be used for insertions.
|
protected abstract ResultIterator |
AbstractDatabaseEngine.createResultIterator(PreparedStatement ps)
Creates a specific
ResultIterator for the engine in place given given prepared statement. |
protected abstract ResultIterator |
AbstractDatabaseEngine.createResultIterator(Statement statement,
String sql)
Creates a specific
ResultIterator given the engine implementation. |
protected abstract void |
AbstractDatabaseEngine.createTable(DbEntity entity)
Creates the table.
|
protected abstract void |
AbstractDatabaseEngine.dropColumn(DbEntity entity,
String... columns)
Drops the column.
|
void |
AbstractDatabaseEngine.dropEntity(DbEntity entity)
Drops everything that belongs to the entity.
|
void |
DatabaseEngine.dropEntity(String entity)
Drops an entity.
|
void |
AbstractDatabaseEngine.dropEntity(String entity)
Drops an entity.
|
protected void |
AbstractDatabaseEngine.dropFks(String table)
Drops this table foreign keys.
|
protected abstract void |
AbstractDatabaseEngine.dropSequences(DbEntity entity)
Drops the sequences of the entity.
|
protected abstract void |
AbstractDatabaseEngine.dropTable(DbEntity entity)
Drops the table.
|
protected abstract int |
AbstractDatabaseEngine.entityToPreparedStatement(DbEntity entity,
PreparedStatement ps,
EntityEntry entry,
boolean useAutoIncs)
Translates the given entry entity to the prepared statement.
|
void |
DatabaseEngine.executePS(String name)
Executes the specified prepared statement.
|
void |
AbstractDatabaseEngine.executePS(String name)
Executes the specified prepared statement.
|
Integer |
DatabaseEngine.executePSUpdate(String name)
Executes update on the specified prepared statement.
|
Integer |
AbstractDatabaseEngine.executePSUpdate(String name)
Executes update on the specified prepared statement.
|
int |
DatabaseEngine.executeUpdate(Expression query)
Executes the given update.
|
int |
AbstractDatabaseEngine.executeUpdate(Expression query)
Executes the given update.
|
int |
DatabaseEngine.executeUpdate(String query)
Executes a native query.
|
int |
AbstractDatabaseEngine.executeUpdate(String query)
Executes a native query.
|
void |
DatabaseEngine.flush()
Flushes the batches for all the registered entities.
|
void |
AbstractDatabaseEngine.flush()
Flushes the batches for all the registered entities.
|
Map<String,DbEntityType> |
DatabaseEngine.getEntities()
Gets the database entities.
|
Map<String,DbEntityType> |
AbstractDatabaseEngine.getEntities()
Gets the database entities.
|
Map<String,DbColumnType> |
DatabaseEngine.getMetadata(String name)
Gets the table metadata.
|
Map<String,DbColumnType> |
AbstractDatabaseEngine.getMetadata(String name)
Gets the table metadata.
|
ResultIterator |
DatabaseEngine.getPSIterator(String name)
Creates an iterator for the
PreparedStatement bound to the given name. |
ResultIterator |
AbstractDatabaseEngine.getPSIterator(String name) |
List<Map<String,ResultColumn>> |
DatabaseEngine.getPSResultSet(String name)
Gets the result set of the specified prepared statement.
|
List<Map<String,ResultColumn>> |
AbstractDatabaseEngine.getPSResultSet(String name)
Gets the result set of the specified prepared statement.
|
Map<String,DbColumnType> |
DatabaseEngine.getQueryMetadata(Expression query)
Gets the query metadata.
|
Map<String,DbColumnType> |
AbstractDatabaseEngine.getQueryMetadata(Expression query)
Gets the query metadata.
|
Map<String,DbColumnType> |
DatabaseEngine.getQueryMetadata(String query)
Gets the query metadata.
|
Map<String,DbColumnType> |
AbstractDatabaseEngine.getQueryMetadata(String query)
Gets the query metadata.
|
protected void |
AbstractDatabaseEngine.handleOperation(OperationFault op,
Exception e)
Controls if the given faulty operation must be silenced or not.
|
ResultIterator |
DatabaseEngine.iterator(Expression query)
Creates an iterator for the given SQL expression.
|
ResultIterator |
AbstractDatabaseEngine.iterator(Expression query) |
ResultIterator |
DatabaseEngine.iterator(String query)
Creates an iterator for the given SQL sentence.
|
ResultIterator |
AbstractDatabaseEngine.iterator(String query) |
Long |
DatabaseEngine.persist(String name,
EntityEntry entry)
Persists a given entry.
|
abstract Long |
AbstractDatabaseEngine.persist(String name,
EntityEntry entry)
Persists a given entry.
|
Long |
DatabaseEngine.persist(String name,
EntityEntry entry,
boolean useAutoInc)
Persists a given entry.
|
abstract Long |
AbstractDatabaseEngine.persist(String name,
EntityEntry entry,
boolean useAutoInc)
Persists a given entry.
|
protected List<Map<String,ResultColumn>> |
AbstractDatabaseEngine.processResultIterator(ResultIterator it)
Process a whole
ResultIterator . |
List<Map<String,ResultColumn>> |
DatabaseEngine.query(Expression query)
Executes the given query.
|
List<Map<String,ResultColumn>> |
AbstractDatabaseEngine.query(Expression query)
Executes the given query.
|
List<Map<String,ResultColumn>> |
DatabaseEngine.query(String query)
Executes the given native query.
|
List<Map<String,ResultColumn>> |
AbstractDatabaseEngine.query(String query)
Executes the given query.
|
void |
DatabaseEngine.setParameter(String name,
int index,
Object param)
Sets the parameter on the specified index.
|
void |
AbstractDatabaseEngine.setParameter(String name,
int index,
Object param) |
void |
DatabaseEngine.setParameters(String name,
Object... params)
Sets the parameters on the specified prepared statement.
|
void |
AbstractDatabaseEngine.setParameters(String name,
Object... params) |
protected abstract String |
AbstractDatabaseEngine.translateType(DbColumn c)
Translates the type present in the given column.
|
void |
DatabaseEngine.updateEntity(DbEntity entity)
Updates an entity in the engine.
|
void |
AbstractDatabaseEngine.updateEntity(DbEntity entity)
Updates an entity in the engine.
|
Constructor and Description |
---|
AbstractDatabaseEngine(String driver,
PdbProperties properties,
Dialect dialect)
Creates a new instance of
AbstractDatabaseEngine . |
Modifier and Type | Method and Description |
---|---|
protected void |
MySqlEngine.addColumn(DbEntity entity,
DbColumn... columns) |
protected void |
DB2Engine.addColumn(DbEntity entity,
DbColumn... columns) |
protected void |
PostgreSqlEngine.addColumn(DbEntity entity,
DbColumn... columns) |
protected void |
SqlServerEngine.addColumn(DbEntity entity,
DbColumn... columns) |
protected void |
H2Engine.addColumn(DbEntity entity,
DbColumn... columns) |
protected void |
OracleEngine.addColumn(DbEntity entity,
DbColumn... columns) |
protected void |
MySqlEngine.addFks(DbEntity entity) |
protected void |
DB2Engine.addFks(DbEntity entity) |
protected void |
PostgreSqlEngine.addFks(DbEntity entity) |
protected void |
SqlServerEngine.addFks(DbEntity entity) |
protected void |
H2Engine.addFks(DbEntity entity) |
protected void |
OracleEngine.addFks(DbEntity entity) |
protected void |
MySqlEngine.addIndexes(DbEntity entity) |
protected void |
DB2Engine.addIndexes(DbEntity entity) |
protected void |
PostgreSqlEngine.addIndexes(DbEntity entity) |
protected void |
SqlServerEngine.addIndexes(DbEntity entity) |
protected void |
H2Engine.addIndexes(DbEntity entity) |
protected void |
OracleEngine.addIndexes(DbEntity entity) |
protected void |
MySqlEngine.addPrimaryKey(DbEntity entity) |
protected void |
DB2Engine.addPrimaryKey(DbEntity entity) |
protected void |
PostgreSqlEngine.addPrimaryKey(DbEntity entity) |
protected void |
SqlServerEngine.addPrimaryKey(DbEntity entity) |
protected void |
H2Engine.addPrimaryKey(DbEntity entity) |
protected void |
OracleEngine.addPrimaryKey(DbEntity entity) |
protected void |
MySqlEngine.addSequences(DbEntity entity) |
protected void |
DB2Engine.addSequences(DbEntity entity) |
protected void |
PostgreSqlEngine.addSequences(DbEntity entity) |
protected void |
SqlServerEngine.addSequences(DbEntity entity) |
protected void |
H2Engine.addSequences(DbEntity entity) |
protected void |
OracleEngine.addSequences(DbEntity entity) |
protected MappedEntity |
MySqlEngine.createPreparedStatementForInserts(DbEntity entity) |
protected MappedEntity |
DB2Engine.createPreparedStatementForInserts(DbEntity entity) |
protected MappedEntity |
PostgreSqlEngine.createPreparedStatementForInserts(DbEntity entity) |
protected MappedEntity |
SqlServerEngine.createPreparedStatementForInserts(DbEntity entity) |
protected MappedEntity |
H2Engine.createPreparedStatementForInserts(DbEntity entity) |
protected MappedEntity |
OracleEngine.createPreparedStatementForInserts(DbEntity entity) |
protected ResultIterator |
MySqlEngine.createResultIterator(PreparedStatement ps) |
protected ResultIterator |
DB2Engine.createResultIterator(PreparedStatement ps) |
protected ResultIterator |
PostgreSqlEngine.createResultIterator(PreparedStatement ps) |
protected ResultIterator |
SqlServerEngine.createResultIterator(PreparedStatement ps) |
protected ResultIterator |
H2Engine.createResultIterator(PreparedStatement ps) |
protected ResultIterator |
OracleEngine.createResultIterator(PreparedStatement ps) |
protected ResultIterator |
MySqlEngine.createResultIterator(Statement statement,
String sql) |
protected ResultIterator |
DB2Engine.createResultIterator(Statement statement,
String sql) |
protected ResultIterator |
PostgreSqlEngine.createResultIterator(Statement statement,
String sql) |
protected ResultIterator |
SqlServerEngine.createResultIterator(Statement statement,
String sql) |
protected ResultIterator |
H2Engine.createResultIterator(Statement statement,
String sql) |
protected ResultIterator |
OracleEngine.createResultIterator(Statement statement,
String sql) |
protected void |
MySqlEngine.createTable(DbEntity entity) |
protected void |
DB2Engine.createTable(DbEntity entity) |
protected void |
PostgreSqlEngine.createTable(DbEntity entity) |
protected void |
SqlServerEngine.createTable(DbEntity entity) |
protected void |
H2Engine.createTable(DbEntity entity) |
protected void |
OracleEngine.createTable(DbEntity entity) |
protected void |
MySqlEngine.dropColumn(DbEntity entity,
String... columns) |
protected void |
DB2Engine.dropColumn(DbEntity entity,
String... columns) |
protected void |
PostgreSqlEngine.dropColumn(DbEntity entity,
String... columns) |
protected void |
SqlServerEngine.dropColumn(DbEntity entity,
String... columns) |
protected void |
H2Engine.dropColumn(DbEntity entity,
String... columns) |
protected void |
OracleEngine.dropColumn(DbEntity entity,
String... columns) |
protected void |
MySqlEngine.dropFks(String table) |
protected void |
MySqlEngine.dropReferringFks(DbEntity entity) |
protected void |
SqlServerEngine.dropReferringFks(DbEntity entity) |
protected void |
MySqlEngine.dropSequences(DbEntity entity) |
protected void |
DB2Engine.dropSequences(DbEntity entity) |
protected void |
PostgreSqlEngine.dropSequences(DbEntity entity) |
protected void |
SqlServerEngine.dropSequences(DbEntity entity) |
protected void |
H2Engine.dropSequences(DbEntity entity) |
protected void |
OracleEngine.dropSequences(DbEntity entity) |
protected void |
MySqlEngine.dropTable(DbEntity entity) |
protected void |
DB2Engine.dropTable(DbEntity entity) |
protected void |
PostgreSqlEngine.dropTable(DbEntity entity) |
protected void |
SqlServerEngine.dropTable(DbEntity entity) |
protected void |
H2Engine.dropTable(DbEntity entity) |
protected void |
OracleEngine.dropTable(DbEntity entity) |
protected int |
MySqlEngine.entityToPreparedStatement(DbEntity entity,
PreparedStatement ps,
EntityEntry entry,
boolean useAutoInc) |
protected int |
DB2Engine.entityToPreparedStatement(DbEntity entity,
PreparedStatement ps,
EntityEntry entry,
boolean useAutoInc) |
protected int |
PostgreSqlEngine.entityToPreparedStatement(DbEntity entity,
PreparedStatement ps,
EntityEntry entry,
boolean useAutoInc) |
protected int |
SqlServerEngine.entityToPreparedStatement(DbEntity entity,
PreparedStatement ps,
EntityEntry entry,
boolean useAutoInc) |
protected int |
H2Engine.entityToPreparedStatement(DbEntity entity,
PreparedStatement ps,
EntityEntry entry,
boolean useAutoInc) |
protected int |
OracleEngine.entityToPreparedStatement(DbEntity entity,
PreparedStatement ps,
EntityEntry entry,
boolean useAutoInc) |
int |
SqlServerEngine.executeUpdate(Expression query) |
int |
DB2Engine.executeUpdate(String query) |
Map<String,DbColumnType> |
DB2Engine.getMetadata(String name) |
Map<String,DbColumnType> |
PostgreSqlEngine.getMetadata(String name) |
Map<String,DbColumnType> |
OracleEngine.getMetadata(String name) |
ResultIterator |
MySqlEngine.iterator(String query) |
Long |
MySqlEngine.persist(String name,
EntityEntry entry) |
Long |
DB2Engine.persist(String name,
EntityEntry entry) |
Long |
PostgreSqlEngine.persist(String name,
EntityEntry entry) |
Long |
SqlServerEngine.persist(String name,
EntityEntry entry) |
Long |
H2Engine.persist(String name,
EntityEntry entry) |
Long |
OracleEngine.persist(String name,
EntityEntry entry) |
Long |
MySqlEngine.persist(String name,
EntityEntry entry,
boolean useAutoInc) |
Long |
DB2Engine.persist(String name,
EntityEntry entry,
boolean useAutoInc) |
Long |
PostgreSqlEngine.persist(String name,
EntityEntry entry,
boolean useAutoInc) |
Long |
SqlServerEngine.persist(String name,
EntityEntry entry,
boolean useAutoInc) |
Long |
H2Engine.persist(String name,
EntityEntry entry,
boolean useAutoInc) |
Long |
OracleEngine.persist(String name,
EntityEntry entry,
boolean useAutoInc) |
void |
DB2Engine.setParameter(String name,
int index,
Object param) |
void |
DB2Engine.setParameters(String name,
Object... params) |
protected String |
MySqlEngine.translateType(DbColumn c) |
protected String |
DB2Engine.translateType(DbColumn c) |
protected String |
PostgreSqlEngine.translateType(DbColumn c) |
protected String |
SqlServerEngine.translateType(DbColumn c) |
protected String |
H2Engine.translateType(DbColumn c) |
protected String |
OracleEngine.translateType(DbColumn c) |
void |
DB2Engine.updateEntity(DbEntity entity) |
Constructor and Description |
---|
DB2Engine(PdbProperties properties)
Creates a new DB2 connection.
|
H2Engine(PdbProperties properties)
Creates a new PostgreSql connection.
|
MySqlEngine(PdbProperties properties)
Creates a new MySQL connection.
|
OracleEngine(PdbProperties properties)
Creates a new Oracle connection.
|
PostgreSqlEngine(PdbProperties properties)
Creates a new PostgreSql connection.
|
SqlServerEngine(PdbProperties properties)
Creates a new SQL Server connection.
|
Copyright © 2014 Feedzai. All Rights Reserved.