private Field findSqlMapExecutorDelegate(SqlMapClient sqlMapClient) {
   Class<?> searchType = sqlMapClient.getClass();
   while (!Object.class.equals(searchType) && searchType != null) {
     Field[] fields = searchType.getDeclaredFields();
     for (Field field : fields) {
       if (SqlMapExecutorDelegate.class.isAssignableFrom(field.getType())) return field;
     }
     searchType = searchType.getSuperclass();
   }
   return null;
 }
 private QueryMethod chooseQueryMethodStrategy(
     Method method, RepositoryMetadata metadata, Class<?> repositoryInterface) {
   QueryMethod queryMethod;
   boolean paramAnnotation = false;
   if ((paramAnnotation = hasParamAnnotation(method))
       || repositoryInterface.isAnnotationPresent(Namespace.class)
       || method.isAnnotationPresent(Statement.class)) {
     queryMethod = new AnnotationBasedSqlMapQueryMethod(method, metadata, paramAnnotation);
   } else {
     queryMethod = new QueryMethod(method, metadata);
   }
   return queryMethod;
 }