loadeventlistener.java
来自「介绍了hibernate的入门有一些基本常用的事例」· Java 代码 · 共 41 行
JAVA
41 行
//$Id: LoadEventListener.java,v 1.3 2005/04/03 01:52:13 oneovthafew Exp $package org.hibernate.event;import org.hibernate.HibernateException;import java.io.Serializable;/** * Defines the contract for handling of load events generated from a session. * * @author Steve Ebersole */public interface LoadEventListener extends Serializable { public static final LoadType GET = new LoadType("get"); public static final LoadType LOAD = new LoadType("load"); public static final LoadType IMMEDIATE_LOAD = new LoadType("immediate load"); public static final LoadType INTERNAL_LOAD = new LoadType("internal load"); public static final LoadType INTERNAL_LOAD_NULLABLE = new LoadType("internal load (one to one)"); /** Handle the given load event. * * @param event The load event to be handled. * @return The result (i.e., the loaded entity). * @throws HibernateException */ public Object onLoad(LoadEvent event, LoadType loadType) throws HibernateException; public static final class LoadType { private String name; private LoadType(String name) { this.name = name; } public String getName() { return name; } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?