@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()) {