public final class OraAdaptor extends DBAdaptor
| Constructor and Description |
|---|
OraAdaptor(ConnectionPool connectionPool,
DdlConsumer ddlConsumer) |
| Modifier and Type | Method and Description |
|---|---|
PreparedStatement |
deleteRecordSetStatement(Connection conn,
TableElement t,
String where)
Creates a PreparedStatement object for a DELETE statement for deleting a set of records that
satisfy a condition.
|
String |
getCallFunctionSql(ParameterizedView pv) |
DbColumnInfo |
getColumnInfo(Connection conn,
Column<?> c)
Returns information on a column.
|
Set<String> |
getColumns(Connection conn,
TableElement t)
Returns a set of column names for a specific table.
|
int |
getCurrentIdent(Connection conn,
BasicTable t)
Returns current identity value for the table.
|
int |
getDBPid(Connection conn)
Returns process id of current database connection.
|
PreparedStatement |
getDeleteRecordStatement(Connection conn,
TableElement t,
String where)
Creates a PreparedStatement object for a DELETE statement for deleting a set of records that
satisfy a condition.
|
List<DbFkInfo> |
getFKInfo(Connection conn,
Grain g)
Returns information on the foreign keys from grain.
|
Map<String,DbIndexInfo> |
getIndices(Connection conn,
Grain g)
Returns a set of indices referring to tables specified in the indicated grain.
|
String |
getInFilterClause(DataGrainElement dge,
DataGrainElement otherDge,
List<String> fields,
List<String> otherFields,
String otherWhere) |
PreparedStatement |
getInsertRecordStatement(Connection conn,
BasicTable t,
boolean[] nullsMask,
List<ParameterSetter> program)
Creates a PreparedStatement object for an INSERT statement to insert a record into a table.
|
PreparedStatement |
getNavigationStatement(Connection conn,
FromClause from,
String orderBy,
String navigationWhereClause,
Set<String> fields,
long offset)
Returns navigable PreparedStatement by a filtered set of records.
|
PreparedStatement |
getOneFieldStatement(Connection conn,
Column<?> c,
String where)
Creates a PreparedStatement object for a SELECT statement of a single column containing
at most one record.
|
PreparedStatement |
getOneRecordStatement(Connection conn,
TableElement t,
String where,
Set<String> fields)
Creates a PreparedStatement object for a SELECT statement containing at most one record.
|
List<String> |
getParameterizedViewList(Connection conn,
Grain g) |
DbPkInfo |
getPKInfo(Connection conn,
TableElement t)
Returns information on the primary key of a table.
|
DbSequenceInfo |
getSequenceInfo(Connection conn,
SequenceElement s)
Returns information on a sequence.
|
DBType |
getType()
Returns current database type.
|
List<String> |
getViewList(Connection conn,
Grain g)
Returns list of view names in the grain.
|
boolean |
isValidConnection(Connection conn,
int timeout)
Checking for connection validity.
|
long |
nextSequenceValue(Connection conn,
SequenceElement s)
Retrieves next value from the sequence.
|
boolean |
nullsFirst()
Does RDBMS sort nulls first?
|
String |
pkConstraintString(TableElement tableElement)
Returns DB specific PK constraint name for a table element.
|
ZonedDateTime |
prepareZonedDateTimeForParameterSetter(Connection conn,
ZonedDateTime z) |
boolean |
sequenceExists(Connection conn,
String schema,
String name)
Checks if sequence exists in the DB.
|
String |
sequenceString(String schemaName,
String sequenceName)
Returns template by sequence name.
|
boolean |
tableExists(Connection conn,
String schema,
String name)
Checks if table exists in the DB.
|
String |
tableString(String schemaName,
String tableName)
Returns template by table name.
|
String |
translateDate(String date)
Translates Celesta date literal to the one from specific database.
|
boolean |
triggerExists(Connection conn,
TriggerQuery query)
Checks if trigger exists in the DB.
|
alterSequence, compareStrings, createColumn, createFK, createIndex, createParameterizedView, createPK, createSchemaIfNotExists, createSequence, createSysObjects, createTable, createTableTriggersForMaterializedViews, createView, dropFK, dropIndex, dropParameterizedView, dropPk, dropSequence, dropTable, dropTableTriggersForMaterializedViews, dropTrigger, dropView, executeNative, getRecordSetStatement, getSetCountStatement, getTriggerBody, getUpdateRecordStatement, getViewSQLGenerator, initDataForMaterializedView, selectStaticStrings, supportsCortegeComparing, updateColumn, updateVersioningTrigger, userTablesExistpublic OraAdaptor(ConnectionPool connectionPool, DdlConsumer ddlConsumer)
public boolean tableExists(Connection conn, String schema, String name)
DBAdaptortableExists in class DBAdaptorconn - DB connectionschema - schema namename - table namepublic PreparedStatement getOneFieldStatement(Connection conn, Column<?> c, String where)
DBAdaptorgetOneFieldStatement in class DBAdaptorconn - DB connectionc - column to selectwhere - WHERE conditionpublic PreparedStatement getOneRecordStatement(Connection conn, TableElement t, String where, Set<String> fields)
DBAdaptorgetOneRecordStatement in class DBAdaptorconn - DB connectiont - tablewhere - WHERE conditionfields - fields of selectionpublic PreparedStatement getInsertRecordStatement(Connection conn, BasicTable t, boolean[] nullsMask, List<ParameterSetter> program)
DBAdaptorgetInsertRecordStatement in class DBAdaptorconn - DB connectiont - tablenullsMask - null-flags (if set the corresponding field at n-th position becomes null)program - collects parameters that can be set with the querypublic PreparedStatement getDeleteRecordStatement(Connection conn, TableElement t, String where)
DBAdaptorgetDeleteRecordStatement in class DBAdaptorconn - DB connectiont - tablewhere - condition (can be null)public Set<String> getColumns(Connection conn, TableElement t)
DBAdaptorgetColumns in class DBAdaptorconn - DB connectiont - Table to look the columns in.public PreparedStatement deleteRecordSetStatement(Connection conn, TableElement t, String where)
DBAdaptordeleteRecordSetStatement in class DBAdaptorconn - DB connectiont - tablewhere - conditionpublic boolean isValidConnection(Connection conn, int timeout)
DBAdaptorisValidConnection in class DBAdaptorconn - connectiontimeout - time-outtrue if connection is valid, otherwise falsepublic String tableString(String schemaName, String tableName)
DBAdaptortableString in class DBAdaptorschemaName - schema nametableName - table namepublic String sequenceString(String schemaName, String sequenceName)
DBAdaptorsequenceString in class DBAdaptorschemaName - schema namesequenceName - sequence namepublic String pkConstraintString(TableElement tableElement)
DBAdaptorpkConstraintString in class DBAdaptortableElement - table elementpublic int getCurrentIdent(Connection conn, BasicTable t)
DBAdaptorgetCurrentIdent in class DBAdaptorconn - DB connectiont - tablepublic String getInFilterClause(DataGrainElement dge, DataGrainElement otherDge, List<String> fields, List<String> otherFields, String otherWhere)
public DbColumnInfo getColumnInfo(Connection conn, Column<?> c)
DBAdaptorgetColumnInfo in class DBAdaptorconn - DB connectionc - columnpublic DbPkInfo getPKInfo(Connection conn, TableElement t)
DBAdaptorpublic List<DbFkInfo> getFKInfo(Connection conn, Grain g)
DBAdaptorpublic Map<String,DbIndexInfo> getIndices(Connection conn, Grain g)
DBAdaptorgetIndices in class DBAdaptorconn - DB connectiong - Grain the tables of which have to be traversed for the indices.public List<String> getViewList(Connection conn, Grain g)
DBAdaptorgetViewList in class DBAdaptorconn - DB connectiong - Grain for which the list of view names have to be returned.public List<String> getParameterizedViewList(Connection conn, Grain g)
getParameterizedViewList in class DBAdaptorpublic String getCallFunctionSql(ParameterizedView pv)
getCallFunctionSql in class DBAdaptorpublic boolean triggerExists(Connection conn, TriggerQuery query) throws SQLException
DBAdaptortriggerExists in class DBAdaptorconn - DB connection.query - trigger query parametersSQLException - thrown if resulting query failspublic PreparedStatement getNavigationStatement(Connection conn, FromClause from, String orderBy, String navigationWhereClause, Set<String> fields, long offset)
DBAdaptorgetNavigationStatement in class DBAdaptorconn - Connectionfrom - From clauseorderBy - Sorting order (ascending or descending)navigationWhereClause - Navigable set condition (from current record)fields - Fields of selectionoffset - First record offsetpublic String translateDate(String date)
DBAdaptortranslateDate in interface QueryBuildingHelpertranslateDate in class DBAdaptordate - Date literalpublic int getDBPid(Connection conn)
DBAdaptorpublic ZonedDateTime prepareZonedDateTimeForParameterSetter(Connection conn, ZonedDateTime z)
prepareZonedDateTimeForParameterSetter in interface QueryBuildingHelperprepareZonedDateTimeForParameterSetter in class DBAdaptorpublic boolean nullsFirst()
QueryBuildingHelperpublic DBType getType()
DBAdaptorpublic long nextSequenceValue(Connection conn, SequenceElement s)
DBAdaptornextSequenceValue in class DBAdaptorconn - DB connections - sequencepublic boolean sequenceExists(Connection conn, String schema, String name)
DBAdaptorsequenceExists in class DBAdaptorconn - DB connectionschema - schema namename - sequence namepublic DbSequenceInfo getSequenceInfo(Connection conn, SequenceElement s)
DBAdaptorgetSequenceInfo in class DBAdaptorconn - DB connections - sequenceCopyright © 2020 CURS. All rights reserved.