Package org.exoplatform.services.database.annotation

Examples of org.exoplatform.services.database.annotation.Query


      return builder.toString();
   }

   public <T extends DAO<?>> String getQuery(Class<T> clazz, String name) throws Exception
   {
      Query query = clazz.getAnnotation(Query.class);
      String value = null;
      if (query != null && query.name().equals(name))
         value = getQuery(query);
      if (value != null)
         return value;
      List<Method> list = ReflectionUtil.getMethod(clazz, name);
      for (Method method : list)
      {
         query = method.getAnnotation(Query.class);
         if (query != null && query.name().equals(name))
            value = getQuery(query);
         if (value != null)
            return value;
      }
      return null;
View Full Code Here


      return builder.toString();
   }

   public <T extends DAO> String getQuery(Class<T> clazz, String name) throws Exception
   {
      Query query = clazz.getAnnotation(Query.class);
      String value = null;
      if (query != null && query.name().equals(name))
         value = getQuery(query);
      if (value != null)
         return value;
      List<Method> list = ReflectionUtil.getMethod(clazz, name);
      for (Method method : list)
      {
         query = method.getAnnotation(Query.class);
         if (query != null && query.name().equals(name))
            value = getQuery(query);
         if (value != null)
            return value;
      }
      return null;
View Full Code Here

TOP

Related Classes of org.exoplatform.services.database.annotation.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.