public class DerbyAdaptor extends JdbcAdaptor
JdbcAdaptor.PaginationParamsOrder| Constructor and Description |
|---|
DerbyAdaptor() |
| Modifier and Type | Method and Description |
|---|---|
String |
applyConcat(List<String> arguments)
Applies the concat operation to the arguments.
|
String |
applyLikeEscape(String escapePattern)
Appends the escape pattern.
|
String |
applyLock(String sql,
javax.persistence.LockModeType lockMode)
Applies the lock to SQL string.
|
String |
applyPagination(String sql,
int startPosition,
int maxResult)
Applies the pagination to SQL string.
|
String |
createColumnDDL(AbstractColumn column)
Creates(generates) the BasicColumn Definition DDL for the column.
|
void |
createSequenceIfNecessary(DataSource datasource,
SequenceGenerator sequence)
Creates the sequence if not exists.
|
protected void |
dropSequence(QueryRunner runner,
SequenceGenerator sequence)
Drops the sequence.
|
protected String |
getDatabaseName()
Returns the name of the database.
|
long |
getNextSequence(DataSource datasource,
String sequenceName)
Returns next sequence number from the database.
|
JdbcAdaptor.PaginationParamsOrder |
getPaginationParamsOrder()
Returns the pagination params order for the adaptor.
|
protected String[] |
getProductNames() |
String |
getSelectLastIdentitySql(BasicColumn identityColumn)
Returns the SQL to select the last identity generated.
|
protected boolean |
isForeignKeyHasDefaultIndex()
Underlining DB creates an index for foreign Keys
|
boolean |
modifiesParameters()
Returns if the JDBC adaptor modifies parameters.
|
void |
modifyParameters(ParameterMetaData metadata,
Object[] params)
Modifies the parameters.
|
boolean |
paginationNeedsMaxResultsAlways()
Returns if pagination always needs the max results paramater.
|
boolean |
paginationNeedsStartAlways()
Returns if pagination always needs the start paramater.
|
IdType |
supports(javax.persistence.GenerationType type)
Returns the id type supported.
|
createCreateTableStatement, createForeignKey, createIndex, createOrUpdateTable, createTableGeneratorIfNecessary, dropAllForeignKeys, dropAllSequences, dropAllTables, dropTable, escape, getColumns, getColumnType, getCurrentDate, getCurrentTime, getCurrentTimeStamp, getDateTimeFunctionTemplate, getDropForeignKeySql, getInsertBatchSize, getNumericFunctionTemplate, getPkCreateSql, getPkDropSql, getRemoveBatchSize, importSql, isPmdBroken, isTableRequiredPrimaryKey, logRelaxed, parameterizedPagination, qualified, setInsertBatchSize, setRemoveBatchSize, supportsNamedParams, supportsOrdinalParamsapplyCast, applySubStr, applyTrim, castBoolean, getAdapter, getCastClassNamepublic String applyConcat(List<String> arguments)
applyConcat in class AbstractJdbcAdaptorarguments - the argumentspublic String applyLikeEscape(String escapePattern)
applyLikeEscape in class AbstractJdbcAdaptorescapePattern - the escape patternpublic String applyLock(String sql, javax.persistence.LockModeType lockMode)
applyLock in class AbstractJdbcAdaptorsql - the SQL to applylockMode - the lock modepublic String applyPagination(String sql, int startPosition, int maxResult)
applyPagination in class AbstractJdbcAdaptorsql - the SQL to applystartPosition - the start positionmaxResult - the max number of resultspublic String createColumnDDL(AbstractColumn column)
createColumnDDL in class JdbcAdaptorcolumn - the column definition to create the DDL frompublic void createSequenceIfNecessary(DataSource datasource, SequenceGenerator sequence)
createSequenceIfNecessary in class JdbcAdaptordatasource - the datasource to usesequence - the sequence to createprotected void dropSequence(QueryRunner runner, SequenceGenerator sequence) throws SQLException
dropSequence in class JdbcAdaptorrunner - the runnersequence - the sequenceSQLException - thrown if SQL failsprotected String getDatabaseName()
getDatabaseName in class JdbcAdaptorpublic long getNextSequence(DataSource datasource, String sequenceName) throws SQLException
getNextSequence in class JdbcAdaptordatasource - the datasource to usesequenceName - the name of the sequenceSQLException - thrown in case of an SQL errorpublic JdbcAdaptor.PaginationParamsOrder getPaginationParamsOrder()
getPaginationParamsOrder in class JdbcAdaptorprotected String[] getProductNames()
getProductNames in class AbstractJdbcAdaptorpublic String getSelectLastIdentitySql(BasicColumn identityColumn)
getSelectLastIdentitySql in class JdbcAdaptoridentityColumn - the identity columnprotected boolean isForeignKeyHasDefaultIndex()
isForeignKeyHasDefaultIndex in class JdbcAdaptorpublic boolean modifiesParameters()
modifiesParameters in class JdbcAdaptorpublic void modifyParameters(ParameterMetaData metadata, Object[] params)
The default implementation does nothing.
Individual adaptors are free to modify.
modifyParameters in class JdbcAdaptormetadata - the statement's parameter metadataparams - the parameters to modifypublic boolean paginationNeedsMaxResultsAlways()
paginationNeedsMaxResultsAlways in class JdbcAdaptorpublic boolean paginationNeedsStartAlways()
paginationNeedsStartAlways in class JdbcAdaptorpublic IdType supports(javax.persistence.GenerationType type)
If the idType is null, the adapter should suggest an IdType in return.
If the idType is some other value than null then the adapter should either return the same IdType if supported or null value
in case the adapter does not support the specified IdType.
supports in class JdbcAdaptortype - the id typeIdType selected, the Id passed or nullCopyright © 2012-2013 Batoo. All Rights Reserved.