【Java开源代码栏目提醒】:以下是网学会员为您推荐的Java开源代码-AbstractQueryPage.java,希望本篇文章对您学习有所帮助。
/*
* Created on 27-09-2003
*
* To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package net.sf.hibern8ide;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.Session;
import net.sf.hibernate.type.Type;
/**
* @author MAX
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public abstract class AbstractQueryPage implements QueryPage {
private boolean released;
private int id;
final protected Session session;
protected List list;
List pathNames;
protected boolean sticky;
protected List exceptions = new ArrayList();
/**
* @param session2
*/
public AbstractQueryPage(Session session2) {
this.session = session2;
}
/**
* @param i
*/
public void setId(int i) {
id = i;
}
/**
*
*/
public List getExceptions() {
return exceptions;
}
public void release() {
if (!released && session.isOpen()) {
try {
session.close();
} catch (HibernateException e) {
exceptions.add(e);
}
released = true;
}
}
/**
* @return
*/
public int getID() {
return id;
}
/**
* @return
*/
public boolean isSticky() {
return sticky;
}
/**
* @param sticky
*/
public void setSticky(boolean sticky) {
this.sticky = sticky;
}
}
上一篇:
AbstractQueryImpl.java
下一篇:
经济酒店发展:China''s economy hotel market development strategies