Examples of addLong()


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

            String headerKey = headerEntry.getKey();
            Object headerValue = headerEntry.getValue();
            if (headerValue instanceof Date) {
                parametersBuilder.addDate(headerKey, (Date) headerValue);
            } else if (headerValue instanceof Long) {
                parametersBuilder.addLong(headerKey, (Long) headerValue);
            } else if (headerValue instanceof Double) {
                parametersBuilder.addDouble(headerKey, (Double) headerValue);
            } else if (headerValue != null) {
                parametersBuilder.addString(headerKey, headerValue.toString());
            } else {
View Full Code Here

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

        }
        catch (ClassCastException ex) {
          throw new IllegalArgumentException("Number format is invalid for long value: [" + value
              + "], use a format with no decimal places");
        }
        propertiesBuilder.addLong(StringUtils.replace(key, LONG_TYPE, ""), result, identifying);
      }
      else if (key.endsWith(DOUBLE_TYPE)) {
        Double result = parseNumber(value).doubleValue();
        propertiesBuilder.addDouble(StringUtils.replace(key, DOUBLE_TYPE, ""), result, identifying);
      }
View Full Code Here

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

    }
    for (String key : keys) {
      if (key.endsWith("(long)")) {
        key = key.replace("(long)", "");
        if (executionContext.containsKey(key)) {
          builder.addLong(key, executionContext.getLong(key));
        }
        else if (jobParameters.containsKey(key)) {
          builder.addLong(key, (Long) jobParameters.get(key).getValue());
        }
      }
View Full Code Here

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

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

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

        }
      }
      else if (key.endsWith("(int)")) {
        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());
        }
      }
View Full Code Here

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

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

      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

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

    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

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

        }
      }
    }

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

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

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

      }
      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.