This commit is contained in:
@@ -17,13 +17,41 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public interface DistributeTableStrategy<T> {
|
public interface DistributeTableStrategy<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取对象的表名
|
||||||
|
* 查询单个对象时调用本方法获取表名
|
||||||
|
*
|
||||||
|
* @param table 模板表的表名
|
||||||
|
* @param primary 记录主键
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
default String getTable(String table, Serializable primary) {
|
default String getTable(String table, Serializable primary) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取对象的表名
|
||||||
|
* 查询、修改、删除对象时调用本方法获取表名
|
||||||
|
* 注意: 需保证FilterNode过滤的结果集合必须在一个数据库表中
|
||||||
|
*
|
||||||
|
* @param table 模板表的表名
|
||||||
|
* @param node 过滤条件
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
default String getTable(String table, FilterNode node) {
|
default String getTable(String table, FilterNode node) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取对象的表名
|
||||||
|
* 新增对象或更新单个对象时调用本方法获取表名
|
||||||
|
*
|
||||||
|
* @param table 模板表的表名
|
||||||
|
* @param bean 实体对象
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getTable(String table, T bean);
|
public String getTable(String table, T bean);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user