@Test public void shouldIgnoreNullBounds() { RangeProperty<Integer> rangeProperty = new RangeProperty<>("rangeProp", new Range<>(null, 10), Integer.class.getName()); assertEquals("rangeProp<=param0ub", rangeProperty.asFilter(0)); assertEquals("java.lang.Integer param0ub", rangeProperty.asDeclareParameter(0)); assertEquals(Arrays.asList(10), rangeProperty.unwrap()); rangeProperty = new RangeProperty<>("rangeProp", new Range<>(10, null), Integer.class.getName()); assertEquals("rangeProp>=param0lb", rangeProperty.asFilter(0)); assertEquals("java.lang.Integer param0lb", rangeProperty.asDeclareParameter(0)); assertEquals(Arrays.asList(10), rangeProperty.unwrap()); }
@Override public Collection unwrap() { if (shouldIgnoreThisProperty()) { return null; } else { ArrayList list = new ArrayList(); if (getValue().getMin() != null) { list.add(getValue().getMin()); } if (getValue().getMax() != null) { list.add(getValue().getMax()); } return list; } }
RangeProperty extends Property<Range<T>> { @Override public Collection unwrap() { if (shouldIgnoreThisProperty()) { return null; } else { ArrayList list = new ArrayList(); if (getValue().getMin() != null) { list.add(getValue().getMin()); } if (getValue().getMax() != null) { list.add(getValue().getMax()); } return list; } } }
RangeProperty extends Property<Range<T>> { @Override public Collection unwrap() { if (shouldIgnoreThisProperty()) { return null; } else { ArrayList list = new ArrayList(); if (getValue().getMin() != null) { list.add(getValue().getMin()); } if (getValue().getMax() != null) { list.add(getValue().getMax()); } return list; } } RangeProperty(String name, Range<T> value, String type);  RangeProperty(String jdoVariableName, String name, Range<T> value, String type); }
RangeProperty extends Property<Range<T>> { @Override public Collection unwrap() { if (shouldIgnoreThisProperty()) { return null; } else { ArrayList list = new ArrayList(); if (getValue().getMin() != null) { list.add(getValue().getMin()); } if (getValue().getMax() != null) { list.add(getValue().getMax()); } return list; } } RangeProperty(String name, Range<T> value, String type);  RangeProperty(String jdoVariableName, String name, Range<T> value, String type); @Override CharSequence generateFilter(int idx); CharSequence generateFilterForRelation(int idx); @Override CharSequence generateDeclareParameter(int idx); @Override Collection unwrap(); }
RangeProperty extends Property<Range<T>> { @Override public Collection unwrap() { if (shouldIgnoreThisProperty()) { return null; } else { ArrayList list = new ArrayList(); if (getValue().getMin() != null) { list.add(getValue().getMin()); } if (getValue().getMax() != null) { list.add(getValue().getMax()); } return list; } } RangeProperty(String name, Range<T> value, String type);  RangeProperty(String jdoVariableName, String name, Range<T> value, String type); @Override CharSequence generateFilter(int idx); CharSequence generateFilterForRelation(int idx); @Override CharSequence generateDeclareParameter(int idx); @Override Collection unwrap();  }