public abstract class CPI extends Object
Constructor and Description |
---|
CPI() |
Modifier and Type | Method and Description |
---|---|
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 Set<String> |
getModifyFlag(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(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
SQLException
public static <T> List<T> query(String configName, Connection conn, String sql, Object... paras) throws SQLException
SQLException
public 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
SQLException
public static List<Record> find(String configName, Connection conn, String sql, Object... paras) throws SQLException
SQLException
public static Page<Record> paginate(Connection conn, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) throws SQLException
SQLException
public static Page<Record> paginate(String configName, Connection conn, int pageNumber, int pageSize, String select, String sqlExceptSelect, Object... paras) throws SQLException
SQLException
public static int update(Connection conn, String sql, Object... paras) throws SQLException
SQLException
public static int update(String configName, Connection conn, String sql, Object... paras) throws SQLException
SQLException
Copyright © 2018. All rights reserved.