public QueryBuilder populateFilterBuilder ( Expression condtionalExp , EntityMetadata m ) { log . info ( "Populating filter for expression: " + condtionalExp ) ; QueryBuilder filter = null ; if ( condtionalExp instanceof SubExpression ) { filter = populateFilterBuilder ( ( ( SubExpression ) condtionalExp ) . getExpression ( ) , m ) ; } else if ( condtionalExp instanceof ComparisonExpression ) { filter = getFilter ( populateFilterClause ( ( ComparisonExpression ) condtionalExp ) , m ) ; } else if ( condtionalExp instanceof BetweenExpression ) { filter = populateBetweenFilter ( ( BetweenExpression ) condtionalExp , m ) ; } else if ( condtionalExp instanceof LogicalExpression ) { filter = populateLogicalFilterBuilder ( condtionalExp , m ) ; } else if ( condtionalExp instanceof LikeExpression ) { filter = populateLikeQuery ( ( LikeExpression ) condtionalExp , m ) ; } else if ( condtionalExp instanceof InExpression ) { filter = populateInQuery ( ( InExpression ) condtionalExp , m ) ; } else { log . error ( condtionalExp . toParsedText ( ) + "found in where clause. Not supported in elasticsearch." ) ; throw new KunderaException ( condtionalExp . toParsedText ( ) + " not supported in ElasticSearch" ) ; } log . debug ( "Following is the populated filter for required query: " + filter ) ; return filter ; }
Populate filter builder .