Package br.facet.tcc.exception

Examples of br.facet.tcc.exception.DaoException


        Integer integer = null;
        try {
            integer = (Integer) save(t);
            logger.debug("Objeto salvo com sucesso em " + t.getClass());
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
        return integer;
    }
View Full Code Here


    public void atualizar(T t) throws DaoException {
        try {
            merge(t);
            logger.debug("Objeto atualizado com sucesso em " + t.getClass());
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
    }
View Full Code Here

    public void excluir(T t) throws DaoException {
        try {
            delete(t);
            logger.debug("Objeto removido com sucesso em " + t.getClass());
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
    }
View Full Code Here

    public List<T> listar(Class clazz) throws DaoException {
        List list = null;
        try {
            list = loadAll(clazz);
        } catch (DataAccessException e) {
            throw new DaoException(e);
        }
        return list;
    }
View Full Code Here

        Criteria criteria = hCriteria.createCriteria(t);
        List list = null;
        try {
            list = criteria.list();
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
        return list;
    }
View Full Code Here

        Integer integer = null;
        try {
            integer = (Integer) getHibernateTemplate().save(t);
            logger.debug("Objeto salvo com sucesso em " + t.getClass());
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
        return integer;
    }
View Full Code Here

    public T obterPorID(Class clazz, Integer id) throws DaoException {
        T t = null;
        try {
            t = (T) get(clazz, id);
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
        return t;
    }
View Full Code Here

    public void atualizar(T t) throws DaoException {
        try {
            getHibernateTemplate().merge(t);
            logger.debug("Objeto atualizado com sucesso em " + t.getClass());
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
    }
View Full Code Here

    public void excluir(T t) throws DaoException {
        try {
            getHibernateTemplate().delete(t);
            logger.debug("Objeto removido com sucesso em " + t.getClass());
        } catch (HibernateException e) {
            throw new DaoException(e);
        }
    }
View Full Code Here

    public List<T> listar(Class clazz) throws DaoException {
        List list = null;
        try {
            list = getHibernateTemplate().loadAll(clazz);
        } catch (DataAccessException e) {
            throw new DaoException(e);
        }
        return list;
    }
View Full Code Here

TOP

Related Classes of br.facet.tcc.exception.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.