M - public abstract class BaseModel<M extends Model<M>> extends Model<M>
| 构造器和说明 |
|---|
BaseModel() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
delete()
是否可以物理删除,如果含有datastate字段,则只能物理删除
|
boolean |
deleteById(Object id)
是否可以物理删除,如果含有datastate字段,则只能物理删除
|
List<M> |
find(String sql,
Object... paras)
Find model.
|
Timestamp |
getCurrentTime()
获得当前时间
|
String |
getPKValue()
获取主键值
|
protected String |
getSql(String sqlId)
获取SQL,固定SQL
|
protected String |
getSql(String sqlId,
Map<String,Object> param)
获取SQL,动态SQL
|
protected String |
getSql(String sqlId,
Map<String,String> param,
LinkedList<Object> list)
获取SQL,动态SQL
|
protected Table |
getTable()
获取表映射对象
|
boolean |
isEmpty() |
boolean |
isNotEmpty() |
boolean |
save()
重写save方法
|
boolean |
update()
重写update方法
|
clear, deleteById, equals, find, findByCache, findByCache, findById, findById, findByIdLoadColumns, findByIdLoadColumns, findFirst, findFirst, findFirstByCache, findFirstByCache, get, get, getAttrNames, getAttrs, getAttrsEntrySet, getAttrValues, getBigDecimal, getBigInteger, getBoolean, getBytes, getDate, getDouble, getFloat, getInt, getLong, getNumber, getStr, getTime, getTimestamp, hashCode, keep, keep, paginate, paginate, paginateByCache, paginateByCache, put, put, put, put, remove, remove, removeNullValueAttrs, set, setAttrs, setAttrs, toJson, toRecord, toString, useprotected String getSql(String sqlId, Map<String,Object> param)
sqlId - param - protected String getSql(String sqlId, Map<String,String> param, LinkedList<Object> list)
sqlId - param - 查询参数list - 用于接收预处理的值protected Table getTable()
public String getPKValue()
public Timestamp getCurrentTime()
public boolean delete()
public boolean deleteById(Object id)
deleteById 在类中 Model<M extends Model<M>>id - the id value of the modelpublic boolean isNotEmpty()
public boolean isEmpty()
Copyright © 2015. All rights reserved.