@Test public void testConvertValueForDateField() { }
static void convertValueForDateField(QueryCondition condition) throws InvalidConditionException { Object value = condition.getValue(); if (value == null) { return; } if (value.getClass().isArray()) { Object[] elems = (Object[]) value; String[] dates = new String[elems.length]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else if (value instanceof Collection) { Collection<?> elems = (Collection<?>) value; String[] dates = new String[elems.size()]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else { condition.setValue(convertValueForDateField(value, condition)); } }
ConditionPreprocessor { static void convertValueForDateField(QueryCondition condition) throws InvalidConditionException { Object value = condition.getValue(); if (value == null) { return; } if (value.getClass().isArray()) { Object[] elems = (Object[]) value; String[] dates = new String[elems.length]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else if (value instanceof Collection) { Collection<?> elems = (Collection<?>) value; String[] dates = new String[elems.size()]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else { condition.setValue(convertValueForDateField(value, condition)); } } }
ConditionPreprocessor { static void convertValueForDateField(QueryCondition condition) throws InvalidConditionException { Object value = condition.getValue(); if (value == null) { return; } if (value.getClass().isArray()) { Object[] elems = (Object[]) value; String[] dates = new String[elems.length]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else if (value instanceof Collection) { Collection<?> elems = (Collection<?>) value; String[] dates = new String[elems.size()]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else { condition.setValue(convertValueForDateField(value, condition)); } } ConditionPreprocessor(QueryCondition condition, MappingInfo<?> mappingInfo); }
ConditionPreprocessor { static void convertValueForDateField(QueryCondition condition) throws InvalidConditionException { Object value = condition.getValue(); if (value == null) { return; } if (value.getClass().isArray()) { Object[] elems = (Object[]) value; String[] dates = new String[elems.length]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else if (value instanceof Collection) { Collection<?> elems = (Collection<?>) value; String[] dates = new String[elems.size()]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else { condition.setValue(convertValueForDateField(value, condition)); } } ConditionPreprocessor(QueryCondition condition, MappingInfo<?> mappingInfo);  }
ConditionPreprocessor { static void convertValueForDateField(QueryCondition condition) throws InvalidConditionException { Object value = condition.getValue(); if (value == null) { return; } if (value.getClass().isArray()) { Object[] elems = (Object[]) value; String[] dates = new String[elems.length]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else if (value instanceof Collection) { Collection<?> elems = (Collection<?>) value; String[] dates = new String[elems.size()]; int i = 0; for (Object elem : elems) { dates[i++] = convertValueForDateField(elem, condition); } condition.setValue(dates); } else { condition.setValue(convertValueForDateField(value, condition)); } } ConditionPreprocessor(QueryCondition condition, MappingInfo<?> mappingInfo);   }