Package com.ctp.cdi.query.builder

Examples of com.ctp.cdi.query.builder.MethodExpressionException


    final static String SEPARATOR = "_";
   
    void validate(String name, String method, DaoComponent dao) {
        Class<?> current = dao.getEntityClass();
        if (name == null) {
            throw new MethodExpressionException(null, dao.getDaoClass(), method);
        }
        for (String property : name.split(SEPARATOR)) {
            PropertyQuery<?> query = PropertyQueries.createQuery(current)
                    .addCriteria(new NamedPropertyCriteria(property));
            Property<?> result = query.getFirstResult();
            if (result == null) {
                throw new MethodExpressionException(property, dao.getDaoClass(), method);
            }
            current = result.getJavaClass();
        }
    }
View Full Code Here


        if (orderByParts.length > 1) {
            OrderByQueryPart orderByPart = new OrderByQueryPart();
            children.add(orderByPart.build(orderByParts[1], method, dao));
        }
        if (children.isEmpty()) {
            throw new MethodExpressionException(dao.getDaoClass(), method);
        }
        return this;
    }
View Full Code Here

        for (String property : name.split(SEPARATOR)) {
            PropertyQuery<?> query = PropertyQueries.createQuery(current)
                    .addCriteria(new NamedPropertyCriteria(property));
            Property<?> result = query.getFirstResult();
            if (result == null) {
                throw new MethodExpressionException(property, dao.getDaoClass(), method);
            }
            current = result.getJavaClass();
        }
    }
View Full Code Here

TOP

Related Classes of com.ctp.cdi.query.builder.MethodExpressionException

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.