public DateRangeParam setLowerBound(DateParam theLowerBound) { validateAndSet(theLowerBound, myUpperBound); return this; }
/** * Sets the range from a pair of dates, inclusive on both ends * * @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. * @param theUpperBound A qualified date param representing the upper date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. */ public void setRangeFromDatesInclusive(DateParam theLowerBound, DateParam theUpperBound) { validateAndSet(theLowerBound, theUpperBound); }
public DateRangeParam setUpperBound(DateParam theUpperBound) { validateAndSet(myLowerBound, theUpperBound); return this; }
/** * Sets the lower bound to be greaterthan or equal to the given date */ public DateRangeParam setLowerBoundInclusive(Date theLowerBound) { validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN_OR_EQUALS, theLowerBound), myUpperBound); return this; }
/** * Sets the upper bound to be greaterthan or equal to the given date */ public DateRangeParam setUpperBoundInclusive(Date theUpperBound) { validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN_OR_EQUALS, theUpperBound)); return this; }
/** * Sets the lower bound to be greaterthan to the given date */ public DateRangeParam setLowerBoundExclusive(Date theLowerBound) { validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN, theLowerBound), myUpperBound); return this; }
/** * Sets the upper bound to be greaterthan to the given date */ public DateRangeParam setUpperBoundExclusive(Date theUpperBound) { validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN, theUpperBound)); return this; }
/** * Sets the range from a pair of dates, inclusive on both ends * * @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. * @param theUpperBound A qualified date param representing the upper date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. */ public void setRangeFromDatesInclusive(Date theLowerBound, Date theUpperBound) { DateParam lowerBound = theLowerBound != null ? new DateParam(GREATERTHAN_OR_EQUALS, theLowerBound) : null; DateParam upperBound = theUpperBound != null ? new DateParam(LESSTHAN_OR_EQUALS, theUpperBound) : null; validateAndSet(lowerBound, upperBound); }
/** * Sets the range from a pair of dates, inclusive on both ends * * @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. * @param theUpperBound A qualified date param representing the upper date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. */ public void setRangeFromDatesInclusive(String theLowerBound, String theUpperBound) { DateParam lowerBound = theLowerBound != null ? new DateParam(GREATERTHAN_OR_EQUALS, theLowerBound) : null; DateParam upperBound = theUpperBound != null ? new DateParam(LESSTHAN_OR_EQUALS, theUpperBound) : null; if (isNotBlank(theLowerBound) && isNotBlank(theUpperBound) && theLowerBound.equals(theUpperBound)) { lowerBound.setPrefix(EQUAL); upperBound.setPrefix(EQUAL); } validateAndSet(lowerBound, upperBound); }
/** * Sets the range from a pair of dates, inclusive on both ends. Note that if * theLowerBound is after theUpperBound, thie method will automatically reverse * the order of the arguments in order to create an inclusive range. * * @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. * @param theUpperBound A qualified date param representing the upper date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. */ public void setRangeFromDatesInclusive(IPrimitiveType<Date> theLowerBound, IPrimitiveType<Date> theUpperBound) { IPrimitiveType<Date> lowerBound = theLowerBound; IPrimitiveType<Date> upperBound = theUpperBound; if (lowerBound != null && lowerBound.getValue() != null && upperBound != null && upperBound.getValue() != null) { if (lowerBound.getValue().after(upperBound.getValue())) { IPrimitiveType<Date> temp = lowerBound; lowerBound = upperBound; upperBound = temp; } } validateAndSet( lowerBound != null ? new DateParam(GREATERTHAN_OR_EQUALS, lowerBound) : null, upperBound != null ? new DateParam(LESSTHAN_OR_EQUALS, upperBound) : null); }
case GREATERTHAN: case GREATERTHAN_OR_EQUALS: validateAndSet(theDateParam, null); break; case ENDS_BEFORE: case LESSTHAN: case LESSTHAN_OR_EQUALS: validateAndSet(null, theDateParam); break; default:
public DateRangeParam setUpperBound(DateParam theUpperBound) { validateAndSet(myLowerBound, theUpperBound); return this; }
/** * Sets the range from a pair of dates, inclusive on both ends * * @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. * @param theUpperBound A qualified date param representing the upper date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. */ public void setRangeFromDatesInclusive(DateParam theLowerBound, DateParam theUpperBound) { validateAndSet(theLowerBound, theUpperBound); }
public DateRangeParam setLowerBound(DateParam theLowerBound) { validateAndSet(theLowerBound, myUpperBound); return this; }
/** * Sets the upper bound to be greaterthan or equal to the given date */ public DateRangeParam setUpperBoundInclusive(Date theUpperBound) { validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN_OR_EQUALS, theUpperBound)); return this; }
/** * Sets the lower bound to be greaterthan or equal to the given date */ public DateRangeParam setLowerBoundInclusive(Date theLowerBound) { validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN_OR_EQUALS, theLowerBound), myUpperBound); return this; }
/** * Sets the upper bound to be greaterthan to the given date */ public DateRangeParam setUpperBoundExclusive(Date theUpperBound) { validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN, theUpperBound)); return this; }
/** * Sets the lower bound to be greaterthan to the given date */ public DateRangeParam setLowerBoundExclusive(Date theLowerBound) { validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN, theLowerBound), myUpperBound); return this; }
/** * Sets the range from a pair of dates, inclusive on both ends * * @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. * @param theUpperBound A qualified date param representing the upper date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. */ public void setRangeFromDatesInclusive(Date theLowerBound, Date theUpperBound) { DateParam lowerBound = theLowerBound != null ? new DateParam(GREATERTHAN_OR_EQUALS, theLowerBound) : null; DateParam upperBound = theUpperBound != null ? new DateParam(LESSTHAN_OR_EQUALS, theUpperBound) : null; validateAndSet(lowerBound, upperBound); }
/** * Sets the range from a pair of dates, inclusive on both ends. Note that if * theLowerBound is after theUpperBound, thie method will automatically reverse * the order of the arguments in order to create an inclusive range. * * @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. * @param theUpperBound A qualified date param representing the upper date bound (optionally may include time), e.g. * "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or * theUpperBound may both be populated, or one may be null, but it is not valid for both to be null. */ public void setRangeFromDatesInclusive(IPrimitiveType<Date> theLowerBound, IPrimitiveType<Date> theUpperBound) { IPrimitiveType<Date> lowerBound = theLowerBound; IPrimitiveType<Date> upperBound = theUpperBound; if (lowerBound != null && lowerBound.getValue() != null && upperBound != null && upperBound.getValue() != null) { if (lowerBound.getValue().after(upperBound.getValue())) { IPrimitiveType<Date> temp = lowerBound; lowerBound = upperBound; upperBound = temp; } } validateAndSet( lowerBound != null ? new DateParam(GREATERTHAN_OR_EQUALS, lowerBound) : null, upperBound != null ? new DateParam(LESSTHAN_OR_EQUALS, upperBound) : null); }