String[] leftOperandElements;
logger.debug("IN");
try {
IConditionalOperator conditionalOperator = null;
conditionalOperator = (IConditionalOperator)JPQLStatementConditionalOperators.getOperator( whereField.getOperator() );
Assert.assertNotNull(conditionalOperator, "Unsopported operator " + whereField.getOperator() + " used in query definition");
if(whereField.getLeftOperand().values[0].contains("expression")){
whereClauseElement = buildInLineCalculatedFieldClause(whereField.getOperator(), whereField.getLeftOperand(), whereField.isPromptable(), whereField.getRightOperand(), query, entityAliasesMaps, conditionalOperator);
}else{
leftOperandElements = buildOperand(whereField.getLeftOperand(), query, entityAliasesMaps);
if (OPERAND_TYPE_STATIC.equalsIgnoreCase(whereField.getRightOperand().type)
&& whereField.isPromptable()) {
// get last value first (the last value edited by the user)
rightOperandElements = whereField.getRightOperand().lastValues;
} else {
rightOperandElements = buildOperand(whereField.getRightOperand(), query, entityAliasesMaps);
}
if (OPERAND_TYPE_STATIC.equalsIgnoreCase(whereField.getLeftOperand().type) ) {
leftOperandElements = getTypeBoundedStaticOperand(whereField.getRightOperand(), whereField.getOperator(), leftOperandElements);
}
if (OPERAND_TYPE_STATIC.equalsIgnoreCase(whereField.getRightOperand().type) ) {
rightOperandElements = getTypeBoundedStaticOperand(whereField.getLeftOperand(), whereField.getOperator(), rightOperandElements);
}
whereClauseElement = conditionalOperator.apply(leftOperandElements[0], rightOperandElements);
}
logger.debug("where element value [" + whereClauseElement + "]");
} finally {
logger.debug("OUT");