Ejemplo n.º 1
0
  public static final int getMethodType(String description) {
    for (int i = 0; i < methodDescriptions.length; i++) {
      if (methodDescriptions[i].equalsIgnoreCase(description)) {
        return i;
      }
    }

    for (int i = 0; i < methodCodes.length; i++) {
      if (methodCodes[i].equalsIgnoreCase(description)) return i;
    }

    if (StepLoader.getPartitioner(description) != null) {
      return PARTITIONING_METHOD_SPECIAL;
    }
    return PARTITIONING_METHOD_NONE;
  }
Ejemplo n.º 2
0
 public void createPartitioner(String method) {
   methodType = getMethodType(method);
   switch (methodType) {
     case PARTITIONING_METHOD_SPECIAL:
       {
         partitioner = StepLoader.getPartitioner(method).getInstance();
         break;
       }
     case PARTITIONING_METHOD_NONE:
     default:
       partitioner = null;
   }
   if (partitioner != null) {
     partitioner.setMeta(this);
   }
 }
Ejemplo n.º 3
0
  public static final String getMethod(String description) {
    if (Const.isEmpty(description)) return methodCodes[PARTITIONING_METHOD_NONE];

    for (int i = 0; i < methodDescriptions.length; i++) {
      if (methodDescriptions[i].equalsIgnoreCase(description)) {
        return methodCodes[i];
      }
    }

    for (int i = 0; i < methodCodes.length; i++) {
      if (methodCodes[i].equalsIgnoreCase(description)) return methodCodes[i];
    }

    if (StepLoader.getPartitioner(description) != null) {
      return description;
    }
    return methodCodes[PARTITIONING_METHOD_NONE];
  }