public abstract class CPI extends Object
| 构造器和说明 |
|---|
CPI() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addModelToConfigMapping(Class<? extends Model> modelClass,
Config config) |
static List<Record> |
find(Connection conn,
String sql,
Object... paras) |
static List<Record> |
find(String configName,
Connection conn,
String sql,
Object... paras) |
static Map<String,Object> |
getAttrs(Model model)
Return the attributes map of the model
|
static Config |
getConfig(Model model) |
static String |
getConfigName(Model model) |
static Set<String> |
getModifyFlag(Model model) |
static Set<String> |
getModifyFlag(Record record) |
static Table |
getTable(Model model) |
static Class<? extends Model> |
getUsefulClass(Model model) |
static Page<Record> |
paginate(Connection conn,
int pageNumber,
int pageSize,
String select,
String sqlExceptSelect,
Object... paras) |
static Page<Record> |
paginate(String configName,
Connection conn,
int pageNumber,
int pageSize,
String select,
String sqlExceptSelect,
Object... paras) |
static <T> List<T> |
query(Config config,
Connection conn,
String sql,
Object... paras) |
static <T> List<T> |
query(Connection conn,
String sql,
Object... paras) |
static <T> List<T> |
query(String configName,
Connection conn,
String sql,
Object... paras) |
static void |
setColumnsMap(Record record,
Map<String,Object> columns)
Return the columns map of the record
|
static void |
setTablePrimaryKey(Table table,
String primaryKey) |
static int |
update(Connection conn,
String sql,
Object... paras) |
static int |
update(String configName,
Connection conn,
String sql,
Object... paras) |
public static final Map<String,Object> getAttrs(Model model)
model - the model extends from class Modelpublic static <T> List<T> query(Connection conn, String sql, Object... paras) throws SQLException
SQLExceptionpublic static <T> List<T> query(String configName, Connection conn, String sql, Object... paras) throws SQLException
SQLExceptionpublic static <T> List<T> query(Config config, Connection conn, String sql, Object... paras) throws SQLException
SQLExceptionpublic static void setColumnsMap(Record record, Map<String,Object> columns)
record - the Record objectpublic static List<Record> find(Connection conn, String sql, Object... paras) throws SQLException
SQLExceptionpublic static List<Record> find(String configName, Connection conn, String sql, Object... paras) throws SQLException
SQLExceptionpublic static Page<Record> paginate(Connection conn, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) throws SQLException
SQLExceptionpublic static Page<Record> paginate(String configName, Connection conn, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) throws SQLException
SQLExceptionpublic static int update(Connection conn, String sql, Object... paras) throws SQLException
SQLExceptionpublic static int update(String configName, Connection conn, String sql, Object... paras) throws SQLException
SQLExceptionCopyright © 2024. All rights reserved.