|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlproc.engine.plugin.DefaultSqlPlugins
public class DefaultSqlPlugins
The SQL Processor plugins standard implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.sqlproc.engine.plugin.SqlFromToPlugin |
---|
SqlFromToPlugin.LimitType |
Field Summary | |
---|---|
static String |
SUPPVAL_ANY
The supplement value used to detect the empty value and true value. |
static String |
SUPPVAL_NOTNULL
The supplement value used to detect the empty value and true value. |
static String |
SUPPVAL_NULL
The supplement value used to detect the empty value and true value. |
Fields inherited from interface org.sqlproc.engine.plugin.SqlSequencePlugin |
---|
SUPPVAL_SEQUENCE |
Fields inherited from interface org.sqlproc.engine.plugin.SqlIdentityPlugin |
---|
SUPPVAL_IDENTITY_SELECT |
Constructor Summary | |
---|---|
DefaultSqlPlugins()
|
Method Summary | |
---|---|
String |
identitySelect(String identitySelectName,
String tableName,
String columnName)
Used to construct the identity SELECT SQL. |
boolean |
isEmpty(Object obj,
SqlMetaType sqlMetaType,
String sqlMetaTypeExt,
boolean inSqlSetOrInsert)
Used for the evaluation of the emptiness in the META SQL fragments. |
boolean |
isTrue(Object obj,
SqlMetaType sqlMetaType,
String sqlMetaTypeExt)
Used for the evaluation of the logical expression in the conditional META SQL fragments. |
private SqlFromToPlugin.LimitType |
limitQuery(String limitPattern,
SqlFromToPlugin.LimitType limitType,
String queryString,
StringBuilder queryResult,
Integer firstResult,
Integer maxResults)
|
SqlFromToPlugin.LimitType |
limitQuery(String queryString,
StringBuilder queryResult,
Integer firstResult,
Integer maxResults)
Used to construct the FROM-TO SQL. |
String |
sequenceSelect(String sequenceName)
Used to construct the sequence SELECT SQL. |
String |
sqlCount(StringBuilder sql)
Used to construct the COUNT SQL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SUPPVAL_NOTNULL
public static final String SUPPVAL_ANY
public static final String SUPPVAL_NULL
Constructor Detail |
---|
public DefaultSqlPlugins()
Method Detail |
---|
public boolean isEmpty(Object obj, SqlMetaType sqlMetaType, String sqlMetaTypeExt, boolean inSqlSetOrInsert) throws IllegalArgumentException
isEmpty
in interface IsEmptyPlugin
obj
- the input valuesqlMetaType
- the internal type (= META type) devoted for the special processing of the input valuessqlMetaTypeExt
- the META type extension (=the internal type supplement value) devoted to extend the special processing
of the input valuesinSqlSetOrInsert
- an indicator the input value is evaluated in the CRUD statement (INSERT or SET)
IllegalArgumentException
public boolean isTrue(Object obj, SqlMetaType sqlMetaType, String sqlMetaTypeExt)
isTrue
in interface IsTruePlugin
obj
- the input valuesqlMetaType
- the internal type (= META type) devoted for the special processing of the input valuessqlMetaTypeExt
- the META type extension (=the internal type supplement value) devoted to extend the special processing
of the input values
public String sqlCount(StringBuilder sql)
sqlCount
in interface SqlCountPlugin
sql
- original META SQL
public SqlFromToPlugin.LimitType limitQuery(String queryString, StringBuilder queryResult, Integer firstResult, Integer maxResults)
limitQuery
in interface SqlFromToPlugin
queryString
- the original ANSI SQLqueryResult
- the final ANSI SQL reflected FROM and TO restrictionsfirstResult
- The first SQL execution output row to be returned in the case we need to skip some rows in the result
set. The primary usage is to support the pagination.maxResults
- The max number of SQL execution output rows, which can be returned in the result list. The primary
usage is to support the pagination.
SqlQuery.list()
private SqlFromToPlugin.LimitType limitQuery(String limitPattern, SqlFromToPlugin.LimitType limitType, String queryString, StringBuilder queryResult, Integer firstResult, Integer maxResults)
public String identitySelect(String identitySelectName, String tableName, String columnName)
identitySelect
in interface SqlIdentityPlugin
identitySelectName
- the identity SELECT SQL nametableName
- the table name. Right now it's not supplied.columnName
- the column name. Right now it's not supplied.
public String sequenceSelect(String sequenceName)
sequenceSelect
in interface SqlSequencePlugin
sequenceName
- the sequence name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |