类 AbstractRunPrepare
java.lang.Object
org.anyline.data.prepare.init.AbstractRunPrepare
- 所有已实现的接口:
Cloneable,RunPrepare
- 直接已知子类:
DefaultAutoPrepare,DefaultTextPrepare
-
字段概要
字段修饰符和类型字段说明protected List<AggregationConfig>protected Stringprotected intprotected Stringprotected ConditionChainprotected LinkedHashMap<String,Column> protected ConfigStoreprotected booleanprotected Stringprotected GroupStoreprotected ConfigStoreprotected Stringprotected Booleanprotected Joinprotected List<RunPrepare>protected static final Logprotected booleanprotected PageNaviprotected OrderStoreprotected booleanprotected Stringprotected booleanprotected Compare.EMPTY_VALUE_SWITCHprotected Stringprotected booleanprotected List<RunPrepare>protected boolean从接口继承的字段 org.anyline.data.prepare.RunPrepare
PROCEDURE_INPUT_PARAM_TYPE, PROCEDURE_INPUT_PARAM_VALUE, SQL_VAR_BOX_REGEX, SQL_VAR_PLACEHOLDER_REGEX, SQL_VAR_PLACEHOLDER_REGEX_EXT, XML_SQL_ID_STYLE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addCondition(String column, Object value) addCondition(Condition condition) 添加标准查询条件addCondition(Compare.EMPTY_VALUE_SWITCH swt, Compare compare, String column, Object value) addCondition(Compare compare, String column, Object value) 添加查询条件(自动生成)addFetchKey(String... fetchKeys) addFetchKey(Collection<String> fetchKeys) addPrimaryKey(String... primaryKeys) addPrimaryKey(Collection<String> primaryKeys) protected RunPrepareaddRunValue(Object runValue) 添加运行时参数值aggregation(List<AggregationConfig> configs) aggregation(AggregationConfig... configs) aggregation(Aggregation aggregation, String column, String result) 利用RunPrepare构造更复杂的SQLclone()condition(ConfigStore condition) boolean是否一次性的(执行过程中可修改,否则应该clone一份,避免影响第二闪使用)disposable(boolean disposable) getAlias()intgetBatch()getId()getJoin()getJoins()读取主键 主键为空时且容器有主键时, 读取容器主键, 否则返回默认主键运行时参数值int添加分组条件, 在之前的基础上添加新分组条件, 有重复条件则覆盖group(GroupStore groups) groups()boolean自身是否有主键having()having(ConfigStore having) protected voidboolean相同ID是否有多个booleanisStrict()是否严格格式,不能追加未定义的条件booleanjoin(RunPrepare prepare) 添加排序条件, 在之前的基础上添加新排序条件, 有重复条件则覆盖order(String col, Order.TYPE type) 添加排序条件, 在之前的基础上添加新排序条件, 有重复条件则覆盖order(OrderStore orders) booleanparse()是否需要解析sqlvoidsetBatch(int batch) setConditionChain(ConditionChain chain) setConditionValue(String condition, String variable, Object value) 设置查询条件变量值(XML定义)setDistinct(boolean distinct) setExcludeColumns(String... columns) setExcludeColumns(List<String> excludeColumn) setFetchKey(String... fetchKeys) setFetchKey(Collection<String> fetchKeys) setMultiple(boolean multiple) voidsetOrders(OrderStore orders) voidsetPageNavi(PageNavi navi) setPrimaryKey(String... primaryKeys) 设置主键 先清空之前设置过和主键 当前对象处于容器中时, 设置容器主键, 否则设置自身主键setPrimaryKey(Collection<String> primaryKeys) setRuntime(String runtime) 用来标记运行环境key(其中关联了数据源与适配器)
经常在service方法参数前加数据源前缀缀时会用到setSelectColumns(String... columns) setSelectColumns(List<String> columns) voidsetStrict(boolean strict) 设置SQL文本, 从XML中text标签中取出setUnionAll(boolean all) union(List<RunPrepare> unions) union(List<RunPrepare> unions, boolean all) union(RunPrepare prepare) union(RunPrepare prepare, boolean all) 从类继承的方法 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.anyline.data.prepare.RunPrepare
addColumn, addColumn, build, excludeColumn, filter, getCatalog, getCatalogName, getDest, getSchema, getSchemaName, getSQLVariables, getTable, getTableName, getText, join, join, join, json, json, map, map, map, setCatalog, setDest, setDest, setJoin, setJoin, setSchema, unionAll, unionAll
-
字段详细资料
-
log
-
id
-
disposable
protected boolean disposable -
text
-
chain
-
orders
-
groups
-
aggregations
-
having
-
box
-
-
fetchKeys
-
valid
protected boolean valid -
alias
-
batch
protected int batch -
multiple
protected boolean multiple -
strict
protected boolean strict -
runtime
-
swt
-
columns
-
excludes
-
distinct
-
condition
-
join
-
isSub
-
unionAll
protected boolean unionAll -
unions
-
joins
-
parse
protected boolean parse -
runValues
-
-
构造器详细资料
-
AbstractRunPrepare
public AbstractRunPrepare()
-
-
方法详细资料
-
getVersion
public int getVersion()- 指定者:
getVersion在接口中RunPrepare
-
initRunValues
protected void initRunValues() -
parse
public boolean parse()是否需要解析sql- 指定者:
parse在接口中RunPrepare- 返回:
- boolean
-
order
添加排序条件, 在之前的基础上添加新排序条件, 有重复条件则覆盖- 指定者:
order在接口中RunPrepare- 参数:
order- order- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
order
从接口复制的说明:RunPrepare添加排序条件, 在之前的基础上添加新排序条件, 有重复条件则覆盖- 指定者:
order在接口中RunPrepare- 参数:
order- order- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
order
- 指定者:
order在接口中RunPrepare
-
order
- 指定者:
order在接口中RunPrepare
-
group
添加分组条件, 在之前的基础上添加新分组条件, 有重复条件则覆盖- 指定者:
group在接口中RunPrepare- 参数:
groups- group- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
group
- 指定者:
group在接口中RunPrepare
-
having
- 指定者:
having在接口中RunPrepare
-
having
- 指定者:
having在接口中RunPrepare
-
addRunValue
添加运行时参数值- 参数:
runValue- runValue- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
getRunValues
运行时参数值- 返回:
- List
-
setConditionChain
-
addCondition
添加标准查询条件- 指定者:
addCondition在接口中RunPrepare- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
setConditionValue
设置查询条件变量值(XML定义)- 指定者:
setConditionValue在接口中RunPrepare- 参数:
condition- 条件IDvariable- 变量keyvalue- 值- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
addCondition
添加查询条件(自动生成)- 指定者:
addCondition在接口中RunPrepare- 参数:
column- 列名value- 值compare- 比较方式- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
addCondition
public RunPrepare addCondition(Compare.EMPTY_VALUE_SWITCH swt, Compare compare, String column, Object value) -
addCondition
- 指定者:
addCondition在接口中RunPrepare
-
setText
从接口复制的说明:RunPrepare设置SQL文本, 从XML中text标签中取出- 指定者:
setText在接口中RunPrepare- 参数:
text- text- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
getGroups
- 指定者:
getGroups在接口中RunPrepare
-
having
- 指定者:
having在接口中RunPrepare
-
getOrders
- 指定者:
getOrders在接口中RunPrepare
-
setOrders
- 指定者:
setOrders在接口中RunPrepare
-
getConditionChain
- 指定者:
getConditionChain在接口中RunPrepare
-
addPrimaryKey
- 指定者:
addPrimaryKey在接口中RunPrepare
-
addPrimaryKey
- 指定者:
addPrimaryKey在接口中RunPrepare
-
setPrimaryKey
设置主键 先清空之前设置过和主键 当前对象处于容器中时, 设置容器主键, 否则设置自身主键- 指定者:
setPrimaryKey在接口中RunPrepare- 参数:
primaryKeys- primaryKeys- 返回:
- Run 最终执行命令 如JDBC环境中的 SQL 与 参数值
-
setPrimaryKey
- 指定者:
setPrimaryKey在接口中RunPrepare
-
getPrimaryKeys
读取主键 主键为空时且容器有主键时, 读取容器主键, 否则返回默认主键- 指定者:
getPrimaryKeys在接口中RunPrepare- 返回:
- List
-
getPrimaryKey
- 指定者:
getPrimaryKey在接口中RunPrepare
-
hasPrimaryKeys
public boolean hasPrimaryKeys()自身是否有主键- 指定者:
hasPrimaryKeys在接口中RunPrepare- 返回:
- boolean
-
getDistinct
- 指定者:
getDistinct在接口中RunPrepare
-
setDistinct
- 指定者:
setDistinct在接口中RunPrepare
-
addFetchKey
- 指定者:
addFetchKey在接口中RunPrepare
-
addFetchKey
- 指定者:
addFetchKey在接口中RunPrepare
-
setFetchKey
- 指定者:
setFetchKey在接口中RunPrepare
-
setFetchKey
- 指定者:
setFetchKey在接口中RunPrepare
-
getFetchKeys
- 指定者:
getFetchKeys在接口中RunPrepare
-
join
-
join
- 指定者:
join在接口中RunPrepare
-
inner
- 指定者:
inner在接口中RunPrepare
-
inner
-
left
- 指定者:
left在接口中RunPrepare
-
left
-
right
- 指定者:
right在接口中RunPrepare
-
right
-
full
- 指定者:
full在接口中RunPrepare
-
full
-
join
- 指定者:
join在接口中RunPrepare
-
getJoin
- 指定者:
getJoin在接口中RunPrepare
-
setJoin
- 指定者:
setJoin在接口中RunPrepare
-
getJoins
- 指定者:
getJoins在接口中RunPrepare
-
getAlias
- 指定者:
getAlias在接口中RunPrepare
-
setAlias
- 指定者:
setAlias在接口中RunPrepare
-
isMultiple
public boolean isMultiple()从接口复制的说明:RunPrepare相同ID是否有多个- 指定者:
isMultiple在接口中RunPrepare- 返回:
- boolean
-
setMultiple
- 指定者:
setMultiple在接口中RunPrepare
-
getId
- 指定者:
getId在接口中RunPrepare
-
setId
- 指定者:
setId在接口中RunPrepare
-
disposable
public boolean disposable()是否一次性的(执行过程中可修改,否则应该clone一份,避免影响第二闪使用)- 指定者:
disposable在接口中RunPrepare- 返回:
- boolean
-
disposable
- 指定者:
disposable在接口中RunPrepare
-
getRuntime
- 指定者:
getRuntime在接口中RunPrepare
-
setRuntime
从接口复制的说明:RunPrepare用来标记运行环境key(其中关联了数据源与适配器)
经常在service方法参数前加数据源前缀缀时会用到- 指定者:
setRuntime在接口中RunPrepare- 参数:
runtime- runtime.key- 返回:
- RunPrepare
-
isStrict
public boolean isStrict()从接口复制的说明:RunPrepare是否严格格式,不能追加未定义的条件- 指定者:
isStrict在接口中RunPrepare- 返回:
- boolean
-
setStrict
public void setStrict(boolean strict) - 指定者:
setStrict在接口中RunPrepare
-
setSelectColumns
- 指定者:
setSelectColumns在接口中RunPrepare
-
setSelectColumns
- 指定者:
setSelectColumns在接口中RunPrepare
-
getColumns
- 指定者:
getColumns在接口中RunPrepare
-
getExcludes
- 指定者:
getExcludes在接口中RunPrepare
-
setExcludeColumns
- 指定者:
setExcludeColumns在接口中RunPrepare
-
setExcludeColumns
- 指定者:
setExcludeColumns在接口中RunPrepare
-
getBatch
public int getBatch()- 指定者:
getBatch在接口中RunPrepare
-
setBatch
public void setBatch(int batch) - 指定者:
setBatch在接口中RunPrepare
-
condition
- 指定者:
condition在接口中RunPrepare
-
condition
- 指定者:
condition在接口中RunPrepare
-
setUnionAll
- 指定者:
setUnionAll在接口中RunPrepare
-
isUnionAll
public boolean isUnionAll()- 指定者:
isUnionAll在接口中RunPrepare
-
union
- 指定者:
union在接口中RunPrepare
-
union
- 指定者:
union在接口中RunPrepare
-
union
- 指定者:
union在接口中RunPrepare
-
union
- 指定者:
union在接口中RunPrepare
-
getUnions
- 指定者:
getUnions在接口中RunPrepare
-
groups
- 指定者:
groups在接口中RunPrepare
-
aggregation
- 指定者:
aggregation在接口中RunPrepare
-
aggregation
- 指定者:
aggregation在接口中RunPrepare
-
aggregation
- 指定者:
aggregation在接口中RunPrepare
-
aggregations
- 指定者:
aggregations在接口中RunPrepare
-
box
从接口复制的说明:RunPrepare利用RunPrepare构造更复杂的SQL- 指定者:
box在接口中RunPrepare- 参数:
box- CREATE VIEW AS ${body} 其中${body}会替换成this.sql- 返回:
- this
-
clone
- 指定者:
clone在接口中RunPrepare- 覆盖:
clone在类中Object
-