public abstract class OrmDaoUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
OrmDaoUtils.FetchDataWork<T> |
static class |
OrmDaoUtils.OrmObjectComparator<T> |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
batchUpdateObject(Connection connection,
Class<?> type,
Map<String,Object> propertiesValue,
Map<String,Object> propertiesFilter)
批量修改 对象
|
static <T> int |
batchUpdateObject(Connection connection,
Collection<String> fields,
T object,
Map<String,Object> propertiesFilter)
批量修改 对象
|
static <T> int |
checkObjectExists(Connection connection,
T object) |
static <T> int |
deleteObject(Connection connection,
T object) |
static <T> int |
deleteObjectById(Connection connection,
Map<String,Object> id,
Class<T> type) |
static <T> int |
deleteObjectById(Connection connection,
Object id,
Class<T> type) |
static <T> int |
deleteObjectByProperties(Connection connection,
Map<String,Object> properties,
Class<T> type) |
static <T> int |
deleteObjectCascade(Connection connection,
T object) |
static <T> int |
deleteObjectCascadeById(Connection connection,
Object id,
Class<T> type) |
static <T> int |
deleteObjectCascadeShallow(Connection connection,
T object) |
static <T> int |
deleteObjectCascadeShallowById(Connection connection,
Object id,
Class<T> type) |
static <T> int |
deleteObjectReference(Connection connection,
T object,
SimpleTableReference ref) |
static <T> int |
deleteObjectReference(Connection connection,
T object,
String reference) |
static <T> int |
deleteObjectReferences(Connection connection,
T object) |
static <T> T |
fetchObjectLazyColumn(Connection connection,
T object,
String columnName) |
static <T> T |
fetchObjectLazyColumns(Connection connection,
T object) |
static <T> T |
fetchObjectReference(Connection connection,
T object,
String reference) |
static <T> T |
fetchObjectReferences(Connection connection,
T object) |
static <T> T |
fetchObjectReferencesCascade(Connection connection,
T object,
Class<?> objType) |
static <T> int |
fetchObjectsCount(Connection connection,
Map<String,Object> properties,
Class<T> type) |
static <T> int |
fetchObjectsCount(Connection connection,
String sql,
Map<String,Object> properties) |
static JsonObjectDao |
getJsonObjectDao(Connection connection,
TableMapInfo mapInfo) |
static <T> T |
getObjectById(Connection connection,
Object id,
Class<T> type) |
static <T> T |
getObjectByProperties(Connection connection,
Map<String,Object> properties,
Class<T> type) |
static <T> T |
getObjectBySql(Connection connection,
String sql,
Map<String,Object> properties,
Class<T> type) |
static <T> T |
getObjectCascadeById(Connection connection,
Object id,
Class<T> type) |
static <T> T |
getObjectCascadeShallowById(Connection connection,
Object id,
Class<T> type) |
static <T> T |
getObjectIncludeLazyById(Connection connection,
Object id,
Class<T> type) |
static Long |
getSequenceNextValue(Connection connection,
String sequenceName)
MySql使用存储过程来模拟序列的
获取 Sequence 的值
|
static <T> List<T> |
listAllObjects(Connection connection,
Class<T> type) |
static <T> List<T> |
listObjectsByProperties(Connection connection,
Map<String,Object> properties,
Class<T> type) |
static <T> List<T> |
listObjectsByProperties(Connection connection,
Map<String,Object> properties,
Class<T> type,
int startPos,
int maxSize) |
static <T> int |
mergeObject(Connection connection,
T object) |
static <T> int |
mergeObjectCascade(Connection connection,
T object) |
static <T> int |
mergeObjectCascadeShallow(Connection connection,
T object) |
static <T> List<T> |
queryObjectsByNamedParamsSql(Connection connection,
String sql,
Map<String,Object> params,
Class<T> type) |
static <T> List<T> |
queryObjectsByNamedParamsSql(Connection connection,
String sql,
Map<String,Object> params,
Class<T> type,
int startPos,
int maxSize) |
static <T> List<T> |
queryObjectsByParamsSql(Connection connection,
String sql,
Object[] params,
Class<T> type) |
static <T> List<T> |
queryObjectsByParamsSql(Connection connection,
String sql,
Object[] params,
Class<T> type,
int startPos,
int maxSize) |
static <T> List<T> |
queryObjectsBySql(Connection connection,
String sql,
Class<T> type) |
static <T> List<T> |
queryObjectsBySql(Connection connection,
String sql,
Class<T> type,
int startPos,
int maxSize) |
static <T> int |
replaceObjectsAsTabulation(Connection connection,
List<T> dbObjects,
List<T> newObjects) |
static <T> int |
replaceObjectsAsTabulation(Connection connection,
List<T> newObjects,
Map<String,Object> properties) |
static <T> int |
replaceObjectsAsTabulation(Connection connection,
List<T> newObjects,
String propertyName,
Object propertyValue) |
static <T> int |
saveNewObject(Connection connection,
T object) |
static <T> int |
saveNewObjectCascade(Connection connection,
T object) |
static <T> int |
saveNewObjectCascadeShallow(Connection connection,
T object) |
static <T> int |
saveObjectReference(Connection connection,
T object,
String reference) |
static <T> int |
saveObjectReferences(Connection connection,
T object) |
static <T> int |
updateObject(Connection connection,
Collection<String> fields,
T object)
只更改对象object的部分属性 fields
|
static <T> int |
updateObject(Connection connection,
T object) |
static <T> int |
updateObjectCascade(Connection connection,
T object) |
static <T> int |
updateObjectCascadeShallow(Connection connection,
T object) |
public static Long getSequenceNextValue(Connection connection, String sequenceName)
connection - 数据库连接sequenceName - 序列名称public static JsonObjectDao getJsonObjectDao(Connection connection, TableMapInfo mapInfo)
public static <T> int saveNewObject(Connection connection, T object) throws PersistenceException
public static <T> int updateObject(Connection connection, T object) throws PersistenceException
public static <T> int updateObject(Connection connection, Collection<String> fields, T object) throws PersistenceException
T - 对象类型connection - 数据库连接fields - 需要修改的属性object - 修改的对象,主键必须有值PersistenceException - 运行时异常public static <T> int batchUpdateObject(Connection connection, Collection<String> fields, T object, Map<String,Object> propertiesFilter) throws PersistenceException
T - 类型connection - 数据库连接fields - 需要修改的属性,对应的值从 object 对象中找object - 对应 fields 中的属性必须有值,如果没有值 将被设置为nullpropertiesFilter - 过滤条件对PersistenceException - 运行时异常public static int batchUpdateObject(Connection connection, Class<?> type, Map<String,Object> propertiesValue, Map<String,Object> propertiesFilter) throws PersistenceException
connection - 数据库连接type - 对象类型propertiesValue - 值对propertiesFilter - 过滤条件对PersistenceException - 运行时异常public static <T> int mergeObject(Connection connection, T object) throws PersistenceException
public static <T> T getObjectBySql(Connection connection, String sql, Map<String,Object> properties, Class<T> type) throws PersistenceException
public static <T> T getObjectById(Connection connection, Object id, Class<T> type) throws PersistenceException
public static <T> T getObjectIncludeLazyById(Connection connection, Object id, Class<T> type) throws PersistenceException
public static <T> T getObjectCascadeShallowById(Connection connection, Object id, Class<T> type) throws PersistenceException
public static <T> T getObjectCascadeById(Connection connection, Object id, Class<T> type) throws PersistenceException
public static <T> int deleteObjectById(Connection connection, Map<String,Object> id, Class<T> type) throws PersistenceException
public static <T> int deleteObject(Connection connection, T object) throws PersistenceException
public static <T> int deleteObjectById(Connection connection, Object id, Class<T> type) throws PersistenceException
public static <T> T getObjectByProperties(Connection connection, Map<String,Object> properties, Class<T> type) throws PersistenceException
public static <T> List<T> listAllObjects(Connection connection, Class<T> type) throws PersistenceException
public static <T> List<T> listObjectsByProperties(Connection connection, Map<String,Object> properties, Class<T> type) throws PersistenceException
public static <T> List<T> listObjectsByProperties(Connection connection, Map<String,Object> properties, Class<T> type, int startPos, int maxSize) throws PersistenceException
public static <T> List<T> queryObjectsBySql(Connection connection, String sql, Class<T> type) throws PersistenceException
public static <T> List<T> queryObjectsByParamsSql(Connection connection, String sql, Object[] params, Class<T> type) throws PersistenceException
public static <T> List<T> queryObjectsByNamedParamsSql(Connection connection, String sql, Map<String,Object> params, Class<T> type) throws PersistenceException
public static <T> List<T> queryObjectsBySql(Connection connection, String sql, Class<T> type, int startPos, int maxSize) throws PersistenceException
public static <T> List<T> queryObjectsByParamsSql(Connection connection, String sql, Object[] params, Class<T> type, int startPos, int maxSize) throws PersistenceException
public static <T> List<T> queryObjectsByNamedParamsSql(Connection connection, String sql, Map<String,Object> params, Class<T> type, int startPos, int maxSize) throws PersistenceException
public static <T> T fetchObjectLazyColumn(Connection connection, T object, String columnName) throws PersistenceException
public static <T> T fetchObjectLazyColumns(Connection connection, T object) throws PersistenceException
public static <T> T fetchObjectReferencesCascade(Connection connection, T object, Class<?> objType)
public static <T> T fetchObjectReference(Connection connection, T object, String reference) throws PersistenceException
public static <T> T fetchObjectReferences(Connection connection, T object) throws PersistenceException
public static <T> int deleteObjectByProperties(Connection connection, Map<String,Object> properties, Class<T> type) throws PersistenceException
public static <T> int deleteObjectReference(Connection connection, T object, SimpleTableReference ref) throws PersistenceException
public static <T> int deleteObjectReference(Connection connection, T object, String reference) throws PersistenceException
public static <T> int deleteObjectReferences(Connection connection, T object) throws PersistenceException
public static <T> int deleteObjectCascadeShallow(Connection connection, T object) throws PersistenceException
public static <T> int deleteObjectCascade(Connection connection, T object) throws PersistenceException
public static <T> int deleteObjectCascadeShallowById(Connection connection, Object id, Class<T> type) throws PersistenceException
public static <T> int deleteObjectCascadeById(Connection connection, Object id, Class<T> type) throws PersistenceException
public static <T> int replaceObjectsAsTabulation(Connection connection, List<T> dbObjects, List<T> newObjects) throws PersistenceException
public static <T> int replaceObjectsAsTabulation(Connection connection, List<T> newObjects, String propertyName, Object propertyValue) throws PersistenceException
public static <T> int replaceObjectsAsTabulation(Connection connection, List<T> newObjects, Map<String,Object> properties) throws PersistenceException
public static <T> int saveObjectReference(Connection connection, T object, String reference) throws PersistenceException
public static <T> int saveObjectReferences(Connection connection, T object) throws PersistenceException
public static <T> int saveNewObjectCascadeShallow(Connection connection, T object) throws PersistenceException
public static <T> int saveNewObjectCascade(Connection connection, T object) throws PersistenceException
public static <T> int updateObjectCascadeShallow(Connection connection, T object) throws PersistenceException
public static <T> int updateObjectCascade(Connection connection, T object) throws PersistenceException
public static <T> int checkObjectExists(Connection connection, T object) throws PersistenceException
public static <T> int fetchObjectsCount(Connection connection, Map<String,Object> properties, Class<T> type) throws PersistenceException
public static <T> int fetchObjectsCount(Connection connection, String sql, Map<String,Object> properties) throws PersistenceException
public static <T> int mergeObjectCascadeShallow(Connection connection, T object) throws PersistenceException
public static <T> int mergeObjectCascade(Connection connection, T object) throws PersistenceException
Copyright © 2025 江苏南大先腾信息产业股份有限公司. All rights reserved.