* @param inclusive <code>true</code> to make inclusive query
* @return the value to query
* @throws DiscoveryException if the supplied value cannot be converted
*/
private String makeValueToQuery(String value, boolean isLowerBoundary, boolean isUpperBoundary, boolean inclusive) {
DateProxy proxy = new DateProxy();
proxy.setDate(value);
if (!proxy.getIsValid()) {
throw new IllegalArgumentException("Invalid Timestamp: " + value
+ ", use for yyyy-mm-dd hh:mm:ss.fff");
}
Timestamp tsValue = null;
if (isLowerBoundary) {
tsValue = inclusive ? proxy.asFromTimestamp() : proxy.asFromTimestampExcl();
} else if (isUpperBoundary) {
tsValue = inclusive ? proxy.asToTimestamp() : proxy.asToTimestampExcl();
} else {
tsValue = inclusive ? proxy.asFromTimestamp() : proxy.asFromTimestampExcl();
}
if (tsValue == null) {
return null;
}