public abstract class AbstractSqlTag extends Object implements SqlTag
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_BATCH |
static String |
ATTRIBUTE_CACHE |
static String |
ATTRIBUTE_GROUP_BY |
static String |
ATTRIBUTE_HINT |
static String |
ATTRIBUTE_ISOLATION |
static String |
ATTRIBUTE_NAME |
static String |
ATTRIBUTE_RESULTSET_CONCURRENCY |
static String |
ATTRIBUTE_RESULTSET_HOLDABILITY |
static String |
ATTRIBUTE_RESULTSET_TYPE |
static String |
ATTRIBUTE_RETURN_TYPE |
static String |
ATTRIBUTE_TIMEOUT |
static String |
ATTRIBUTE_TYPE |
static String |
ATTRIBUTE_VALIDATION |
protected String |
id |
protected LanguageType |
languageType |
protected static Assertable |
NOT_NULL |
| Constructor and Description |
|---|
AbstractSqlTag(String id,
LanguageType languageType)
Build a new SQL tag from XML file.
|
AbstractSqlTag(String id,
LanguageType languageType,
Isolation isolation,
int timeout,
ResultSetType resultSetType,
ResultSetConcurrency resultSetConcurrency,
ResultSetHoldability resultSetHoldability,
String returnType,
ValidateType validateType,
Statistical stats)
Build a new SQL tag from XML file.
|
AbstractSqlTag(String id,
LanguageType languageType,
Isolation isolation,
int timeout,
ValidateType validateType,
Statistical stats)
Build a new SQL tag from XML file.
|
AbstractSqlTag(String id,
LanguageType languageType,
SqlDialect sqlDialect) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTag(ITextTag tag)
add a new text tag.
|
void |
addTag(List<ITextTag> tags)
add a set of text tags (static or dynamic).
|
void |
addTag(String text)
add a set of static text from tag elements.
|
Deletable |
asDeletable()
Deletable instance |
Insertable |
asInsertable()
Insertable instance |
Selectable |
asSelectable()
Selectable instance |
Storable |
asStorable()
Storable instance |
Updateable |
asUpdateable()
Updateable instance |
void |
bind(SqlDialect sqlDialect) |
boolean |
equals(Object obj) |
String[] |
extractNames(Object params)
Extract the name parameters from dynamic query
|
String[] |
extractNames(String sql)
Extract the name parameters from SQL
|
Isolation |
getIsolation()
Retrieves the current transaction isolation level for the query.
|
LanguageType |
getLanguageType()
language from SQL sentence.
|
String |
getName()
Retrieve the identifier name from tag.
|
String |
getPackage()
name of package that this SQL belongs
|
ParamParser |
getParamParser()
strategy to parser the parameters from SQL.
|
String |
getResourceName()
The filename that SQL belong to
|
ResultSetConcurrency |
getResultSetConcurrency() |
ResultSetHoldability |
getResultSetHoldability() |
ResultSetType |
getResultSetType() |
String |
getReturnType() |
Class<?> |
getReturnTypeAsClass() |
String |
getSql()
Retrieve static sql from a node, the dynamic parts is skipped.
|
String |
getSql(Object params)
Retrieve dynamic sql from a node, the dynamic parts is evaluated at time
to create the sql.
|
SqlDialect |
getSqlDialect()
dialect for a specific database
|
Statistical |
getStats()
get statistical data from query execution
|
int |
getTimeout()
Retrieves the number of seconds the repository will wait for a Query
object to execute.
|
Date |
getTimestamp()
Timestamp when sql was read from xml
|
ValidateType |
getValidateType() |
String |
getXPath()
Expression XPATH to read SQL
|
int |
hashCode() |
boolean |
hasReturnType() |
boolean |
isDeletable()
Verify if command is a DELETE
|
boolean |
isInsertable()
Verify if command is a INSERT
|
boolean |
isSelectable()
Verify if command is a SELECT
|
boolean |
isStorable()
Verify if command is a STORED PROCEDURE
|
boolean |
isUpdateable()
Verify if command is a UPDATE
|
void |
setIsolation(Isolation isolation) |
void |
setPackage(String name)
name of package this sql belong
|
void |
setResourceName(String resourceName)
File name from Sql
|
void |
setResultSetConcurrency(ResultSetConcurrency resultSetConcurrency) |
void |
setResultSetHoldability(ResultSetHoldability resultSetHoldability) |
void |
setResultSetType(ResultSetType resultSetType) |
void |
setResultType(String returnType) |
protected void |
setStats(Statistical stats) |
void |
setTimeout(int timeout) |
void |
setValidateType(ValidateType validateType) |
void |
setXpath(String xpath)
set the XPATH expression to retrieve the query at xml file.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetTagNamegetSqlTypeprotected static final Assertable NOT_NULL
public static final String ATTRIBUTE_NAME
public static final String ATTRIBUTE_TYPE
public static final String ATTRIBUTE_ISOLATION
public static final String ATTRIBUTE_TIMEOUT
public static final String ATTRIBUTE_HINT
public static final String ATTRIBUTE_BATCH
public static final String ATTRIBUTE_CACHE
public static final String ATTRIBUTE_RETURN_TYPE
public static final String ATTRIBUTE_GROUP_BY
public static final String ATTRIBUTE_RESULTSET_TYPE
public static final String ATTRIBUTE_RESULTSET_CONCURRENCY
public static final String ATTRIBUTE_RESULTSET_HOLDABILITY
public static final String ATTRIBUTE_VALIDATION
protected LanguageType languageType
public AbstractSqlTag(String id, LanguageType languageType)
id - Name/Identify from tag.languageType - type of language from tag.public AbstractSqlTag(String id, LanguageType languageType, SqlDialect sqlDialect)
public AbstractSqlTag(String id, LanguageType languageType, Isolation isolation, int timeout, ValidateType validateType, Statistical stats)
id - Name/Identify from tag.languageType - type of language from tag.isolation - Retrieves the current transaction isolation level for the
query.timeout - Retrieves the number of seconds the repository will wait for a
Query object to execute.validateType - validation to apply before execute SQL.stats - SQL statisticalpublic AbstractSqlTag(String id, LanguageType languageType, Isolation isolation, int timeout, ResultSetType resultSetType, ResultSetConcurrency resultSetConcurrency, ResultSetHoldability resultSetHoldability, String returnType, ValidateType validateType, Statistical stats)
id - Name/Identify from tag.languageType - type of language from tag.isolation - Retrieves the current transaction isolation level for the
query.timeout - Retrieves the number of seconds the repository will wait for a
Query object to execute.resultSetType - TODO javadocresultSetConcurrency - TODO javadocresultSetHoldability - TODO javadocreturnType - vvalidateType - TODO javadocstats - statistical for procedurespublic String getSql(Object params)
public LanguageType getLanguageType()
getLanguageType in interface Sqlpublic Isolation getIsolation()
SqlgetIsolation in interface Sqlpublic void setIsolation(Isolation isolation)
public int getTimeout()
SqlgetTimeout in interface Sqlpublic void setTimeout(int timeout)
public boolean isSelectable()
SqlisSelectable in interface Sqltrue when is SELECT, false otherwisepublic boolean isInsertable()
SqlisInsertable in interface Sqltrue when is INSERT, false otherwisepublic boolean isUpdateable()
SqlisUpdateable in interface Sqltrue when is UPDATE, false otherwisepublic boolean isDeletable()
SqlisDeletable in interface Sqltrue when is DELETE, false otherwisepublic Selectable asSelectable()
SqlSelectable instanceasSelectable in interface Sqlpublic Insertable asInsertable()
SqlInsertable instanceasInsertable in interface Sqlpublic Updateable asUpdateable()
SqlUpdateable instanceasUpdateable in interface Sqlpublic Deletable asDeletable()
SqlDeletable instanceasDeletable in interface Sqlpublic boolean isStorable()
SqlisStorable in interface Sqltrue when is STORED PROCEDURE, false otherwisepublic Storable asStorable()
SqlStorable instanceasStorable in interface Sqlpublic ResultSetType getResultSetType()
getResultSetType in interface Sqlpublic void setResultSetType(ResultSetType resultSetType)
public ResultSetConcurrency getResultSetConcurrency()
getResultSetConcurrency in interface Sqlpublic void setResultSetConcurrency(ResultSetConcurrency resultSetConcurrency)
public ResultSetHoldability getResultSetHoldability()
getResultSetHoldability in interface Sqlpublic void setResultSetHoldability(ResultSetHoldability resultSetHoldability)
public void setResultType(String returnType)
public String getReturnType()
getReturnType in interface Sqlpublic boolean hasReturnType()
hasReturnType in interface Sqlpublic Class<?> getReturnTypeAsClass()
getReturnTypeAsClass in interface Sqlpublic void setValidateType(ValidateType validateType)
setValidateType in interface Sqlpublic ValidateType getValidateType()
getValidateType in interface Sqlpublic void setXpath(String xpath)
SqlTagpublic String getXPath()
Sqlpublic void setResourceName(String resourceName)
SqlTagsetResourceName in interface SqlTagresourceName - filename from sql as resourcepublic String getResourceName()
SqlgetResourceName in interface Sqlpublic Date getTimestamp()
SqlgetTimestamp in interface Sqlpublic ParamParser getParamParser()
SqlgetParamParser in interface Sqlpublic String[] extractNames(Object params)
SqlextractNames in interface Sqlparams - parameters from querypublic String[] extractNames(String sql)
SqlextractNames in interface Sqlsql - sentencepublic void bind(SqlDialect sqlDialect)
public SqlDialect getSqlDialect()
SqlgetSqlDialect in interface Sqlpublic String getPackage()
SqlgetPackage in interface Sqlpublic void setPackage(String name)
SqlTagsetPackage in interface SqlTagname - of packagepublic Statistical getStats()
Sqlprotected void setStats(Statistical stats)
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.