类 ClassDaoBase<T>
java.lang.Object
com.gdxsoft.easyweb.datasource.ClassDaoBase<T>
- 直接已知子类:
EwaModDownloadDao,EwaWfCnnDao,EwaWfDao,EwaWfUnitDao
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明createAllUpdateFields(String[] fieldLst) 创建所用更新字段createDeleteSql(boolean includePk) createRequestValue(T para) 根据字段创建RvcreateSelectSql(String tableName, String where, List<String> fields) 创建 查询的 sql语句booleandeleteRecords(String whereString, RequestValue rv) 删除多条记录doubleexecuteDouble(String sql) intexecuteInt(String sql) executeProcdure(String procName, RequestValue requestValue) executeQuery(String sql, RequestValue requestValue, T obj, String[] fieldList) executeQuery(String sql, String pkFieldName, int pageSize, int currentPage) 执行分页并返回DTTableexecuteQuery(String sql, T obj, String[] fieldList) executeQuery(String sql, T obj, String[] fieldList, String pkFieldName, int pageSize, int currentPage) executeQueryByFields(String sql, Integer[] fieldList, String pkFieldName, int pageSize, int currentPage) 获取指定字段的对象列表intexecuteSequence(String seqName) booleanexecuteUpdate(String sql, RequestValue requestValue) intexecuteUpdateAutoIncrement(String sql, RequestValue requestValue) 执行自增插入longexecuteUpdateAutoIncrementLong(String sql, RequestValue requestValue) 执行自增插入executeUpdateAutoIncrementReturnBigInteger(String sql, RequestValue requestValue) 执行自增插入com.gdxsoft.easyweb.utils.types.UInt16executeUpdateAutoIncrementUInt16(String sql, RequestValue requestValue) 执行自增插入,返回UInt16com.gdxsoft.easyweb.utils.types.UInt32executeUpdateAutoIncrementUInt32(String sql, RequestValue requestValue) 执行自增插入,返回UInt32com.gdxsoft.easyweb.utils.types.UInt64executeUpdateAutoIncrementUInt64(String sql, RequestValue requestValue) 执行自增插入,返回UInt64自增主键getConn()数据库String[]Class<?>String[]intgetRecordCount(String sql) getRecords(String whereString) 根据查询条件返回多条记录(限制为500条)getRecords(String whereString, String pkFieldName, int pageSize, int currentPage) 根据查询条件返回多条记录(限制为500条)getRecords(String whereString, List<String> fields) 根据查询条件返回多条记录(限制为500条)getRv()String[]创建 更新的SQL,排除主键的所有字段从 DTTable返回指定的类对象voidsetAutoKey(String autoKey) 自增主键voidsetConfigName(String configName) voidsetDatabase(String database) 数据库voidvoidsetInstanceClass(Class<?> instanceClass) voidsetKeyFields(String[] keyFields) voidsetRv(RequestValue rv) voidsetSqlInsert(String sqlInsert) voidsetTableName(String tableName) 创建 新建变化的 SQL创建 更新变化 SQLbooleanupdateRecord(T para) 更新一条记录booleanupdateRecord(T para, Map<String, Boolean> updateFields) 更新一条记录
-
构造器详细资料
-
ClassDaoBase
public ClassDaoBase()
-
-
方法详细资料
-
createAllUpdateFields
创建所用更新字段- 参数:
fieldLst-- 返回:
-
deleteRecords
删除多条记录- 参数:
whereString- 查询条件,注意过滤“'”符号,避免SQL注入攻击rv-- 返回:
-
getRecords
根据查询条件返回多条记录(限制为500条)- 参数:
whereString- 查询条件,注意过滤“'”符号,避免SQL注入攻击- 返回:
- 记录集合
-
getRecords
根据查询条件返回多条记录(限制为500条)- 参数:
whereString- 查询条件,注意过滤“'”符号,避免SQL注入攻击fields- 指定返回的字段- 返回:
- 记录集合
-
getRecords
public ArrayList<T> getRecords(String whereString, String pkFieldName, int pageSize, int currentPage) 根据查询条件返回多条记录(限制为500条)- 参数:
whereString- 查询条件,注意过滤“'”符号,避免SQL注入攻击pkFieldName- 主键pageSize- 每页记录数currentPage- 当前页- 返回:
- 记录集合
-
updateRecord
更新一条记录- 参数:
para- 表GRP_MAIN的映射类- 返回:
- 是否成功
-
updateRecord
更新一条记录- 参数:
para- 表GRP_MAIN的映射类updateFields- 变化的字段Map- 返回:
-
createRequestValue
根据字段创建Rv- 参数:
para-- 返回:
-
parseFromDTTable
从 DTTable返回指定的类对象- 参数:
tb- The source table- 返回:
- The target class list
- 抛出:
Exception- the exception
-
createSelectSql
创建 查询的 sql语句- 参数:
tableName- 表名where- 查询条件fields- 返回的 字段列表- 返回:
-
createDeleteSql
-
createDeleteSql
-
createPkSql
-
getErrorMsg
-
executeSequence
- 抛出:
SQLException
-
executeInt
- 抛出:
SQLException
-
executeDouble
- 抛出:
SQLException
-
getRecordCount
-
getSqlUpdate
创建 更新的SQL,排除主键的所有字段- 返回:
-
sqlUpdateChanged
创建 更新变化 SQL- 参数:
tableName- 表名keys- 主键updateFields- 更新字段- 返回:
-
sqlInsertChanged
创建 新建变化的 SQL- 参数:
tableName- 表名updateFields- 更新字段- 返回:
-
executeUpdate
-
executeUpdateAutoIncrement
执行自增插入- 参数:
sql-requestValue-- 返回:
-
executeUpdateAutoIncrementReturnBigInteger
执行自增插入- 参数:
sql-requestValue-- 返回:
-
executeUpdateAutoIncrementLong
执行自增插入- 参数:
sql-requestValue-- 返回:
-
executeUpdateAutoIncrementUInt32
public com.gdxsoft.easyweb.utils.types.UInt32 executeUpdateAutoIncrementUInt32(String sql, RequestValue requestValue) 执行自增插入,返回UInt32- 参数:
sql-requestValue-- 返回:
-
executeUpdateAutoIncrementUInt16
public com.gdxsoft.easyweb.utils.types.UInt16 executeUpdateAutoIncrementUInt16(String sql, RequestValue requestValue) 执行自增插入,返回UInt16- 参数:
sql-requestValue-- 返回:
-
executeUpdateAutoIncrementUInt64
public com.gdxsoft.easyweb.utils.types.UInt64 executeUpdateAutoIncrementUInt64(String sql, RequestValue requestValue) 执行自增插入,返回UInt64- 参数:
sql-requestValue-- 返回:
-
executeProcdure
-
executeQuery
-
executeQuery
-
executeQueryByFields
public ArrayList<Object[]> executeQueryByFields(String sql, Integer[] fieldList, String pkFieldName, int pageSize, int currentPage) 获取指定字段的对象列表- 参数:
sql-fieldList-pkFieldName-pageSize-currentPage-- 返回:
-
executeQuery
public DTTable executeQuery(String sql, String pkFieldName, int pageSize, int currentPage) throws Exception 执行分页并返回DTTable- 参数:
sql-pkFieldName-pageSize-currentPage-- 抛出:
Exception
-
executeQuery
-
getSqlFields
-
getSqlSelect
-
getSqlDelete
-
getSqlInsert
-
setSqlInsert
- 参数:
sqlInsert- the sqlInsert to set
-
getConfigName
-
setConfigName
-
getConn
-
getRv
-
setRv
-
getInstanceClass
- 返回:
- the instanceClass
-
setInstanceClass
- 参数:
instanceClass- the instanceClass to set
-
getTableName
- 返回:
- the tableName
-
setTableName
- 参数:
tableName- the tableName to set
-
getFields
- 返回:
- the fields
-
setFields
- 参数:
fields- the fields to set
-
getKeyFields
- 返回:
- the keyFields
-
setKeyFields
- 参数:
keyFields- the keyFields to set
-
getDatabase
数据库- 返回:
-
setDatabase
数据库- 参数:
database-
-
getAutoKey
自增主键- 返回:
- the autoKey
-
setAutoKey
自增主键- 参数:
autoKey- the autoKey to set
-