| com.completex.objective.components.persistency.core.DatabasePolicy
All known Subclasses: com.completex.objective.components.persistency.core.impl.AbstractDatabasePolicy,
DatabasePolicy | public interface DatabasePolicy (Code) | | Database policy. Has set of methods that "equalize" database differences.
author: Gennady Krizhevsky |
Inner Class :static class NullDatabasePolicy implements DatabasePolicy | |
Method Summary | |
String | charLengthSql(String expression) | String | connectionActiveSql() | String | dateSql(Date date) | OutputStream | getAsciiOutputStream(Clob lob) | OutputStream | getBinaryOutputStream(Blob lob) | Writer | getCharacterOutputStream(Clob lob) | int | getLimitLocation() | String | getLimitSql(int offset, int rowCount) | String | getLimitSql(int rowCount) | String | getLockHint(boolean lock, String tableName) | String | getLockString() | String | getLockString(long timeout, String forUpdateOf) | Character | getMultiSymbolWildCard() | String | getName() | String | getNoWaitLockString(String forUpdateOf) | Query | getPaginatedWrapperQuery(QueryFactory queryFactory, Query innerQuery) | int | getRefCursorJdbcType() | Character | getSingleSymbolWildCard() | void | handlePostInsert(Transaction transaction, Persistency persistency, Record record, Log logger) | boolean | isDuplicate(Exception e) | boolean | isLocked(Exception e) | public String | nextSequenceSql(String objectName) Return a SQL string to get the next sequence number for a table. | String | nowSql() | String | proprietoryJoin(Join join) | String | rlikeFunc(String expression, boolean matches) | String | rlikeSql(String expression, String pattern, boolean matches) | boolean | supportsAutoincrement() | boolean | supportsBlob() | boolean | supportsClob() | boolean | supportsExplicitRecordLevelLocks() | boolean | supportsLimit() | boolean | supportsSequences() | boolean | supportsSubqueries() | boolean | useAnsiJoin() See Also: DatabasePolicy.proprietoryJoin(Join) See Also: true if ANSI join is to be used. | boolean | useClobOutputStream() Indicator for type handlers to whether to do Clob write processing as a "post-processing". | boolean | useTwoStepBinaryUpdate() Indicator for type handlers to whether to do Blob write processing as a "post-processing". |
LIMIT_IN_SELECT | int LIMIT_IN_SELECT(Code) | | |
LIMIT_IN_THE_END | int LIMIT_IN_THE_END(Code) | | |
LIMIT_IN_WHERE | int LIMIT_IN_WHERE(Code) | | |
NO_LIMIT | int NO_LIMIT(Code) | | Limit locations:
|
charLengthSql | String charLengthSql(String expression)(Code) | | Parameters: expression - sql fragment that uses database specific function to get Length in characters |
connectionActiveSql | String connectionActiveSql()(Code) | | sql fragment that can be used to check if connection is active |
dateSql | String dateSql(Date date)(Code) | | Something like oracle's "to_date"
Parameters: date - date sql fragment |
getLimitLocation | int getLimitLocation()(Code) | | one of int NO_LIMIT, LIMIT_IN_SELECT, LIMIT_IN_WHERE, LIMIT_IN_THE_END values |
getLimitSql | String getLimitSql(int offset, int rowCount)(Code) | | Produces limit sql string fragment
Parameters: offset - - zero based offset Parameters: rowCount - number rows to bring limit String |
getLimitSql | String getLimitSql(int rowCount)(Code) | | Produces limit sql string fragment
Parameters: rowCount - number rows to bring limit String |
getLockHint | String getLockHint(boolean lock, String tableName)(Code) | | Something like "holdlock" in MySql
Parameters: lock - Parameters: tableName - lock hint |
getLockString | String getLockString()(Code) | | lock string getLockString(timeout = 0, forUpdateOf = null); |
getLockString | String getLockString(long timeout, String forUpdateOf)(Code) | | Parameters: timeout - Parameters: forUpdateOf - lock string |
getMultiSymbolWildCard | Character getMultiSymbolWildCard()(Code) | | Like '%' in oracle
Multi Symbol Wild Card |
getNoWaitLockString | String getNoWaitLockString(String forUpdateOf)(Code) | | Gets lock string that will cause throwing an exception in case of lock encountered
Parameters: forUpdateOf - No Wait Lock String |
getPaginatedWrapperQuery | Query getPaginatedWrapperQuery(QueryFactory queryFactory, Query innerQuery)(Code) | | Defines the way paginatedquery is produced from the "normal" one through means of database
Parameters: queryFactory - Parameters: innerQuery - Paginated Wrapper Query |
getRefCursorJdbcType | int getRefCursorJdbcType()(Code) | | type that is used to replesent Reference Cursor |
getSingleSymbolWildCard | Character getSingleSymbolWildCard()(Code) | | Like '_' in oracle
Single Symbol Wild Card |
handlePostInsert | void handlePostInsert(Transaction transaction, Persistency persistency, Record record, Log logger) throws SQLException(Code) | | Method will be called after insert to enable populating certain values in the Record
Parameters: transaction - Parameters: persistency - Parameters: record - Parameters: logger - throws: SQLException - |
isDuplicate | boolean isDuplicate(Exception e)(Code) | | Parameters: e - true if exception happend because of the duplicate record |
isLocked | boolean isLocked(Exception e)(Code) | | Parameters: e - true if exception happend because of the lock |
nextSequenceSql | public String nextSequenceSql(String objectName)(Code) | | Return a SQL string to get the next sequence number for a table. When executed, this SQL should return a one
column, one row result set with an integer.
Parameters: objectName - a value of type 'String' a value of type 'String' |
nowSql | String nowSql()(Code) | | sql fragment with database system date |
proprietoryJoin | String proprietoryJoin(Join join)(Code) | | Builds proprietory Join sql fragment
Parameters: join - proprietory Join sql fragment |
rlikeFunc | String rlikeFunc(String expression, boolean matches)(Code) | | Parameters: expression - Parameters: matches - false in case of negation "regular expression like" sql fragment that uses placeholder "?" instead of pattern |
rlikeSql | String rlikeSql(String expression, String pattern, boolean matches)(Code) | | Parameters: expression - Parameters: pattern - Parameters: matches - false in case of negation "regular expression like" sql fragment |
supportsAutoincrement | boolean supportsAutoincrement()(Code) | | |
supportsBlob | boolean supportsBlob()(Code) | | Returns true if driver supports ResultSet.getBlob syntax
true if driver supports ResultSet.getBlob syntax |
supportsClob | boolean supportsClob()(Code) | | Returns true if driver supports ResultSet.getClob syntax
true if driver supports ResultSet.getClob syntax |
supportsExplicitRecordLevelLocks | boolean supportsExplicitRecordLevelLocks()(Code) | | |
supportsLimit | boolean supportsLimit()(Code) | | true if database supports limit clause |
supportsSequences | boolean supportsSequences()(Code) | | |
supportsSubqueries | boolean supportsSubqueries()(Code) | | true if database supports subqueries |
useClobOutputStream | boolean useClobOutputStream()(Code) | | Indicator for type handlers to whether to do Clob write processing as a "post-processing".
In which case the type hadler will try to extract InputStream the value object.
Otherwise binding for write is done in usual way by setObject method
true if Clob is to be wtitten as post-processing |
useTwoStepBinaryUpdate | boolean useTwoStepBinaryUpdate()(Code) | | Indicator for type handlers to whether to do Blob write processing as a "post-processing".
In which case the type hadler will try to extract InputStream the value object.
Otherwise binding for write is done in usual way by setObject method
true if Blob is to be wtitten as post-processing |
|
|