MethodSignature ms = (MethodSignature)pjp.getSignature();
Query query = ms.getMethod().getAnnotation(Query.class);
NamedQuery namedQuery = ms.getMethod().getAnnotation(NamedQuery.class);
DynamicQuery dynamicQuery = ms.getMethod().getAnnotation(DynamicQuery.class);
NativeQuery nativeQuery = ms.getMethod().getAnnotation(NativeQuery.class);
NativeUpdate nativeUpdate = ms.getMethod().getAnnotation(NativeUpdate.class);
if(namedQuery !=null){
return namedQueryHandler.handleNamedQuery(namedQuery, pjp);
}else if(query != null){
return queryHandler.handleQuery(query,pjp);