SAP NetWeaver '04

com.sapportals.wcm.repository
Interface IQueryBuilder

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
public interface IQueryBuilder

Constructs IQueryExpressions for later use with the corresponding property search manager.

An IQueryBuilder constructs and combines IQueryExpressions, creating new IQueryExpressions, which finally are executed against the property search manager. Construction is done in the following way

 builder.equ(x, y).and(builder.eq(z, "name")).or(builder.like(y, "%jpg"))

 builder.not(builder.greaterThan(x, new Integer(7)))
 

Note that the result of comparing with both undefined properties and multi-valued properties is "undefined" (as per standard SQL three-valued logic). When combined with "true" and "false" in expressions, "undefined" behaves as below:

 undefined AND undefined -> undefined
 undefined OR undefined -> undefined
 undefined AND true -> undefined
 undefined AND false -> false
 undefined OR true -> true
 undefined OR false -> undefined
 NOT(undefined) -> undefined
 
(the only exception being the special query expression isDefined() which always evaluates to "true" or "false").

Copyright (c) SAP AG 2001-2004


Method Summary
 IQueryExpression constFalse()
           
 IQueryExpression constTrue()
           
 IQueryExpression eq(IPropertyName name, java.lang.Object value)
          Returns a new expression which tests property == value.
 IQueryExpression eq(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property == value.
 IQueryExpression eqIgnoreCase(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property == value, ignoring case.
 IQueryExpression greater(IPropertyName name, java.lang.Object value)
          Returns a new expression which tests property > value.
 IQueryExpression greater(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property > value.
 IQueryExpression greaterEq(IPropertyName name, java.lang.Object value)
          Returns a new expression which tests property >= value.
 IQueryExpression greaterEq(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property >= value.
 IQueryExpression greaterEqIgnoreCase(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property >= value, ignoring case.
 IQueryExpression greaterIgnoreCase(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property > value, ignoring case.
 IQueryExpression isCollection()
          Returns a new expression which tests if the resource is a collection
 IQueryExpression isDefined(IPropertyName name)
          Returns a new expression which tests for the properties existence.
 IQueryExpression less(IPropertyName name, java.lang.Object value)
          Returns a new expression which tests property < value.
 IQueryExpression less(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property < value.
 IQueryExpression lessEq(IPropertyName name, java.lang.Object value)
          Returns a new expression which tests property <= value.
 IQueryExpression lessEq(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property <= value.
 IQueryExpression lessEqIgnoreCase(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property <= value, ignoring case.
 IQueryExpression lessIgnoreCase(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property < value, ignoring case.
 IQueryExpression like(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property is like value, where value is a wildcard expression.
 IQueryExpression likeIgnoreCase(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property is like value, where value is a wildcard expression.
 IQueryExpression not(IQueryExpression expression)
          Returns a new expression which is the complement of the given expression.
 IQueryExpression notEq(IPropertyName name, java.lang.Object value)
          Returns a new expression which tests property !
 IQueryExpression notEq(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property !
 IQueryExpression notEqIgnoreCase(IPropertyName name, java.lang.String value)
          Returns a new expression which tests property !
 

Method Detail

eq

public IQueryExpression eq(IPropertyName name,
                           java.lang.Object value)
Returns a new expression which tests property == value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property == value

eq

public IQueryExpression eq(IPropertyName name,
                           java.lang.String value)
Returns a new expression which tests property == value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property == value

eqIgnoreCase

public IQueryExpression eqIgnoreCase(IPropertyName name,
                                     java.lang.String value)
Returns a new expression which tests property == value, ignoring case.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property == value

notEq

public IQueryExpression notEq(IPropertyName name,
                              java.lang.Object value)
Returns a new expression which tests property != value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property != value

notEq

public IQueryExpression notEq(IPropertyName name,
                              java.lang.String value)
Returns a new expression which tests property != value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property != value

notEqIgnoreCase

public IQueryExpression notEqIgnoreCase(IPropertyName name,
                                        java.lang.String value)
Returns a new expression which tests property != value, ignoring case.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property != value

less

public IQueryExpression less(IPropertyName name,
                             java.lang.Object value)
Returns a new expression which tests property < value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property < value

less

public IQueryExpression less(IPropertyName name,
                             java.lang.String value)
Returns a new expression which tests property < value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property < value

lessIgnoreCase

public IQueryExpression lessIgnoreCase(IPropertyName name,
                                       java.lang.String value)
Returns a new expression which tests property < value, ignoring case.
Parameters:
name - the name3 of the property
value - to compare against
Returns:
expression representing property < value

lessEq

public IQueryExpression lessEq(IPropertyName name,
                               java.lang.Object value)
Returns a new expression which tests property <= value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property <= value

lessEq

public IQueryExpression lessEq(IPropertyName name,
                               java.lang.String value)
Returns a new expression which tests property <= value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property <= value

lessEqIgnoreCase

public IQueryExpression lessEqIgnoreCase(IPropertyName name,
                                         java.lang.String value)
Returns a new expression which tests property <= value, ignoring case.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property <= value

greater

public IQueryExpression greater(IPropertyName name,
                                java.lang.Object value)
Returns a new expression which tests property > value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property > value

greater

public IQueryExpression greater(IPropertyName name,
                                java.lang.String value)
Returns a new expression which tests property > value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property > value

greaterIgnoreCase

public IQueryExpression greaterIgnoreCase(IPropertyName name,
                                          java.lang.String value)
Returns a new expression which tests property > value, ignoring case.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property > value

greaterEq

public IQueryExpression greaterEq(IPropertyName name,
                                  java.lang.Object value)
Returns a new expression which tests property >= value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property >= value

greaterEq

public IQueryExpression greaterEq(IPropertyName name,
                                  java.lang.String value)
Returns a new expression which tests property >= value.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property >= value

greaterEqIgnoreCase

public IQueryExpression greaterEqIgnoreCase(IPropertyName name,
                                            java.lang.String value)
Returns a new expression which tests property >= value, ignoring case.
Parameters:
name - the name of the property
value - to compare against
Returns:
expression representing property >= value

not

public IQueryExpression not(IQueryExpression expression)
Returns a new expression which is the complement of the given expression.
Parameters:
expression - to return complement of
Returns:
expression representing !expression

like

public IQueryExpression like(IPropertyName name,
                             java.lang.String value)
Returns a new expression which tests property is like value, where value is a wildcard expression. Wildcard characters are "_" and "%", where "_" matches one character and "%" matches 0 or more characters. "\" can be used as escape character and is only allowed to escape itself, "_" and "%".
Parameters:
name - the name of the property
value - the wildcard expression
Returns:
expression representing property like value

likeIgnoreCase

public IQueryExpression likeIgnoreCase(IPropertyName name,
                                       java.lang.String value)
Returns a new expression which tests property is like value, where value is a wildcard expression. Wildcard characters are "_" and "%", where "_" matches one character and "%" matches 0 or more characters. "\" can be used as escape character and is only allowed to escape itself, "_" and "%".
Parameters:
name - the name of the property
value - the wildcard expression
Returns:
expression representing property like value

isDefined

public IQueryExpression isDefined(IPropertyName name)
Returns a new expression which tests for the properties existence.
Parameters:
name - the name of the property
Returns:
expression representing "if exists property"

isCollection

public IQueryExpression isCollection()
Returns a new expression which tests if the resource is a collection
Returns:
expression representing test if resource is collection

constFalse

public IQueryExpression constFalse()
Returns:
constant false

constTrue

public IQueryExpression constTrue()
Returns:
constant true

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.