cn.sylinx.hbatis.plugin.optlock.OptimisticLockPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbatis-core Show documentation
Show all versions of hbatis-core Show documentation
hbatis is a simple orm framework
The newest version!
package cn.sylinx.hbatis.plugin.optlock;
import cn.sylinx.hbatis.plugin.IPlugin;
public class OptimisticLockPlugin implements IPlugin {
private boolean enableOptimisticLock = false;
public void setEnableOptimisticLock(boolean enableOptimisticLock) {
this.enableOptimisticLock = enableOptimisticLock;
}
@Override
public boolean start(Object... objects) {
OptimisticLockWrapper.ME.setEnable(enableOptimisticLock);
return true;
}
@Override
public boolean stop() {
return true;
}
}