public class DaoMapperUtils
extends java.lang.Object
构造器和说明 |
---|
DaoMapperUtils() |
限定符和类型 | 方法和说明 |
---|---|
static Delete |
createAllDelete(ObjectTableMapper mapper)
全删
|
static Select |
createAllSelect(ObjectTableMapper mapper,
SortInfo si)
全选
|
static Select |
createCountAllSelect(ObjectTableMapper mapper)
统计个数选择
|
static Delete |
createDeleteByColumn(java.lang.String columnName,
java.lang.Object value,
ObjectTableMapper mapper,
DataAccessObjectSession session)
列删除
|
static Delete |
createDeleteByField(java.lang.String fieldName,
java.lang.Object value,
ObjectTableMapper mapper,
DataAccessObjectSession session)
根据主键删除数据
|
static Delete |
createDeleteByInfo(ObjectTableMapper mapper,
java.util.Map<java.lang.String,java.lang.Object> map,
DataAccessObjectSession session)
条件选择删除数据
|
static Delete |
createDeleteByPrimaryKey(long id,
ObjectTableMapper mapper)
根据主键删除数据
|
static Insert |
createInsert(ObjectTableMapper mapper,
FieldValueGetter getter,
boolean isOracle,
DataAccessObjectSession session)
插入
|
static Select |
createLoadSelect(FieldColumnMapper pcMapper,
java.lang.Object pcValue,
ObjectTableMapper mapper,
DataAccessObjectSession session)
选择
|
static Select |
createPageSelect(ObjectTableMapper objectTableMapper,
SortInfo si,
PageConfiguration pageConfiguration)
分页查询选择器
|
static Select |
createSelectAllByMoreInfo(ObjectTableMapper mapper,
java.util.Map<java.lang.String,java.lang.Object> map,
DataAccessObjectSession session)
更多条件的全选
|
static Select |
createSelectByColumn(java.lang.String columnName,
java.lang.Object value,
int compareType,
ObjectTableMapper mapper,
DataAccessObjectSession session,
boolean exceptThis)
选择
|
static Select |
createSelectByField(java.lang.String fieldName,
java.lang.Object value,
int compareType,
ObjectTableMapper mapper,
DataAccessObjectSession session,
boolean exceptThis)
选择
|
static Select |
createSelectByInfo(java.lang.String columnName,
int columnType,
java.lang.Object value,
int compareType,
ObjectTableMapper mapper,
boolean exceptThis)
条件选择
|
static java.lang.String |
createSelectSQLByListFiledValue(java.util.Map<java.lang.String,java.lang.Object> map,
ObjectTableMapper mapper,
Dialect dialect,
DataAccessObjectSession session)
生成sql选择语句
|
static Update |
createUpdate(java.lang.Object obj,
ObjectTableMapper mapper,
DataAccessObjectSession session)
更新
|
static Update |
createUpdate(ObjectTableMapper mapper,
java.util.Map<java.lang.String,java.lang.Object> fvMap,
FieldColumnMapper pcMapper,
java.lang.Object key,
DataAccessObjectSession session)
更新
|
static Update |
createUpdateByInfo(java.lang.Object obj,
ObjectTableMapper mapper,
DataAccessObjectSession session,
java.util.Map<java.lang.String,java.lang.Object> map)
更新
|
static <T> T |
extractResultSet(java.sql.ResultSet resultSet,
java.lang.Class<T> clazz,
ObjectTableMapper mapper,
DataAccessObjectSession session)
执行ResultSet
|
public static Select createAllSelect(ObjectTableMapper mapper, SortInfo si)
mapper
- 数据表si
- 排序public static Select createSelectAllByMoreInfo(ObjectTableMapper mapper, java.util.Map<java.lang.String,java.lang.Object> map, DataAccessObjectSession session) throws java.lang.Exception
mapper
- 数据表map
- 条件session
- dao会话环境java.lang.Exception
- 抛出异常public static Delete createAllDelete(ObjectTableMapper mapper)
mapper
- 数据表public static Delete createDeleteByPrimaryKey(long id, ObjectTableMapper mapper)
id
- 主键idmapper
- 数据表public static Delete createDeleteByField(java.lang.String fieldName, java.lang.Object value, ObjectTableMapper mapper, DataAccessObjectSession session) throws java.lang.Exception
fieldName
- 列名value
- 值mapper
- 数据表session
- dao会话环境java.lang.Exception
- 抛出异常public static Delete createDeleteByColumn(java.lang.String columnName, java.lang.Object value, ObjectTableMapper mapper, DataAccessObjectSession session) throws java.lang.Exception
columnName
- 列名value
- 值mapper
- 数据表session
- dao会话环境java.lang.Exception
- 抛出异常public static Delete createDeleteByInfo(ObjectTableMapper mapper, java.util.Map<java.lang.String,java.lang.Object> map, DataAccessObjectSession session) throws java.lang.Exception
mapper
- 数据表map
- 条件session
- dao会话环境java.lang.Exception
- 抛出异常public static Select createLoadSelect(FieldColumnMapper pcMapper, java.lang.Object pcValue, ObjectTableMapper mapper, DataAccessObjectSession session) throws java.lang.Exception
pcMapper
- 列集合pcValue
- 值mapper
- 数据表session
- dao会话环境java.lang.Exception
- 跑出异常public static Select createSelectByField(java.lang.String fieldName, java.lang.Object value, int compareType, ObjectTableMapper mapper, DataAccessObjectSession session, boolean exceptThis) throws java.lang.Exception
fieldName
- 行value
- 值compareType
- 比较类型mapper
- 数据表session
- dao会话exceptThis
- 排除条件java.lang.Exception
- 抛出异常public static Select createSelectByColumn(java.lang.String columnName, java.lang.Object value, int compareType, ObjectTableMapper mapper, DataAccessObjectSession session, boolean exceptThis) throws java.lang.Exception
columnName
- 列名value
- 值compareType
- 比较类型mapper
- 数据表session
- dao会话exceptThis
- 排除条件java.lang.Exception
- 抛出异常public static Select createSelectByInfo(java.lang.String columnName, int columnType, java.lang.Object value, int compareType, ObjectTableMapper mapper, boolean exceptThis)
columnName
- 列名columnType
- 列类型value
- 值compareType
- 比较类型mapper
- 数据表exceptThis
- 排除条件public static java.lang.String createSelectSQLByListFiledValue(java.util.Map<java.lang.String,java.lang.Object> map, ObjectTableMapper mapper, Dialect dialect, DataAccessObjectSession session) throws java.lang.Exception
map
- 条件mapper
- 数据表dialect
- 方言session
- dao会话java.lang.Exception
- 抛出异常public static Insert createInsert(ObjectTableMapper mapper, FieldValueGetter getter, boolean isOracle, DataAccessObjectSession session) throws java.lang.Exception
mapper
- 数据表getter
- 行列选择器isOracle
- 是否是oracle数据库session
- dao会话java.lang.Exception
public static Update createUpdate(java.lang.Object obj, ObjectTableMapper mapper, DataAccessObjectSession session) throws java.lang.Exception
obj
- 更新对象mapper
- 数据表session
- dao会话java.lang.Exception
- 抛出异常public static Update createUpdateByInfo(java.lang.Object obj, ObjectTableMapper mapper, DataAccessObjectSession session, java.util.Map<java.lang.String,java.lang.Object> map) throws java.lang.Exception
obj
- 更新对象mapper
- 数据表session
- dao会话java.lang.Exception
- 抛出异常public static Update createUpdate(ObjectTableMapper mapper, java.util.Map<java.lang.String,java.lang.Object> fvMap, FieldColumnMapper pcMapper, java.lang.Object key, DataAccessObjectSession session) throws java.lang.Exception
mapper
- 数据表fvMap
- 条件pcMapper
- 行列选择器key
- 值session
- dao会话java.lang.Exception
- 抛出异常public static <T> T extractResultSet(java.sql.ResultSet resultSet, java.lang.Class<T> clazz, ObjectTableMapper mapper, DataAccessObjectSession session) throws java.lang.Exception
resultSet
- 结果集clazz
- 反射类mapper
- 数据表session
- dao会话java.lang.Exception
- 抛出异常public static Select createPageSelect(ObjectTableMapper objectTableMapper, SortInfo si, PageConfiguration pageConfiguration)
objectTableMapper
- 数据表pageConfiguration
- 分页配置public static Select createCountAllSelect(ObjectTableMapper mapper)