Package vn.pyco.commons.dao.criteria

Examples of vn.pyco.commons.dao.criteria.Criteria


    @SuppressWarnings("unchecked")
    @Override
    public <T extends Node> T getByPath(String path, Class<T> type) {
        T result = null;
        try {
            Criteria criteria = Criteria.forClass(type);
            criteria.add(Restrictions.eq(Node.PROP_PATH, path));
            result = (T) findUniqueByCriteria(criteria);
        } catch (Exception e) {
            return null;
        }
       
View Full Code Here


            parentNode = getByPath(parentPath, Node.class);
        }
       
        T result = null;
        try {
            Criteria criteria = Criteria.forClass(type);
            criteria.add(Restrictions.eq(Node.PROP_ALIAS, alias));
            if (parentNode == null) {
                criteria.add(Restrictions.isNull(Node.PROP_PARENT));
            } else {
                criteria.add(Restrictions.eq(Node.PROP_PARENT, parentNode));
            }
           
            result = (T) findUniqueByCriteria(criteria);
           
        } catch (Exception e) {
View Full Code Here

            parentNode = getByPath(parentPath, Node.class);
        }
       
        List<T> result = null;
        try {
            Criteria criteria = createCriteria();
            if (parentNode == null) {
                criteria.add(Restrictions.isNull(Site.PROP_PARENT));
            } else {
                criteria.add(Restrictions.eq(Site.PROP_PARENT, parentNode));
            }
            result = findByCriteria(criteria);
           
        } catch (Exception e) {
            logger.error("Cound not get all child nodes from parentPath=" + parentPath, e);
View Full Code Here

TOP

Related Classes of vn.pyco.commons.dao.criteria.Criteria

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.