Package org.jeecgframework.minidao.annotation

Examples of org.jeecgframework.minidao.annotation.Arguments


    String templateSql = null;
    //如果方法参数大于1个的话,方法必须使用注释标签Arguments
    boolean arguments_flag = method.isAnnotationPresent(Arguments.class);
    if(arguments_flag){
      //[1].获取方法的参数标签
      Arguments arguments = method.getAnnotation(Arguments.class)
            logger.debug("@Arguments------------------------------------------"+Arrays.toString(arguments.value()));
            if(arguments.value().length > args.length){
              //校验机制-如果注释标签参数数目大于方法的参数,则抛出异常
              throw new Exception("[注释标签]参数数目,不能大于[方法参数]参数数目");
            }
            // step.2.将args转换成键值对,封装成Map对象
            int args_num = 0;
            for(String v:arguments.value()){
              // update-begin--Author:fancq  Date:20140102 for:支持多数据分页
              if (v.equalsIgnoreCase("page")) {
                pageSetting.setPage(Integer.parseInt(args[args_num].toString()));
              }
              if (v.equalsIgnoreCase("rows")) {
View Full Code Here

TOP

Related Classes of org.jeecgframework.minidao.annotation.Arguments

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.