public class AnsiDialect extends Object implements SqlDialect
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
name  | 
static Pattern | 
patternORDER_BY  | 
| Constructor and Description | 
|---|
AnsiDialect()  | 
| Modifier and Type | Method and Description | 
|---|---|
SqlFeature | 
addFeature(SqlFeature sqlFeature)
Override a SQL ANSI feature 
 | 
String | 
buildQueryCount(String sqlText)
Build a paginate query to count the total of records from  
sqlText | 
String | 
buildQueryPaging(String sqlText,
                int offset,
                int max)
Build a paginate query accordingly data base dialect 
 | 
String | 
buildQueryPaging(String sqlText,
                int offset,
                int max,
                String bookmark)
Build a paginate query accordingly data base dialect 
 | 
protected int | 
countOccurrencesOf(String str,
                  String sub)
Count the occurrences of the substring in string s. 
 | 
PropertyAccess | 
getAccessId()
The access name for  
id field, the identifier from an entity | 
PropertyAccess | 
getAccessRevision()
The access name for  
revision field, a revision number from an entity | 
int | 
getMaxOfParameters()
Return the limit of elements in an  
INPUT parameter the database supports. | 
String | 
getSqlPatternCount()
The template to mount the  
COUNT SQL | 
String | 
getSqlPatternPaging()
The template to mount the SQL paginated, using LIMIT and OFFSET 
 clauses according the specific database 
 | 
String | 
name()
Dialect name 
 | 
void | 
setMaxOfParameters(int max)
Max number of parameters supported by JDBC driver 
 | 
protected Matcher | 
sqlEndsWithOrderBy(String sql)  | 
protected Matcher | 
sqlEndWithForUpdate(String sql)  | 
protected Matcher | 
sqlStartWithSelect(String sql)  | 
protected Matcher | 
sqlStartWithSelectOrDistinct(String sql)  | 
boolean | 
supportsFeature(SqlFeatureSupport feature)
verify if dialect instance supports  
feature specified | 
boolean | 
supportsParmMark(ParamMarkType paramParse)
verify if dialect supports a specific  
ParamMarkType | 
public static final Pattern patternORDER_BY
public AnsiDialect()
public String name()
SqlDialectname in interface SqlDialectpublic boolean supportsFeature(SqlFeatureSupport feature)
SqlDialectfeature specifiedsupportsFeature in interface SqlDialectfeature - to checktrue when the dialect supports, false otherwisepublic boolean supportsParmMark(ParamMarkType paramParse)
SqlDialectParamMarkTypesupportsParmMark in interface SqlDialectparamParse - parameter mark typetrue when the parse type is supported, false otherwisepublic SqlFeature addFeature(SqlFeature sqlFeature)
SqlDialectaddFeature in interface SqlDialectsqlFeature - override a SqlFeature supports.sqlFeaturepublic int getMaxOfParameters()
SqlDialectINPUT parameter the database supports.getMaxOfParameters in interface SqlDialectInteger.MAX_VALUEpublic void setMaxOfParameters(int max)
SqlDialectsetMaxOfParameters in interface SqlDialectmax - maximum value of parameter in the querypublic String getSqlPatternCount()
SqlDialectCOUNT SQLgetSqlPatternCount in interface SqlDialectselect count(1) from (%1$s) _alias_internal_table_public String getSqlPatternPaging()
SqlDialectgetSqlPatternPaging in interface SqlDialect%1$s LIMIT %2$s, %3$spublic String buildQueryPaging(String sqlText, int offset, int max)
SqlDialectbuildQueryPaging in interface SqlDialectsqlText - final SQL with parameters to bindoffset - number from first row from query resultmax - maximum number of rows from query result.public String buildQueryPaging(String sqlText, int offset, int max, String bookmark)
SqlDialectbuildQueryPaging in interface SqlDialectsqlText - final SQL with parameters to bindoffset - number from first row from query resultmax - maximum number of rows from query result.bookmark - a page selected marked the reader's placepublic PropertyAccess getAccessId()
SqlDialectid field, the identifier from an entitygetAccessId in interface SqlDialectid, getId, setIdpublic PropertyAccess getAccessRevision()
SqlDialectrevision field, a revision number from an entitygetAccessRevision in interface SqlDialectrev, getRev, setRevpublic String buildQueryCount(String sqlText)
SqlDialectsqlTextbuildQueryCount in interface SqlDialectsqlText - original SQL to discover the total of recordssqlTextprotected Matcher sqlStartWithSelect(String sql)
protected Matcher sqlStartWithSelectOrDistinct(String sql)
protected Matcher sqlEndsWithOrderBy(String sql)
protected Matcher sqlEndWithForUpdate(String sql)
protected int countOccurrencesOf(String str, String sub)
str - string to search in. Return 0 if this is null.sub - string to search for. Return 0 if this is null.strCopyright © 2012–2020 jkniv, copyleft code. All rights reserved.