otherloglistener.java

来自「hibernate3.2.6源码和jar包」· Java 代码 · 共 27 行

JAVA
27
字号
//$Id: $
package org.hibernate.test.annotations.reflection;

import javax.persistence.PrePersist;
import javax.persistence.PostPersist;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author Emmanuel Bernard
 */
public class OtherLogListener {
	Log log = LogFactory.getLog( OtherLogListener.class );

	@PrePersist
	@PostPersist
	public void log(Object entity) {
		log.debug( "Logging entity " +  entity.getClass().getName() + " with hashCode: " + entity.hashCode() );
	}


	public void noLog(Object entity) {
		log.debug( "NoLogging entity " +  entity.getClass().getName() + " with hashCode: " + entity.hashCode() );
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?