Apache CXF API

org.apache.cxf.jaxrs.ext.search.client
Class FiqlSearchConditionBuilder

java.lang.Object
  extended by org.apache.cxf.jaxrs.ext.search.client.SearchConditionBuilder
      extended by org.apache.cxf.jaxrs.ext.search.client.FiqlSearchConditionBuilder
All Implemented Interfaces:
PartialCondition

public class FiqlSearchConditionBuilder
extends SearchConditionBuilder

Builds a FIQL search condition.

Examples:

 SearchConditionBuilder b = SearchConditionBuilder.instance("fiql");
 b.is("price").equalTo(123.5).query();
 // gives "price==123.5"
 b.is("price").greaterThan(30).and().is("price").lessThan(50).query();
 // gives "price=gt=30.0;price=lt=50.0"
 
For very complex junctions nested "and"/"or" are allowed (breaking a bit fluency of interface) and looks like the following example:
 SearchConditionBuilder b = SearchConditionBuilder.instance("fiql");
 b.is("price").lessThan(100).and().or(
     b.is("title").equalTo("The lord*"),
     b.is("author").equalTo("R.R.Tolkien")).query();
 // gives "price=lt=100.0;(title==The lord*,author==R.R.Tolkien)"
 


Nested Class Summary
protected static class FiqlSearchConditionBuilder.Builder
           
 
Field Summary
protected  Map<String,String> properties
           
 
Fields inherited from class org.apache.cxf.jaxrs.ext.search.client.SearchConditionBuilder
DEFAULT_LANGUAGE, FIQL
 
Constructor Summary
FiqlSearchConditionBuilder()
           
FiqlSearchConditionBuilder(Map<String,String> properties)
           
 
Method Summary
 CompleteCondition and(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn)
          Conjunct multiple expressions
 CompleteCondition and(List<CompleteCondition> conditions)
          Conjunct multiple expressions
 Property is(String property)
          Get property of inspected entity type
protected  FiqlSearchConditionBuilder.Builder newBuilderInstance()
           
 CompleteCondition or(CompleteCondition c1, CompleteCondition c2, CompleteCondition... cn)
          Disjunct multiple expressions
 CompleteCondition or(List<CompleteCondition> conditions)
          Disjunct multiple expressions
 String query()
          Finalize condition construction and build search condition query.
 
Methods inherited from class org.apache.cxf.jaxrs.ext.search.client.SearchConditionBuilder
instance, instance, instance, instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected Map<String,String> properties
Constructor Detail

FiqlSearchConditionBuilder

public FiqlSearchConditionBuilder()

FiqlSearchConditionBuilder

public FiqlSearchConditionBuilder(Map<String,String> properties)
Method Detail

newBuilderInstance

protected FiqlSearchConditionBuilder.Builder newBuilderInstance()

query

public String query()
Description copied from class: SearchConditionBuilder
Finalize condition construction and build search condition query.

Specified by:
query in class SearchConditionBuilder

is

public Property is(String property)
Description copied from interface: PartialCondition
Get property of inspected entity type


and

public CompleteCondition and(CompleteCondition c1,
                             CompleteCondition c2,
                             CompleteCondition... cn)
Description copied from interface: PartialCondition
Conjunct multiple expressions


and

public CompleteCondition and(List<CompleteCondition> conditions)
Description copied from interface: PartialCondition
Conjunct multiple expressions


or

public CompleteCondition or(List<CompleteCondition> conditions)
Description copied from interface: PartialCondition
Disjunct multiple expressions


or

public CompleteCondition or(CompleteCondition c1,
                            CompleteCondition c2,
                            CompleteCondition... cn)
Description copied from interface: PartialCondition
Disjunct multiple expressions


Apache CXF API

Apache CXF