Package org.apache.ibatis.builder.xml.dynamic

Examples of org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource


      sql.append(" ");
    }
    ArrayList<SqlNode> contents = new ArrayList<SqlNode>();
    contents.add(new TextSqlNode(sql.toString()));
    MixedSqlNode rootSqlNode = new MixedSqlNode(contents);
    return new DynamicSqlSource(configuration, rootSqlNode);
  }
View Full Code Here


          sql.append(" ");
        }
        ArrayList<SqlNode> contents = new ArrayList<SqlNode>();
        contents.add(new TextSqlNode(sql.toString()));
        MixedSqlNode rootSqlNode = new MixedSqlNode(contents);
        return new DynamicSqlSource(configuration, rootSqlNode);
      } else if (sqlProviderAnnotationType != null) {
        Annotation sqlProviderAnnotation = method.getAnnotation(sqlProviderAnnotationType);
        return new ProviderSqlSource(assistant.getConfiguration(), sqlProviderAnnotation);
      }
      return null;
View Full Code Here

          sql.append(" ");
        }
        ArrayList<SqlNode> contents = new ArrayList<SqlNode>();
        contents.add(new TextSqlNode(sql.toString()));
        MixedSqlNode rootSqlNode = new MixedSqlNode(contents);
        return new DynamicSqlSource(configuration, rootSqlNode);
      } else if (sqlProviderAnnotationType != null) {
        Annotation sqlProviderAnnotation = method.getAnnotation(sqlProviderAnnotationType);
        return new ProviderSqlSource(assistant.getConfiguration(), sqlProviderAnnotation);
      }
      return null;
View Full Code Here

      sql.append(" ");
    }
    ArrayList<SqlNode> contents = new ArrayList<SqlNode>();
    contents.add(new TextSqlNode(sql.toString()));
    MixedSqlNode rootSqlNode = new MixedSqlNode(contents);
    return new DynamicSqlSource(configuration, rootSqlNode);
  }
View Full Code Here

            add(rm);
          }
        })
        .build();
    config.addMappedStatement(kms);
    MappedStatement ms = new MappedStatement.Builder(config, "insertAuthor", new DynamicSqlSource(config, new TextSqlNode("INSERT INTO author (id,username,password,email,bio,favourite_section) values(#{id},#{username},#{password},#{email},#{bio:VARCHAR},#{favouriteSection})")), SqlCommandType.INSERT)
        .parameterMap(
            new ParameterMap.Builder(config, "defaultParameterMap", Author.class, new ArrayList<ParameterMapping>() {
              {
                add(new ParameterMapping.Builder(config, "id", registry.getTypeHandler(Integer.class)).build());
                add(new ParameterMapping.Builder(config, "username", registry.getTypeHandler(String.class)).build());
View Full Code Here

TOP

Related Classes of org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource

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.