public class DefaultXMLPrepare extends DefaultPrepare implements XMLPrepare
alias, chain, fetchKeys, groups, log, navi, orders, primaryKeys, runValues, validPROCEDURE_INPUT_PARAM_TYPE, PROCEDURE_INPUT_PARAM_VALUE, SQL_PARAM_VAIRABLE_REGEX, SQL_PARAM_VAIRABLE_REGEX_EL, XML_SQL_ID_STYLE| 构造器和说明 |
|---|
DefaultXMLPrepare() |
| 限定符和类型 | 方法和说明 |
|---|---|
RunPrepare |
addCondition(String condition)
添加静态文本查询条件
|
Object |
clone() |
List<String> |
getColumns() |
String |
getDataSource() |
String |
getSchema() |
List<Variable> |
getSQLVariables() |
String |
getTable() |
String |
getText() |
RunPrepare |
init() |
boolean |
isStrict() |
RunPrepare |
setConditionValue(String condition,
String variable,
Object value)
添加查询条件
|
RunPrepare |
setDataSource(String ds)
设置数据源
查询全部列 : setDataSource("V_ADMIN")
查询指定列 : setDataSource(ADMIN(CD,ACCOUNT,NAME,REG_TIME)) 查询指定列 : setDataSource(ADMIN(DISTINCT CD,ACCOUNT,NAME,REG_TIME)) 查询指定列 : setDataSource(ADMIN(DISTINCT {NEWID()},{getDate()},CD,ACCOUNT,NAME,REG_TIME)) {}中内容按原样拼接到运行时SQL,其他列将添加[]以避免关键重复 根据XML定义SQL : setDataSource("admin.power:S_POWER") admin.power : XML文件路径,文件目录以.分隔 S_POWER : 自定义SQL的id |
void |
setStrict(boolean strict) |
RunPrepare |
setText(String text)
设置SQL 主体文本
|
addCondition, addCondition, addCondition, addFetchKey, addFetchKey, addPrimaryKey, addPrimaryKey, addRunValue, full, getAlias, getConditionChain, getFetchKeys, getGroups, getJoins, getOrders, getOrderText, getPageNavi, getPrimaryKey, getPrimaryKeys, getRunValues, getVersion, group, hasPrimaryKeys, initRunValues, inner, isValid, join, join, left, order, order, order, right, setAlias, setConditionChain, setFetchKey, setFetchKey, setOrders, setPageNavi, setPrimaryKey, setPrimaryKey, setValidequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCondition, addCondition, addCondition, addFetchKey, addFetchKey, addPrimaryKey, addPrimaryKey, full, getAlias, getConditionChain, getFetchKeys, getGroups, getJoins, getOrders, getPageNavi, getPrimaryKey, getPrimaryKeys, getVersion, group, hasPrimaryKeys, inner, isValid, join, join, left, order, order, order, right, setAlias, setFetchKey, setFetchKey, setOrders, setPageNavi, setPrimaryKey, setPrimaryKeypublic RunPrepare init()
init 在接口中 XMLPreparepublic Object clone() throws CloneNotSupportedException
clone 在类中 ObjectCloneNotSupportedExceptionpublic RunPrepare setText(String text)
setText 在接口中 RunPreparesetText 在接口中 XMLPreparesetText 在类中 DefaultPreparetext - textpublic RunPrepare addCondition(String condition)
addCondition 在接口中 XMLPreparecondition - conditionpublic RunPrepare setConditionValue(String condition, String variable, Object value)
setConditionValue 在接口中 RunPreparesetConditionValue 在接口中 XMLPreparesetConditionValue 在类中 DefaultPreparecondition - 列名|查询条件IDvariable - 变量keyvalue - 值public RunPrepare setDataSource(String ds)
RunPrepare
查询全部列 : setDataSource("V_ADMIN")
查询指定列 : setDataSource(ADMIN(CD,ACCOUNT,NAME,REG_TIME))
查询指定列 : setDataSource(ADMIN(DISTINCT CD,ACCOUNT,NAME,REG_TIME))
查询指定列 : setDataSource(ADMIN(DISTINCT {NEWID()},{getDate()},CD,ACCOUNT,NAME,REG_TIME))
{}中内容按原样拼接到运行时SQL,其他列将添加[]以避免关键重复
根据XML定义SQL : setDataSource("admin.power:S_POWER")
admin.power : XML文件路径,文件目录以.分隔
S_POWER : 自定义SQL的id
setDataSource 在接口中 RunPrepareds - 数据源 : 表|视图|自定义SQL.idpublic String getDataSource()
getDataSource 在接口中 RunPreparepublic String getSchema()
getSchema 在接口中 RunPreparepublic String getText()
getText 在接口中 RunPreparegetText 在接口中 XMLPreparepublic List<Variable> getSQLVariables()
getSQLVariables 在接口中 RunPreparegetSQLVariables 在接口中 XMLPreparepublic String getTable()
getTable 在接口中 RunPreparepublic List<String> getColumns()
getColumns 在接口中 RunPreparepublic boolean isStrict()
isStrict 在接口中 RunPreparepublic void setStrict(boolean strict)
setStrict 在接口中 RunPrepareCopyright © 2023. All rights reserved.