Package br.jus.tjrn.arq.exception

Examples of br.jus.tjrn.arq.exception.PersistenceValidateException


    List<String> errors = new ArrayList<String>();
    for (ConstraintViolation<T> constraintViolation : constraintViolations) {
      errors.add(constraintViolation.getMessage());
    }
    if (!errors.isEmpty()) {
      throw new PersistenceValidateException(errors);
    }
  }
View Full Code Here


        try {
            validate(entity);
            ht.save(entity);
           
        } catch (PersistenceValidateException e) {
            throw new PersistenceValidateException(e);
        } catch (org.springframework.dao.DataAccessException e) {
            throw DataAcessExceptionTranslator.translate(e);
        } catch (Exception e) {
            /*
             * Em último caso, caso ocorra uma exceção inesperada, ela vai
View Full Code Here

             * http://static.springsource.org/spring/docs/1.2.9/api/org/springframework/orm/hibernate3/HibernateTemplate.html#merge%28java.lang.String,%20java.lang.Object%29
             * http://docs.oracle.com/javaee/5/api/javax/persistence/EntityManager.html#merge%28T%29
             */
            ht.merge(entity);
        } catch (PersistenceValidateException e) {
            throw new PersistenceValidateException(e);
        } catch (org.springframework.dao.DataAccessException e) {
            throw DataAcessExceptionTranslator.translate(e);           
        } catch (Exception e) {
            throw new DataAccessException(e);
        }
View Full Code Here

TOP

Related Classes of br.jus.tjrn.arq.exception.PersistenceValidateException

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.