Package org.springframework.batch.core

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


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

            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

            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 {
                parametersBuilder.addString(headerKey, headerValue.toString());
            }
View Full Code Here

            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

            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

        }
        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

    }
    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

        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

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

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.