Package org.conventionsframework.qualifier

Examples of org.conventionsframework.qualifier.Query



    @AroundInvoke
    public Object execute(InvocationContext ic) throws Exception{
        BaseService service = null;
        Query query = ic.getMethod().getAnnotation(Query.class);
        Class<? extends BaseService> serviceClass = query.service();
        if(!serviceClass.equals(BaseService.class)){
           service = (BaseService) BeanManagerController.getBeanByType(serviceClass);
        }
        javax.persistence.Query q = null;

        if(!"".equals(query.sql())){
             q = service.crud().getEntityManager().createQuery(query.sql());
        }
        else if(!"".equals(query.namedQuery())){
             q = service.crud().getEntityManager().createNamedQuery(query.namedQuery());
        }
       
        QueryParams params = ic.getMethod().getAnnotation(QueryParams.class);
        if(params != null){
            for (QueryParam queryParam : params.value()) {
View Full Code Here

TOP

Related Classes of org.conventionsframework.qualifier.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.