private Before buildBeforePredicate()
throws CQLException {
Before filter = null;
// analyzes if the last build is period or date
Result node = this.builder.peekResult();
switch (node.getNodeType()) {
case JJTDATETIME_NODE:
filter = this.builder.buildBeforeDate();
break;
case JJTPERIOD_BETWEEN_DATES_NODE:
case JJTPERIOD_WITH_DATE_DURATION_NODE:
case JJTPERIOD_WITH_DURATION_DATE_NODE:
filter = this.builder.buildBeforePeriod();
break;
default:
throw new CQLException(
"unexpeted date time expression in temporal predicate.",
node.getToken(), this.source);
}
return filter;
}