test_class.declarator: routeService = new RouteService()
test_class.modifier: private
test_class.original_string: private RouteService routeService = new RouteService();
test_class.type: RouteService
test_class.var_name: routeService
test_class.file: baymax-core/src/test/java/com/tongbanjie/baymax/router/RouteServiceTest.java
test_class.identifier: RouteServiceTest
test_class.interfaces: implements SelectTestSql
test_case.body: @Test
      public void testBuildParameters() throws Exception {
          Map<Integer, ParameterCommand> commonds = new HashMap<Integer, ParameterCommand>();
          commonds.put(3, new ParameterCommand(ParameterMethod.setInt, new Object[]{3}, 3));
          commonds.put(1, new ParameterCommand(ParameterMethod.setInt, new Object[]{1}, 1));
          commonds.put(2, new ParameterCommand(ParameterMethod.setInt, new Object[]{2}, 2));
          List<Object> result = routeService.buildParameters(commonds);
          System.out.println(result);
          Assert.assertEquals(3, result.size());
  
          Assert.assertEquals(1, result.get(0));
          Assert.assertEquals(2, result.get(1));
          Assert.assertEquals(3, result.get(2));
      }
test_case.class_method_signature: RouteServiceTest.testBuildParameters()
test_case.full_signature: @Test public void testBuildParameters()
test_case.identifier: testBuildParameters
test_case.invocations: put put put buildParameters println assertEquals size assertEquals get assertEquals get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBuildParameters()
focal_class.declarator: logger = LoggerFactory.getLogger(RouteService.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(RouteService.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: baymax-core/src/main/java/com/tongbanjie/baymax/router/RouteService.java
focal_class.identifier: RouteService
focal_class.interfaces: implements IRouteService
focal_class.class_method_signature: RouteService.doRoute(String sql, Map<Integer, ParameterCommand> parameterCommand)
focal_class.full_signature: public ExecutePlan doRoute(String sql, Map<Integer, ParameterCommand> parameterCommand)
focal_class.identifier: doRoute
focal_class.modifiers: public
focal_class.parameters: (String sql, Map<Integer, ParameterCommand> parameterCommand)
focal_class.return: ExecutePlan
focal_class.signature: ExecutePlan doRoute(String sql, Map<Integer, ParameterCommand> parameterCommand)
focal_class.class_method_signature: RouteService.route(List<String> tables, List<CalculateUnit> units, String sql, SqlType sqlType)
focal_class.full_signature: public ExecutePlan route(List<String> tables, List<CalculateUnit> units, String sql, SqlType sqlType)
focal_class.identifier: route
focal_class.modifiers: public
focal_class.parameters: (List<String> tables, List<CalculateUnit> units, String sql, SqlType sqlType)
focal_class.return: ExecutePlan
focal_class.signature: ExecutePlan route(List<String> tables, List<CalculateUnit> units, String sql, SqlType sqlType)
focal_class.class_method_signature: RouteService.buildExecutePlanTypeNo(String sql, String tableName, SqlType sqlType)
focal_class.full_signature: private ExecutePlan buildExecutePlanTypeNo(String sql, String tableName, SqlType sqlType)
focal_class.identifier: buildExecutePlanTypeNo
focal_class.modifiers: private
focal_class.parameters: (String sql, String tableName, SqlType sqlType)
focal_class.return: ExecutePlan
focal_class.signature: ExecutePlan buildExecutePlanTypeNo(String sql, String tableName, SqlType sqlType)
focal_class.class_method_signature: RouteService.buildExecutePlanTypeAll(PartitionTable partitionTable, SqlType sqlType)
focal_class.full_signature: private ExecutePlan buildExecutePlanTypeAll(PartitionTable partitionTable, SqlType sqlType)
focal_class.identifier: buildExecutePlanTypeAll
focal_class.modifiers: private
focal_class.parameters: (PartitionTable partitionTable, SqlType sqlType)
focal_class.return: ExecutePlan
focal_class.signature: ExecutePlan buildExecutePlanTypeAll(PartitionTable partitionTable, SqlType sqlType)
focal_class.class_method_signature: RouteService.buildExecutePlanTypePartition(PartitionTable partitionTable, SqlType sqlType, Set<TargetTableEntity> nodeSet)
focal_class.full_signature: private ExecutePlan buildExecutePlanTypePartition(PartitionTable partitionTable, SqlType sqlType, Set<TargetTableEntity> nodeSet)
focal_class.identifier: buildExecutePlanTypePartition
focal_class.modifiers: private
focal_class.parameters: (PartitionTable partitionTable, SqlType sqlType, Set<TargetTableEntity> nodeSet)
focal_class.return: ExecutePlan
focal_class.signature: ExecutePlan buildExecutePlanTypePartition(PartitionTable partitionTable, SqlType sqlType, Set<TargetTableEntity> nodeSet)
focal_class.class_method_signature: RouteService.buildParameters(Map<Integer, ParameterCommand> commonds)
focal_class.full_signature: public List<Object> buildParameters(Map<Integer, ParameterCommand> commonds)
focal_class.identifier: buildParameters
focal_class.modifiers: public
focal_class.parameters: (Map<Integer, ParameterCommand> commonds)
focal_class.return: List<Object>
focal_class.signature: List<Object> buildParameters(Map<Integer, ParameterCommand> commonds)
focal_method.body: public List<Object> buildParameters(Map<Integer, ParameterCommand> commonds){
  
          if (commonds == null || commonds.size() == 0){
              return null;
          }
  
          // 排序
          SortedSet<Map.Entry<Integer, ParameterCommand>> set = new TreeSet<Map.Entry<Integer, ParameterCommand>>(new Comparator<Map.Entry<Integer, ParameterCommand>>() {
              @Override
              public int compare(Map.Entry<Integer, ParameterCommand> e1, Map.Entry<Integer, ParameterCommand> e2) {
                  return e1.getKey().compareTo(e2.getKey());
              }
          });
  
          for (Map.Entry entry : commonds.entrySet()){
              set.add(entry);
          }
  
          List<Object> result = new ArrayList<Object>(commonds.size());
          for (Map.Entry<Integer, ParameterCommand> entry : set){
              result.add(entry.getValue().getParttionArg());
          }
  
          return result;
      }
focal_method.class_method_signature: RouteService.buildParameters(Map<Integer, ParameterCommand> commonds)
focal_method.full_signature: public List<Object> buildParameters(Map<Integer, ParameterCommand> commonds)
focal_method.identifier: buildParameters
focal_method.invocations: size compareTo getKey getKey entrySet add size add getParttionArg getValue
focal_method.modifiers: public
focal_method.parameters: (Map<Integer, ParameterCommand> commonds)
focal_method.return: List<Object>
focal_method.signature: List<Object> buildParameters(Map<Integer, ParameterCommand> commonds)