Package com.ctp.cdi.query

Examples of com.ctp.cdi.query.Query


        return QueryRoot.UNKNOWN_ROOT;
    }
   
    private boolean isAnnotated() {
        if (method.isAnnotationPresent(Query.class)) {
            Query query = method.getAnnotation(Query.class);
            return isValid(query);
        }
        return false;
    }
View Full Code Here


    private final QueryStringExtractorFactory factory = new QueryStringExtractorFactory();

    @Override
    public Object execute(CdiQueryInvocationContext context) {
        Method method = context.getMethod();
        Query query = method.getAnnotation(Query.class);
        javax.persistence.Query jpaQuery = createJpaQuery(query, context);
        return context.executeQuery(jpaQuery);
    }
View Full Code Here

        return QueryRoot.UNKNOWN_ROOT;
    }
   
    private boolean isAnnotated() {
        if (method.isAnnotationPresent(Query.class)) {
            Query query = method.getAnnotation(Query.class);
            return isValid(query);
        }
        return false;
    }
View Full Code Here

    private final QueryStringExtractorFactory factory = new QueryStringExtractorFactory();

    @Override
    public Object execute(QueryInvocationContext context) {
        Method method = context.getMethod();
        Query query = method.getAnnotation(Query.class);
        javax.persistence.Query jpaQuery = createJpaQuery(query, context);
        return context.executeQuery(jpaQuery);
    }
View Full Code Here

public class AnnotatedQueryBuilder extends QueryBuilder {
   
    @Override
    public Object execute(QueryInvocationContext context) {
        Method method = context.getMethod();
        Query query = method.getAnnotation(Query.class);
        javax.persistence.Query jpaQuery = createJpaQuery(query, context);
        if (returnsList(method)) {
            return jpaQuery.getResultList();
        } else {
            return jpaQuery.getSingleResult();
View Full Code Here

        return QueryRoot.UNKNOWN_ROOT;
    }
   
    private boolean isAnnotated() {
        if (method.isAnnotationPresent(Query.class)) {
            Query query = method.getAnnotation(Query.class);
            return isValid(query);
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of com.ctp.cdi.query.Query

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.