Package de.sub.goobi.helper.exceptions

Examples of de.sub.goobi.helper.exceptions.DAOException


  protected List retrieveObjs(String query) throws DAOException {
    try {
      Session session = Helper.getHibernateSession();
      return session.createQuery(query).list();
    } catch (HibernateException he) {
      throw new DAOException(he);
    }
  }
View Full Code Here


      Query q = session.createQuery(query);
      q.setFirstResult(first);
      q.setMaxResults(max);
      return q.list();
    } catch (HibernateException he) {
      throw new DAOException(he);
    }
  }
View Full Code Here

  protected Long retrieveAnzahl(String query) throws DAOException {
    try {
      Session session = Helper.getHibernateSession();
      return (Long) session.createQuery("select count(*) " + query).uniqueResult();
    } catch (HibernateException he) {
      throw new DAOException(he);
    }
  }
View Full Code Here

      session.saveOrUpdate(obj);
      session.flush();
      session.beginTransaction().commit();
    } catch (HibernateException he) {
      rollback();
      throw new DAOException(he);
    }

  }
View Full Code Here

      }
      session.flush();
      session.beginTransaction().commit();
    } catch (HibernateException he) {
      rollback();
      throw new DAOException(he);

    }
  }
View Full Code Here

      Session session = Helper.getHibernateSession();
      if (session != null) {
        session.beginTransaction().rollback();
      }
    } catch (HibernateException he) {
      throw new DAOException(he);
    }
  }
View Full Code Here

        session.close();
        return o;
      }
      return session.load(c, id);
    } catch (HibernateException he) {
      throw new DAOException(he);
    }
  }
View Full Code Here

      Session session = Helper.getHibernateSession();
      Query q = session.createQuery(queryString);
      q.setParameter(0, parameter);
      return q.list();
    } catch (HibernateException he) {
      throw new DAOException(he);
    }
  }
View Full Code Here

  }

  public Benutzergruppe get(Integer id) throws DAOException {
    Benutzergruppe rueckgabe = (Benutzergruppe) retrieveObj(Benutzergruppe.class, id);
    if (rueckgabe == null) {
      throw new DAOException("Object can not be found in database");
    }
    return rueckgabe;
  }
View Full Code Here

TOP

Related Classes of de.sub.goobi.helper.exceptions.DAOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.