protected void addVariable(String name, Object value, QueryOperator operator, boolean processInstanceScope) { ensureNotNull(NotValidException.class, "name", name); if(value == null || isBoolean(value)) { // Null-values and booleans can only be used in EQUALS and NOT_EQUALS switch(operator) { case GREATER_THAN: throw new NotValidException("Booleans and null cannot be used in 'greater than' condition"); case LESS_THAN: throw new NotValidException("Booleans and null cannot be used in 'less than' condition"); case GREATER_THAN_OR_EQUAL: throw new NotValidException("Booleans and null cannot be used in 'greater than or equal' condition"); case LESS_THAN_OR_EQUAL: throw new NotValidException("Booleans and null cannot be used in 'less than or equal' condition"); case LIKE: throw new NotValidException("Booleans and null cannot be used in 'like' condition"); } } queryVariableValues.add(new QueryVariableValue(name, value, operator, processInstanceScope)); }
protected void addVariable(String name, Object value, QueryOperator operator, boolean processInstanceScope) { ensureNotNull(NotValidException.class, "name", name); if(value == null || isBoolean(value)) { // Null-values and booleans can only be used in EQUALS and NOT_EQUALS switch(operator) { case GREATER_THAN: throw new NotValidException("Booleans and null cannot be used in 'greater than' condition"); case LESS_THAN: throw new NotValidException("Booleans and null cannot be used in 'less than' condition"); case GREATER_THAN_OR_EQUAL: throw new NotValidException("Booleans and null cannot be used in 'greater than or equal' condition"); case LESS_THAN_OR_EQUAL: throw new NotValidException("Booleans and null cannot be used in 'less than or equal' condition"); case LIKE: throw new NotValidException("Booleans and null cannot be used in 'like' condition"); } } queryVariableValues.add(new QueryVariableValue(name, value, operator, processInstanceScope)); }
protected void addVariable(String name, Object value, QueryOperator operator, boolean processInstanceScope) { ensureNotNull(NotValidException.class, "name", name); if(value == null || isBoolean(value)) { // Null-values and booleans can only be used in EQUALS and NOT_EQUALS switch(operator) { case GREATER_THAN: throw new NotValidException("Booleans and null cannot be used in 'greater than' condition"); case LESS_THAN: throw new NotValidException("Booleans and null cannot be used in 'less than' condition"); case GREATER_THAN_OR_EQUAL: throw new NotValidException("Booleans and null cannot be used in 'greater than or equal' condition"); case LESS_THAN_OR_EQUAL: throw new NotValidException("Booleans and null cannot be used in 'less than or equal' condition"); case LIKE: throw new NotValidException("Booleans and null cannot be used in 'like' condition"); } } queryVariableValues.add(new QueryVariableValue(name, value, operator, processInstanceScope)); }