auditinterceptor.java
来自「Java 敏捷开发--使用Spring Hibernate 和 Eclipse源」· Java 代码 · 共 33 行
JAVA
33 行
package com.visualpatterns.timex.model;
import java.io.Serializable;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.EmptyInterceptor;
import org.hibernate.Transaction;
import org.hibernate.type.Type;
/**
* Hibernate interceptor class.
* @author anil
*/
public class AuditInterceptor extends EmptyInterceptor
{
private static Log log = LogFactory.getLog(AuditInterceptor.class);
public void afterTransactionCompletion(Transaction tx)
{
log.debug("afterTransactionCompletion called!");
}
public boolean onSave(
Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
Type[] types)
{
return false;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?