Package org.springframework.batch.core

Examples of org.springframework.batch.core.JobParametersBuilder.addLong()


        key = key.replace("(int)", "");
        if (executionContext.containsKey(key)) {
          builder.addLong(key, (long) executionContext.getInt(key));
        }
        else if (jobParameters.containsKey(key)) {
          builder.addLong(key, (Long) jobParameters.get(key).getValue());
        }
      }
      else if (key.endsWith("(double)")) {
        key = key.replace("(double)", "");
        if (executionContext.containsKey(key)) {
View Full Code Here


      if (value instanceof String) {
        builder.addString(key, (String) value);
      } else if (value instanceof Float || value instanceof Double) {
        builder.addDouble(key, (Double) value);
      } else if (value instanceof Integer || value instanceof Long) {
        builder.addLong(key, (Long) value);
      } else if (value instanceof Date) {
        builder.addDate(key, (Date) value);
      } else {
        logger.debug("JobDataMap contains values which are not job parameters (ignoring).");
      }
View Full Code Here

    if(properties != null) {
      for (Map.Entry<Object, Object> curParameter : properties.entrySet()) {
        if(curParameter.getValue() != null) {
          if(curParameter.getKey().equals(JOB_RUN_ID)) {
            runIdFound = true;
            builder.addLong(curParameter.getKey().toString(), Long.valueOf((String) curParameter.getValue()), true);
          } else {
            builder.addString(curParameter.getKey().toString(), curParameter.getValue().toString(), false);
          }
        }
      }
View Full Code Here

        }
      }
    }

    if(!runIdFound) {
      builder.addLong(JOB_RUN_ID, incremeter.nextLongValue());
    }

    return builder.toJobParameters();
  }
View Full Code Here

      }
      else if (value instanceof Float || value instanceof Double) {
        builder.addDouble(key, ((Number) value).doubleValue());
      }
      else if (value instanceof Integer || value instanceof Long) {
        builder.addLong(key, ((Number)value).longValue());
      }
      else if (value instanceof Date) {
        builder.addDate(key, (Date) value);
      }
      else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.