if (stateObject.isDecorated()) {
toText(stateObject);
}
else {
BetweenExpression expression = stateObject.getExpression();
// Expression
if (stateObject.hasStateObject()) {
stateObject.getStateObject().accept(this);
writer.append(SPACE);
}
// 'NOT
if (stateObject.hasNot()) {
appendIdentifier((expression != null) ? expression.getActualNotIdentifier() : NOT, NOT);
writer.append(SPACE);
}
// 'BETWEEN'
appendIdentifier((expression != null) ? expression.getActualBetweenIdentifier() : BETWEEN, BETWEEN);
if (shouldOutput(expression) || expression.hasSpaceAfterBetween()) {
writer.append(SPACE);
}
// Lower bound expression
if (stateObject.hasLowerBound()) {
stateObject.getLowerBound().accept(this);
}
if (shouldOutput(expression) || expression.hasSpaceAfterLowerBound()) {
writer.append(SPACE);
}
// 'AND'
if (shouldOutput(expression) || expression.hasAnd()) {
appendIdentifier((expression != null) ? expression.getActualAndIdentifier() : AND, AND);
}
if (shouldOutput(expression) || expression.hasSpaceAfterAnd()) {
writer.append(SPACE);
}
// Upper bound expression
if (stateObject.hasUpperBound()) {