if (targetStreamNum == parameterStreamNum) {
return;
}
ExprIdentNode targetStartExpr = getExprNode(typesPerStream, targetStreamNum, targetStartProp);
ExprIdentNode targetEndExpr = getExprNode(typesPerStream, targetStreamNum, targetEndProp);
ExprIdentNode parameterStartExpr = getExprNode(typesPerStream, parameterStreamNum, parameterStartProp);
ExprIdentNode parameterEndExpr = getExprNode(typesPerStream, parameterStreamNum, parameterEndProp);
if (targetStartExpr.getExprEvaluator().getType() != parameterStartExpr.getExprEvaluator().getType()) {
return;
}
if (currentMethod == DatetimeMethodEnum.BEFORE) {
// a.end < b.start
queryGraph.addRelationalOpStrict(targetStreamNum, targetEndProp, targetEndExpr,
parameterStreamNum, parameterStartProp, parameterStartExpr,
RelationalOpEnum.LT);
}
else if (currentMethod == DatetimeMethodEnum.AFTER) {
// a.start > b.end
queryGraph.addRelationalOpStrict(targetStreamNum, targetStartProp, targetStartExpr,
parameterStreamNum, parameterEndProp, parameterEndExpr,
RelationalOpEnum.GT);
}
else if (currentMethod == DatetimeMethodEnum.COINCIDES) {
// a.startTimestamp = b.startTimestamp and a.endTimestamp = b.endTimestamp
queryGraph.addStrictEquals(targetStreamNum, targetStartProp, targetStartExpr,
parameterStreamNum, parameterStartProp, parameterStartExpr);
boolean noDuration = parameterEndProp.equals(parameterStartProp) && targetEndProp.equals(targetStartProp);
if (!noDuration) {
ExprIdentNode leftEndExpr = getExprNode(typesPerStream, targetStreamNum, targetEndProp);
ExprIdentNode rightEndExpr = getExprNode(typesPerStream, parameterStreamNum, parameterEndProp);
queryGraph.addStrictEquals(targetStreamNum, targetEndProp, leftEndExpr,
parameterStreamNum, parameterEndProp, rightEndExpr);
}
}
else if (currentMethod == DatetimeMethodEnum.DURING || currentMethod == DatetimeMethodEnum.INCLUDES) {