private void processContainsPredicate( final ContainsPredicate<?> predicate, StringBuilder builder ) { Object value = predicate.value(); String valueVariable = triples.addTriple( predicate.collectionProperty(), false ).value(); builder.append( this.createRegexStringForContaining( valueVariable, this.createAndEscapeJSONString( value ) ) ); }
private void processContainsPredicate( final ContainsPredicate<?> predicate, StringBuilder builder ) { Object value = predicate.value(); String valueVariable = triples.addTriple( predicate.collectionProperty(), false ).value(); builder.append( this.createRegexStringForContaining( valueVariable, this.createAndEscapeJSONString( value ) ) ); }
predicate.collectionProperty(), //
private void processContainsSpecification( BoolQueryBuilder queryBuilder, ContainsPredicate<?> spec, Map<String, Object> variables ) { LOGGER.trace( "Processing ContainsSpecification {}", spec ); String name = spec.collectionProperty().toString(); if( spec.value() instanceof ValueComposite ) { // Query by complex property "example value" throw new UnsupportedOperationException( "ElasticSearch Index/Query does not support complex " + "queries, ie. queries by 'example value'." ); } else if( COMPLEX_TYPE_SUPPORTS.get( spec.value().getClass() ) != null ) { ComplexTypeSupport support = COMPLEX_TYPE_SUPPORTS.get( spec.value().getClass() ); queryBuilder.must( support.contains( spec, variables ) ); } else { Object value = resolveVariable( spec.value(), variables ); queryBuilder.must( termQuery( name, value ) ); } }
QualifiedName.fromAccessor( predicate.collectionProperty().accessor() ), value, predicate, false, lastTableIndex, new ModifiableInt( lastTableIndex ), DBNames.QNAME_TABLE_VALUE_COLUMN_NAME,