public Statement addWhereCondition ( AsPath asPath , String identifier , String colName , String val , String tableName ) { com . couchbase . client . java . query . dsl . Expression exp ; switch ( identifier ) { case "<" : exp = x ( colName ) . lt ( x ( val ) ) ; break ; case "<=" : exp = x ( colName ) . lte ( x ( val ) ) ; break ; case ">" : exp = x ( colName ) . gt ( x ( val ) ) ; break ; case ">=" : exp = x ( colName ) . gte ( x ( val ) ) ; break ; case "=" : exp = x ( colName ) . eq ( x ( val ) ) ; break ; default : LOGGER . error ( "Operator " + identifier + " is not supported in the JPA query for Couchbase." ) ; throw new KunderaException ( "Operator " + identifier + " is not supported in the JPA query for Couchbase." ) ; } return asPath . where ( exp . and ( x ( CouchbaseConstants . KUNDERA_ENTITY ) . eq ( x ( "'" + tableName ) + "'" ) ) ) ; }
Adds the where condition .