public abstract class AbstractJdbcAdaptor extends Object
| Constructor and Description |
|---|
AbstractJdbcAdaptor() |
| Modifier and Type | Method and Description |
|---|---|
String |
applyCast(String argument,
Class<?> clazz)
Applies cast operation to the expression.
|
abstract String |
applyConcat(List<String> arguments)
Applies the concat operation to the arguments.
|
abstract String |
applyLikeEscape(String escapePattern)
Appends the escape pattern.
|
abstract String |
applyLock(String sql,
javax.persistence.LockModeType lockMode)
Applies the lock to SQL string.
|
abstract 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(javax.persistence.criteria.CriteriaBuilder.Trimspec trimspec,
String trimChar,
String argument)
Applies the trim to argument
|
String |
castBoolean(String sqlFragment)
Casts the expression to boolean if necessary.
|
static JdbcAdaptor |
getAdapter(ClassLoader classloader,
String databaseProductName)
Returns the JDBC Adapter.
|
protected String |
getCastClassName(Class<?> clazz)
Returns the clazz to DB type data type.
|
protected abstract String[] |
getProductNames() |
public static JdbcAdaptor getAdapter(ClassLoader classloader, String databaseProductName)
classloader - the class loaderdatabaseProductName - the name of the database productpublic String applyCast(String argument, Class<?> clazz)
argument - the SQL argumentclazz - the class to castpublic abstract String applyConcat(List<String> arguments)
arguments - the argumentspublic abstract String applyLikeEscape(String escapePattern)
escapePattern - the escape patternpublic abstract String applyLock(String sql, javax.persistence.LockModeType lockMode)
sql - the SQL to applylockMode - the lock modepublic abstract String applyPagination(String sql, int startPosition, int maxResult)
sql - the SQL to applystartPosition - the start positionmaxResult - the max number of resultspublic String applySubStr(String innerFragment, String startFragment, String endFragment)
innerFragment - the inner fragmentstartFragment - the start fragmentendFragment - the end fragmentpublic String applyTrim(javax.persistence.criteria.CriteriaBuilder.Trimspec trimspec, String trimChar, String argument)
trimspec - the trim spectrimChar - the trim characterargument - the argumentpublic String castBoolean(String sqlFragment)
sqlFragment - the SQL Fragmentprotected String getCastClassName(Class<?> clazz)
clazz - the original cast classprotected abstract String[] getProductNames()
Copyright © 2012-2013 Batoo. All Rights Reserved.