类 OperationContext
java.lang.Object
com.elitesland.ystdms.sys.operationlog.OperationContext
操作日志上下文
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidclear()清理上下文static int批量计数减1,返回剩余数量static Integer获取批量操作数量static String获取业务类型static String获取操作类型static boolean是否启用日志记录static voidsetBatchCount(int count) 设置批量操作数量 用于批量插入或更新时,记录每一条数据的日志static voidsetBusinessType(String businessType) 设置业务类型static voidsetEnabled(boolean enabled) 设置是否启用日志记录static voidsetOperationType(OperationType operationType) 设置操作类型(枚举,兼容旧代码)static voidsetOperationType(String operationType) 设置操作类型(字符串)
-
构造器详细资料
-
OperationContext
public OperationContext()
-
-
方法详细资料
-
setOperationType
设置操作类型(字符串) -
setOperationType
设置操作类型(枚举,兼容旧代码) -
getOperationType
获取操作类型 -
setBusinessType
设置业务类型 -
getBusinessType
获取业务类型 -
setEnabled
public static void setEnabled(boolean enabled) 设置是否启用日志记录 -
isEnabled
public static boolean isEnabled()是否启用日志记录 -
setBatchCount
public static void setBatchCount(int count) 设置批量操作数量 用于批量插入或更新时,记录每一条数据的日志- 参数:
count- 批量操作的数据条数,如果 > 1 则表示批量操作
-
getBatchCount
获取批量操作数量 -
decrementBatchCount
public static int decrementBatchCount()批量计数减1,返回剩余数量- 返回:
- 剩余数量
-
clear
public static void clear()清理上下文
-