Package com.skyline.energy.annotation

Examples of com.skyline.energy.annotation.Query


  private void init(Method method) throws DaoGenerateException {
    configUnique(method);

    configRowMapper(method);

    Query query = method.getAnnotation(Query.class);
    fetchSize = query.fetchSize();

    Map<String, Integer> paramIndexes = new HashMap<String, Integer>(8, 1f);

    Class<?>[] paramTypes = method.getParameterTypes();
    Annotation[][] annotations = method.getParameterAnnotations();
    for (int index = 0; index < annotations.length; index++) {
      if (CommonUtils.isTypePage(paramTypes[index])) {
        pageIndex = index;
        break;
      }
    }
   
    parseParameterAnnotations(annotations, paramIndexes, null, paramTypes);

    String sql = query.value();
    parseSql(sql, paramTypes, paramIndexes);
   
    parseShardBy(method, paramIndexes, paramTypes);
  }
View Full Code Here


  private JdbcQueryDefinition queryDefinition;
  private JdbcUpdateDefinition updateDefinition;
  private JdbcBatchUpdateDefinition batchUpdateDefinition;

  public JdbcDefinitionCollection(Method method) throws DaoGenerateException {
    Query query = method.getAnnotation(Query.class);
    if (query != null) {
      queryDefinition = new JdbcQueryDefinition(method);
    }

    Update update = method.getAnnotation(Update.class);
View Full Code Here

TOP

Related Classes of com.skyline.energy.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.