|
|
@ -20,6 +20,23 @@ import java.util.Map;
|
|
|
|
public interface BaseRepository <T, ID extends Serializable> extends JpaRepository<T, ID> {
|
|
|
|
public interface BaseRepository <T, ID extends Serializable> extends JpaRepository<T, ID> {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 清空一级缓存,可能影响service中对象的状态,慎用
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void clearSession();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 清除一级缓存对象,设为游离态
|
|
|
|
|
|
|
|
* @param t
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void detachObject(T t);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 清除一级缓存集合,设为游离态
|
|
|
|
|
|
|
|
* @param list
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void detachList(List<T> list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 新增对象<br/>
|
|
|
|
* 新增对象<br/>
|
|
|
|
* 注意:如果对象id是long,并且为0,则设为
|
|
|
|
* 注意:如果对象id是long,并且为0,则设为
|
|
|
|
* 字符串,并且没有赋值,该方法将自动设置为uuid值
|
|
|
|
* 字符串,并且没有赋值,该方法将自动设置为uuid值
|
|
|
|