@Test public void parseJobParametersToStringTest() { final JobParameters jobParameters = new JobParametersBuilder().addLong("long", 1L).addString("String", "someString").toJobParameters(); final String result = DomainParameterParser.parseJobParametersToString(jobParameters); assertThat(result).isEqualTo("String(String)=someString,long(Long)=1"); }
public static String parseJobParametersToString(final JobParameters jobParameters) { final Map<String, JobParameter> jobParametersMap = jobParameters.getParameters(); final Map<String, Object> paramatersMap = new HashMap<>(); for (final Entry<String, JobParameter> entry : jobParametersMap.entrySet()) { paramatersMap.put(entry.getKey(), entry.getValue().getValue()); } return parseParameterMapToString(paramatersMap); }
DomainParameterParser { public static String parseJobParametersToString(final JobParameters jobParameters) { final Map<String, JobParameter> jobParametersMap = jobParameters.getParameters(); final Map<String, Object> paramatersMap = new HashMap<>(); for (final Entry<String, JobParameter> entry : jobParametersMap.entrySet()) { paramatersMap.put(entry.getKey(), entry.getValue().getValue()); } return parseParameterMapToString(paramatersMap); } }
DomainParameterParser { public static String parseJobParametersToString(final JobParameters jobParameters) { final Map<String, JobParameter> jobParametersMap = jobParameters.getParameters(); final Map<String, Object> paramatersMap = new HashMap<>(); for (final Entry<String, JobParameter> entry : jobParametersMap.entrySet()) { paramatersMap.put(entry.getKey(), entry.getValue().getValue()); } return parseParameterMapToString(paramatersMap); } private  DomainParameterParser(); }
DomainParameterParser { public static String parseJobParametersToString(final JobParameters jobParameters) { final Map<String, JobParameter> jobParametersMap = jobParameters.getParameters(); final Map<String, Object> paramatersMap = new HashMap<>(); for (final Entry<String, JobParameter> entry : jobParametersMap.entrySet()) { paramatersMap.put(entry.getKey(), entry.getValue().getValue()); } return parseParameterMapToString(paramatersMap); } private  DomainParameterParser(); static String parseParameterMapToString(final Map<String, Object> parametersMap); static void parseParameterEntryToString(final StringBuilder stringBuilder, final Entry<String, Object> entry); static JobParameters parseParametersToJobParameters(final String parameters); static Map<String, Object> parseParameters(final String parameters); static String parseJobParametersToString(final JobParameters jobParameters); static Entry<String, Object> generateParameterEntry(final String parameter); static Object createValueInstance(final String type, final String valueString); static Date parseDate(final String dateString); static String parseDate(final Date date); }
DomainParameterParser { public static String parseJobParametersToString(final JobParameters jobParameters) { final Map<String, JobParameter> jobParametersMap = jobParameters.getParameters(); final Map<String, Object> paramatersMap = new HashMap<>(); for (final Entry<String, JobParameter> entry : jobParametersMap.entrySet()) { paramatersMap.put(entry.getKey(), entry.getValue().getValue()); } return parseParameterMapToString(paramatersMap); } private  DomainParameterParser(); static String parseParameterMapToString(final Map<String, Object> parametersMap); static void parseParameterEntryToString(final StringBuilder stringBuilder, final Entry<String, Object> entry); static JobParameters parseParametersToJobParameters(final String parameters); static Map<String, Object> parseParameters(final String parameters); static String parseJobParametersToString(final JobParameters jobParameters); static Entry<String, Object> generateParameterEntry(final String parameter); static Object createValueInstance(final String type, final String valueString); static Date parseDate(final String dateString); static String parseDate(final Date date); static final String DATE_FORMAT_WITH_TIMESTAMP; static final String DATE_FORMAT; }