/**
* "Visual Paradigm: DO NOT MODIFY THIS FILE!"
*
* This is an automatic generated file. It will be regenerated every time
* you generate persistence class.
*
* Modifying its content may cause the program not work, or your work may lost.
*/
/**
* Licensee: DuKe TeAm
* License Type: Purchased
*/
package orm;
import org.orm.*;
import org.hibernate.Query;
import java.util.List;
public class Tau_sessionuserfrontendDAO {
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByORMID(int sf_id) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return loadTau_sessionuserfrontendByORMID(session, sf_id);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend getTau_sessionuserfrontendByORMID(int sf_id) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return getTau_sessionuserfrontendByORMID(session, sf_id);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByORMID(int sf_id, org.hibernate.LockMode lockMode) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return loadTau_sessionuserfrontendByORMID(session, sf_id, lockMode);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend getTau_sessionuserfrontendByORMID(int sf_id, org.hibernate.LockMode lockMode) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return getTau_sessionuserfrontendByORMID(session, sf_id, lockMode);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByORMID(PersistentSession session, int sf_id) throws PersistentException {
try {
return (Tau_sessionuserfrontend) session.load(orm.Tau_sessionuserfrontend.class, new Integer(sf_id));
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend getTau_sessionuserfrontendByORMID(PersistentSession session, int sf_id) throws PersistentException {
try {
return (Tau_sessionuserfrontend) session.get(orm.Tau_sessionuserfrontend.class, new Integer(sf_id));
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByORMID(PersistentSession session, int sf_id, org.hibernate.LockMode lockMode) throws PersistentException {
try {
return (Tau_sessionuserfrontend) session.load(orm.Tau_sessionuserfrontend.class, new Integer(sf_id), lockMode);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend getTau_sessionuserfrontendByORMID(PersistentSession session, int sf_id, org.hibernate.LockMode lockMode) throws PersistentException {
try {
return (Tau_sessionuserfrontend) session.get(orm.Tau_sessionuserfrontend.class, new Integer(sf_id), lockMode);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend[] listTau_sessionuserfrontendByQuery(String condition, String orderBy) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return listTau_sessionuserfrontendByQuery(session, condition, orderBy);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend[] listTau_sessionuserfrontendByQuery(String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return listTau_sessionuserfrontendByQuery(session, condition, orderBy, lockMode);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend[] listTau_sessionuserfrontendByQuery(PersistentSession session, String condition, String orderBy) throws PersistentException {
StringBuffer sb = new StringBuffer("From orm.Tau_sessionuserfrontend as Tau_sessionuserfrontend");
if (condition != null)
sb.append(" Where ").append(condition);
if (orderBy != null)
sb.append(" Order By ").append(orderBy);
try {
Query query = session.createQuery(sb.toString());
List list = query.list();
return (Tau_sessionuserfrontend[]) list.toArray(new Tau_sessionuserfrontend[list.size()]);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend[] listTau_sessionuserfrontendByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException {
StringBuffer sb = new StringBuffer("From orm.Tau_sessionuserfrontend as Tau_sessionuserfrontend");
if (condition != null)
sb.append(" Where ").append(condition);
if (orderBy != null)
sb.append(" Order By ").append(orderBy);
try {
Query query = session.createQuery(sb.toString());
query.setLockMode("this", lockMode);
List list = query.list();
return (Tau_sessionuserfrontend[]) list.toArray(new Tau_sessionuserfrontend[list.size()]);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByQuery(String condition, String orderBy) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return loadTau_sessionuserfrontendByQuery(session, condition, orderBy);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByQuery(String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return loadTau_sessionuserfrontendByQuery(session, condition, orderBy, lockMode);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByQuery(PersistentSession session, String condition, String orderBy) throws PersistentException {
Tau_sessionuserfrontend[] tau_sessionuserfrontends = listTau_sessionuserfrontendByQuery(session, condition, orderBy);
if (tau_sessionuserfrontends != null && tau_sessionuserfrontends.length > 0)
return tau_sessionuserfrontends[0];
else
return null;
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException {
Tau_sessionuserfrontend[] tau_sessionuserfrontends = listTau_sessionuserfrontendByQuery(session, condition, orderBy, lockMode);
if (tau_sessionuserfrontends != null && tau_sessionuserfrontends.length > 0)
return tau_sessionuserfrontends[0];
else
return null;
}
public static java.util.Iterator iterateTau_sessionuserfrontendByQuery(String condition, String orderBy) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return iterateTau_sessionuserfrontendByQuery(session, condition, orderBy);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static java.util.Iterator iterateTau_sessionuserfrontendByQuery(String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException {
try {
PersistentSession session = orm.AuthPersistentManager.instance().getSession();
return iterateTau_sessionuserfrontendByQuery(session, condition, orderBy, lockMode);
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static java.util.Iterator iterateTau_sessionuserfrontendByQuery(PersistentSession session, String condition, String orderBy) throws PersistentException {
StringBuffer sb = new StringBuffer("From orm.Tau_sessionuserfrontend as Tau_sessionuserfrontend");
if (condition != null)
sb.append(" Where ").append(condition);
if (orderBy != null)
sb.append(" Order By ").append(orderBy);
try {
Query query = session.createQuery(sb.toString());
return query.iterate();
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static java.util.Iterator iterateTau_sessionuserfrontendByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException {
StringBuffer sb = new StringBuffer("From orm.Tau_sessionuserfrontend as Tau_sessionuserfrontend");
if (condition != null)
sb.append(" Where ").append(condition);
if (orderBy != null)
sb.append(" Order By ").append(orderBy);
try {
Query query = session.createQuery(sb.toString());
query.setLockMode("this", lockMode);
return query.iterate();
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend createTau_sessionuserfrontend() {
return new orm.Tau_sessionuserfrontend();
}
public static boolean save(orm.Tau_sessionuserfrontend tau_sessionuserfrontend) throws PersistentException {
try {
orm.AuthPersistentManager.instance().saveObject(tau_sessionuserfrontend);
return true;
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static boolean delete(orm.Tau_sessionuserfrontend tau_sessionuserfrontend) throws PersistentException {
try {
orm.AuthPersistentManager.instance().deleteObject(tau_sessionuserfrontend);
return true;
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static boolean deleteAndDissociate(orm.Tau_sessionuserfrontend tau_sessionuserfrontend)throws PersistentException {
try {
if(tau_sessionuserfrontend.getSf_uf() != null) {
tau_sessionuserfrontend.getSf_uf().tau_sessionuserfrontend.remove(tau_sessionuserfrontend);
}
return delete(tau_sessionuserfrontend);
}
catch(Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static boolean deleteAndDissociate(orm.Tau_sessionuserfrontend tau_sessionuserfrontend, org.orm.PersistentSession session)throws PersistentException {
try {
if(tau_sessionuserfrontend.getSf_uf() != null) {
tau_sessionuserfrontend.getSf_uf().tau_sessionuserfrontend.remove(tau_sessionuserfrontend);
}
try {
session.delete(tau_sessionuserfrontend);
return true;
} catch (Exception e) {
return false;
}
}
catch(Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static boolean refresh(orm.Tau_sessionuserfrontend tau_sessionuserfrontend) throws PersistentException {
try {
orm.AuthPersistentManager.instance().getSession().refresh(tau_sessionuserfrontend);
return true;
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static boolean evict(orm.Tau_sessionuserfrontend tau_sessionuserfrontend) throws PersistentException {
try {
orm.AuthPersistentManager.instance().getSession().evict(tau_sessionuserfrontend);
return true;
}
catch (Exception e) {
e.printStackTrace();
throw new PersistentException(e);
}
}
public static Tau_sessionuserfrontend loadTau_sessionuserfrontendByCriteria(Tau_sessionuserfrontendCriteria tau_sessionuserfrontendCriteria) {
Tau_sessionuserfrontend[] tau_sessionuserfrontends = listTau_sessionuserfrontendByCriteria(tau_sessionuserfrontendCriteria);
if(tau_sessionuserfrontends == null || tau_sessionuserfrontends.length == 0) {
return null;
}
return tau_sessionuserfrontends[0];
}
public static Tau_sessionuserfrontend[] listTau_sessionuserfrontendByCriteria(Tau_sessionuserfrontendCriteria tau_sessionuserfrontendCriteria) {
return tau_sessionuserfrontendCriteria.listTau_sessionuserfrontend();
}
}