Package javango.db

Examples of javango.db.ManagerException


        Object value = PropertyUtils.getProperty(params, fieldName);       
        if (value != null) other.valueFilters.put(fieldName, value);
      }
    } catch (IllegalAccessException e) {
      LogFactory.getLog(HibernateQuerySet.class).error(e,e);
      throw new ManagerException(e);
    } catch (InvocationTargetException e) {
      LogFactory.getLog(HibernateQuerySet.class).error(e,e);
      throw new ManagerException(e);
    } catch (NoSuchMethodException e) {
      LogFactory.getLog(HibernateQuerySet.class).error(e,e);
      throw new ManagerException(e);
   
    return other;
  }
View Full Code Here


  public T get() throws ManagerException {
    try {
      return (T)getCriteria().uniqueResult();
    } catch (HibernateException e) {
      LogFactory.getLog(HibernateQuerySet.class).error(_("Hibernate Exception 'get()' while running '%s'", this.toString()));
      throw new ManagerException(e);
    }
  }
View Full Code Here

      return getCriteria().list();
    } catch (HibernateException e) {     
      LogFactory.getLog(HibernateQuerySet.class).error(_("Hibernate Exception 'list()' while running '%s'", this.toString()));
      LogFactory.getLog(HibernateQuerySet.class).error(e,e);
      LogFactory.getLog(HibernateQuerySet.class).error(e,e.getCause());
      throw new ManagerException("Unable to run query");
    }
  }
View Full Code Here

    if (_count == null) {
      try {
        _count = new Long(hibernateUtil.doCount(getRawCriteria().getExecutableCriteria(hibernateUtil.getSession())));
      } catch (HibernateException e) {
        LogFactory.getLog(HibernateQuerySet.class).error(_("Hibernate Exception while running %s", this.toString()));
        throw new ManagerException(e);
      }
    }
    return _count;
  }
View Full Code Here

  public QuerySet<T> all() throws ManagerException {
    try {
      return new HibernateQuerySet<T>(hibernateUtil, model);
    } catch (Exception e) {
      throw new ManagerException(e);
    }
  }
View Full Code Here

  public void delete(T object) throws ManagerException {
    try {
      hibernateUtil.getSession().delete(object);
    } catch (HibernateException e) {
      throw new ManagerException(e);
    }

  }
View Full Code Here

  public T get(Serializable key) throws ManagerException {
    if (key == null) return null;
   
    Class<?>[] keyClass = getPkClass();
    if (keyClass.length != 1) {
      throw new ManagerException("get(pk) not supported for composite keyed models");
    }   
    if (key.getClass().equals(keyClass[0])) {
      return (T) hibernateUtil.getSession().get(model, key);
    }   
   
View Full Code Here

  public T save(T object) throws ManagerException {
    try {
      hibernateUtil.getSession().saveOrUpdate(object);
    } catch (HibernateException e) {
      throw new ManagerException(e);
    }
    return object;
  }
View Full Code Here

 
  public T create(T object) throws ManagerException {
    try {
      hibernateUtil.getSession().save(object);
    } catch (HibernateException e) {
      throw new ManagerException(e);
    }
    return object;
  }
View Full Code Here

  public Serializable getPk(T object) throws ManagerException {
    try {
      return hibernateUtil.getSession().getIdentifier(object);
    } catch (HibernateException e) {
      // TODO Throw something cool here and elsewhere...
      throw new ManagerException(e);
    }
  }
View Full Code Here

TOP

Related Classes of javango.db.ManagerException

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.