public class MsSqlAdaptor extends JdbcAdaptor
JdbcAdaptor.PaginationParamsOrder| Constructor and Description |
|---|
MsSqlAdaptor() |
| 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,
LockModeType lockMode)
Applies the lock to SQL string.
|
String |
applyPagination(String sql,
int startPosition,
int maxResult)
Applies the pagination to SQL string.
|
String |
applySubStr(String innerFragment,
String startFragment,
String endFragment)
Returns the sub string function.
|
String |
applyTrim(CriteriaBuilder.Trimspec trimspec,
String trimChar,
String argument)
Applies the trim to argument
|
String |
castBoolean(String sqlFragment)
Casts the expression to boolean if necessary.
|
String |
createColumnDDL(AbstractColumn column)
Creates the BasicColumn Definition DDL For the column.
|
void |
createSequenceIfNecessary(DataSource datasource,
SequenceGenerator sequence)
Creates the sequence if not exists.
|
protected String |
getColumnType(AbstractColumn cd,
int sqlType)
Returns the data type of the column.
|
String |
getCurrentDate()
Returns the current date literal
|
String |
getCurrentTime()
Returns the current time literal
|
String |
getCurrentTimeStamp()
Returns the current time stamp literal
|
protected String |
getDatabaseName() |
long |
getNextSequence(DataSourceImpl datasource,
String sequenceName)
Returns next sequence number from the database.
|
String |
getNumericFunctionTemplate(NumericFunctionExpression.NumericFunctionType type)
Returns the numeric function template.
|
JdbcAdaptor.PaginationParamsOrder |
getPaginationParamsOrder()
Returns the pagination params order for the adaptor.
|
protected String[] |
getProductNames() |
String |
getSelectLastIdentitySql(PkColumn identityColumn)
Returns the SQL to select the last identity generated.
|
boolean |
isPmdBroken()
Returns if the PMD is Broken for the adaptor.
|
boolean |
paginationNeedsMaxResultsAlways()
Returns if pagination always needs the max results paramater.
|
boolean |
paginationNeedsStartAlways()
Returns if pagination always needs the start paramater.
|
IdType |
supports(GenerationType type)
Returns the id type supported.
|
createCreateTableStatement, createForeignKey, createIndex, createOrUpdateTable, createTableGeneratorIfNecessary, dropAllForeignKeys, dropAllSequences, dropAllTables, dropSequence, escape, getColumns, getDropForeignKeySql, getPkCreateSql, getPkDropSql, logRelaxed, qualifiedgetAdapterpublic String applyConcat(List<String> arguments)
applyConcat in class JdbcAdaptorarguments - the argumentspublic String applyLikeEscape(String escapePattern)
applyLikeEscape in class JdbcAdaptorescapePattern - the escape patternpublic String applyLock(String sql, LockModeType lockMode)
applyLock in class JdbcAdaptorsql - the SQL to applylockMode - the lock modepublic String applyPagination(String sql, int startPosition, int maxResult)
applyPagination in class JdbcAdaptorsql - the SQL to applystartPosition - the start positionmaxResult - the max number of resultspublic String applySubStr(String innerFragment, String startFragment, String endFragment)
applySubStr in class JdbcAdaptorinnerFragment - the inner fragmentstartFragment - the start fragmentendFragment - the end fragmentpublic String applyTrim(CriteriaBuilder.Trimspec trimspec, String trimChar, String argument)
applyTrim in class JdbcAdaptortrimspec - the trim spectrimChar - the trim characterargument - the argumentpublic String castBoolean(String sqlFragment)
castBoolean in class JdbcAdaptorsqlFragment - the SQL Fragmentpublic 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 String getColumnType(AbstractColumn cd, int sqlType)
getColumnType in class JdbcAdaptorcd - the column definitionsqlType - the sql typepublic String getCurrentDate()
getCurrentDate in class JdbcAdaptorpublic String getCurrentTime()
getCurrentTime in class JdbcAdaptorpublic String getCurrentTimeStamp()
getCurrentTimeStamp in class JdbcAdaptorprotected String getDatabaseName()
getDatabaseName in class JdbcAdaptorpublic long getNextSequence(DataSourceImpl 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 String getNumericFunctionTemplate(NumericFunctionExpression.NumericFunctionType type)
getNumericFunctionTemplate in class JdbcAdaptortype - the id typeIdType selected, the Id passed or nullpublic JdbcAdaptor.PaginationParamsOrder getPaginationParamsOrder()
getPaginationParamsOrder in class JdbcAdaptorprotected String[] getProductNames()
getProductNames in class AbstractJdbcAdaptorpublic String getSelectLastIdentitySql(PkColumn identityColumn)
getSelectLastIdentitySql in class JdbcAdaptoridentityColumn - the identity columnpublic boolean isPmdBroken()
isPmdBroken in class JdbcAdaptorpublic boolean paginationNeedsMaxResultsAlways()
paginationNeedsMaxResultsAlways in class JdbcAdaptorpublic boolean paginationNeedsStartAlways()
paginationNeedsStartAlways in class JdbcAdaptorpublic IdType supports(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 Batoo Software & Consultancy. All Rights Reserved.