private String getBetweenBoundaryValues ( Expression boundExpression ) { if ( boundExpression instanceof IdentificationVariable || boundExpression instanceof NumericLiteral || boundExpression instanceof InputParameter ) { Object value = ( boundExpression instanceof InputParameter ) ? kunderaQuery . getParametersMap ( ) . get ( ( boundExpression ) . toParsedText ( ) ) : boundExpression . toParsedText ( ) ; return value . toString ( ) ; } else if ( boundExpression instanceof AdditionExpression ) { String leftValue = checkInputParameter ( ( ( AdditionExpression ) boundExpression ) . getLeftExpression ( ) ) ; String rightValue = checkInputParameter ( ( ( AdditionExpression ) boundExpression ) . getRightExpression ( ) ) ; return new Integer ( Integer . parseInt ( leftValue ) + Integer . parseInt ( rightValue ) ) . toString ( ) ; } else if ( boundExpression instanceof SubtractionExpression ) { String leftValue = checkInputParameter ( ( ( SubtractionExpression ) boundExpression ) . getLeftExpression ( ) ) ; String rightValue = checkInputParameter ( ( ( SubtractionExpression ) boundExpression ) . getRightExpression ( ) ) ; return new Integer ( Integer . parseInt ( leftValue ) - Integer . parseInt ( rightValue ) ) . toString ( ) ; } else if ( boundExpression instanceof MultiplicationExpression ) { String leftValue = checkInputParameter ( ( ( MultiplicationExpression ) boundExpression ) . getLeftExpression ( ) ) ; String rightValue = checkInputParameter ( ( ( MultiplicationExpression ) boundExpression ) . getRightExpression ( ) ) ; return new Integer ( Integer . parseInt ( leftValue ) * Integer . parseInt ( rightValue ) ) . toString ( ) ; } else if ( boundExpression instanceof DivisionExpression ) { String leftValue = checkInputParameter ( ( ( DivisionExpression ) boundExpression ) . getLeftExpression ( ) ) ; String rightValue = checkInputParameter ( ( ( DivisionExpression ) boundExpression ) . getRightExpression ( ) ) ; return new Integer ( Integer . parseInt ( leftValue ) / Integer . parseInt ( rightValue ) ) . toString ( ) ; } return null ; }
Gets the between boundary values .