com.sapportals.wcm.service.indexmanagement.retrieval.search

Interface IQueryEntry

All Superinterfaces:
Serializable

public interface IQueryEntry
extends Serializable

Single entry of a complex search query.


Field Summary
static String OPERATOR_AND
          if query entry is an operator entry the value can be OPERATOR_AND, OPERATOR_OR or OPERATOR_NOT
static String OPERATOR_NOT
          if query entry is an operator entry the value can be OPERATOR_AND, OPERATOR_OR or OPERATOR_NOT
static String OPERATOR_OR
          if query entry is an operator entry the value can be OPERATOR_AND, OPERATOR_OR or OPERATOR_NOT
static byte PROPERTY_OPERATOR_BETWEEN
          Property value should be between value 1 and value 2 of the query entry
static byte PROPERTY_OPERATOR_EQUAL
          Property value should be equal to the value of the query entry
static byte PROPERTY_OPERATOR_GREATER
          Property value should be greater than the value of the query entry
static byte PROPERTY_OPERATOR_GREATER_OR_EQUAL
          Property value should be greater or equal the value of the query entry
static byte PROPERTY_OPERATOR_LESS
          Property value should be less than the value of the query entry
static byte PROPERTY_OPERATOR_LESS_OR_EQUAL
          Property value should be less or equal the value of the query entry
static byte PROPERTY_OPERATOR_NOT
          Property value should not be equal to the value of the query entry
static byte PROPERTY_TYPE_DATE
          if query entry is an attribute entry you can specifiy the property type
static byte PROPERTY_TYPE_INTEGER
          if query entry is an attribute entry you can specifiy the property type
static byte PROPERTY_TYPE_STRING
          if query entry is an attribute entry you can specifiy the property type
static byte PROPERTY_TYPE_TEXT
          if query entry is an attribute entry you can specifiy the property type
static byte PROPERTY_TYPE_USE_META_MODEL
          if query entry is an attribute entry you can specifiy the property type
static String ROW_TYPE_ATTRIBUTE
          specifies that query entry is an attribute entry
static String ROW_TYPE_BRACKET_CLOSE
          specifies that query entry is an close bracket entry
static String ROW_TYPE_BRACKET_OPEN
          specifies that query entry is an open bracket entry
static String ROW_TYPE_OPERATOR
          specifies that query entry is an operator entry
static String ROW_TYPE_TERM
          specifies that query entry is a term entry
static byte TERM_ACTION_EXACT
          exact search
static byte TERM_ACTION_FUZZY
          fuzzy search
static byte TERM_ACTION_LINGUISTIC
          linguistic search
static byte TERM_ACTION_NEAR_WIDTH
          near with search
static byte TERM_ACTION_SOUNDEX
          soundex search
 
Method Summary
 IQueryEntry cloneEntry()
          Clones itself.
 IPropertyName getCMPropertyName()
           
 float getFuzziness()
           
 String getPropertyName()
          Deprecated. as of NW04. Use getCMPropertyName()
 byte getPropertyOperator()
          The property operator defines the context of the query entry value.
 byte getPropertyType()
           
 String getRowType()
          Returns the row type
 List getSubstitutedTerms()
          Returns the corrected terms
 byte getTermAction()
          Returns the term action
 float getTermWeight()
           
 String getValue1AsString()
           
 Date getValue1DateValue()
           
 int getValue1IntValue()
           
 String getValue2AsString()
           
 Date getValue2DateValue()
           
 int getValue2IntValue()
           
 String getValueAsString()
           
 Date getValueDateValue()
           
 int getValueIntValue()
           
 boolean isTermsChanged()
          Returns true if the terms are changed
 void setDateValue(String dateValue)
          following format: yyyy-MM-dd HH:mm:ss.
 void setDateValue(String dateValue1, String dateValue2)
          Sets the first and second value on date values.
 void setFuzziness(float fuzziness)
          must be used for fuzzy search.
 void setPropertyName(IPropertyName cmPropertyName)
          Optional: defines in which attribute the search is to be executed if an attribute search is executed
 void setPropertyName(String propertyName)
          Deprecated. as of NW04. See setPropertyName(IPropertyName)
 void setPropertyOperator(byte propertyOperator)
          The property operator defines the context of the query entry value.
 void setPropertyType(byte propertyType)
          Adds a property type.
 void setRowType(String rowType)
          Sets the row type
 void setSubstitutedTerms(List substitutedTerms)
          Sets the corrected terms
 void setTermAction(byte termAction)
          Adds a term action; the term action defines how the search is executed (fuzzy, exact,...)
 void setTermsChanged(boolean hasChanged)
          Set on true if the terms are changed
 void setTermWeight(float weight)
          Sets the term weight
the term weight goes from 0.0 ... 1.0
 void setValue(Date dateValue)
          Sets the value
 void setValue(Date dateValue1, Date dateValue2)
          result is between value1 and value2
 void setValue(int intValue)
          Sets the value
 void setValue(int intValue1, int intValue2)
          result is between value1 and value2
 void setValue(String stringValue)
          Sets the value
 void setValue(String value1, String value2)
           
 boolean specialEqual1(IQueryEntry e2)
           
 

Field Detail

TERM_ACTION_LINGUISTIC

public static final byte TERM_ACTION_LINGUISTIC
linguistic search

See Also:
Constant Field Values

TERM_ACTION_FUZZY

public static final byte TERM_ACTION_FUZZY
fuzzy search

See Also:
Constant Field Values

TERM_ACTION_NEAR_WIDTH

public static final byte TERM_ACTION_NEAR_WIDTH
near with search

See Also:
Constant Field Values

TERM_ACTION_EXACT

public static final byte TERM_ACTION_EXACT
exact search

See Also:
Constant Field Values

TERM_ACTION_SOUNDEX

public static final byte TERM_ACTION_SOUNDEX
soundex search

See Also:
Constant Field Values

PROPERTY_TYPE_USE_META_MODEL

public static final byte PROPERTY_TYPE_USE_META_MODEL
if query entry is an attribute entry you can specifiy the property type

See Also:
Constant Field Values

PROPERTY_TYPE_STRING

public static final byte PROPERTY_TYPE_STRING
if query entry is an attribute entry you can specifiy the property type

See Also:
Constant Field Values

PROPERTY_TYPE_DATE

public static final byte PROPERTY_TYPE_DATE
if query entry is an attribute entry you can specifiy the property type

See Also:
Constant Field Values

PROPERTY_TYPE_INTEGER

public static final byte PROPERTY_TYPE_INTEGER
if query entry is an attribute entry you can specifiy the property type

See Also:
Constant Field Values

PROPERTY_TYPE_TEXT

public static final byte PROPERTY_TYPE_TEXT
if query entry is an attribute entry you can specifiy the property type

See Also:
Constant Field Values

ROW_TYPE_TERM

public static final String ROW_TYPE_TERM
specifies that query entry is a term entry

See Also:
Constant Field Values

ROW_TYPE_ATTRIBUTE

public static final String ROW_TYPE_ATTRIBUTE
specifies that query entry is an attribute entry

See Also:
Constant Field Values

ROW_TYPE_OPERATOR

public static final String ROW_TYPE_OPERATOR
specifies that query entry is an operator entry

See Also:
Constant Field Values

ROW_TYPE_BRACKET_OPEN

public static final String ROW_TYPE_BRACKET_OPEN
specifies that query entry is an open bracket entry

See Also:
Constant Field Values

ROW_TYPE_BRACKET_CLOSE

public static final String ROW_TYPE_BRACKET_CLOSE
specifies that query entry is an close bracket entry

See Also:
Constant Field Values

OPERATOR_AND

public static final String OPERATOR_AND
if query entry is an operator entry the value can be OPERATOR_AND, OPERATOR_OR or OPERATOR_NOT

See Also:
Constant Field Values

OPERATOR_OR

public static final String OPERATOR_OR
if query entry is an operator entry the value can be OPERATOR_AND, OPERATOR_OR or OPERATOR_NOT

See Also:
Constant Field Values

OPERATOR_NOT

public static final String OPERATOR_NOT
if query entry is an operator entry the value can be OPERATOR_AND, OPERATOR_OR or OPERATOR_NOT

See Also:
Constant Field Values

PROPERTY_OPERATOR_EQUAL

public static final byte PROPERTY_OPERATOR_EQUAL
Property value should be equal to the value of the query entry

See Also:
Constant Field Values

PROPERTY_OPERATOR_NOT

public static final byte PROPERTY_OPERATOR_NOT
Property value should not be equal to the value of the query entry

See Also:
Constant Field Values

PROPERTY_OPERATOR_BETWEEN

public static final byte PROPERTY_OPERATOR_BETWEEN
Property value should be between value 1 and value 2 of the query entry

See Also:
Constant Field Values

PROPERTY_OPERATOR_GREATER

public static final byte PROPERTY_OPERATOR_GREATER
Property value should be greater than the value of the query entry

See Also:
Constant Field Values

PROPERTY_OPERATOR_LESS

public static final byte PROPERTY_OPERATOR_LESS
Property value should be less than the value of the query entry

See Also:
Constant Field Values

PROPERTY_OPERATOR_GREATER_OR_EQUAL

public static final byte PROPERTY_OPERATOR_GREATER_OR_EQUAL
Property value should be greater or equal the value of the query entry

See Also:
Constant Field Values

PROPERTY_OPERATOR_LESS_OR_EQUAL

public static final byte PROPERTY_OPERATOR_LESS_OR_EQUAL
Property value should be less or equal the value of the query entry

See Also:
Constant Field Values
Method Detail

cloneEntry

public IQueryEntry cloneEntry()
Clones itself.

Returns:
a clone object of this query entry

setSubstitutedTerms

public void setSubstitutedTerms(List substitutedTerms)
Sets the corrected terms

Parameters:
substitutedTerms - List of Strings

getSubstitutedTerms

public List getSubstitutedTerms()
Returns the corrected terms

Returns:
List of Strings

setTermsChanged

public void setTermsChanged(boolean hasChanged)
Set on true if the terms are changed

Parameters:
hasChanged -

isTermsChanged

public boolean isTermsChanged()
Returns true if the terms are changed

Returns:
boolean

setValue

public void setValue(String stringValue)
Sets the value


setValue

public void setValue(int intValue)
Sets the value


setValue

public void setValue(Date dateValue)
Sets the value


setDateValue

public void setDateValue(String dateValue)
                  throws ParseException
following format: yyyy-MM-dd HH:mm:ss. The old format yyyyMMddHHmmss is still supported but should not be used anymore.

Parameters:
dateValue -
Throws:
ParseException

setDateValue

public void setDateValue(String dateValue1,
                         String dateValue2)
                  throws ParseException
Sets the first and second value on date values. The parameters have to describe dates in the following format: yyyy-MM-dd HH:mm:ss. The old format yyyyMMddHHmmss is still supported but should not be used anymore.

Parameters:
dateValue1 -
dateValue2 -
Throws:
ParseException

setValue

public void setValue(int intValue1,
                     int intValue2)
result is between value1 and value2


setValue

public void setValue(String value1,
                     String value2)

setValue

public void setValue(Date dateValue1,
                     Date dateValue2)
result is between value1 and value2


setRowType

public void setRowType(String rowType)
                throws WcmException
Sets the row type

Parameters:
rowType - row type, see static attributes ROW_TYPE_xxx
Throws:
WcmException

setTermWeight

public void setTermWeight(float weight)
                   throws WcmException
Sets the term weight
the term weight goes from 0.0 ... 1.0

Throws:
WcmException

setTermAction

public void setTermAction(byte termAction)
                   throws WcmException
Adds a term action; the term action defines how the search is executed (fuzzy, exact,...) (it must only be called when the row type is ROW_TYPE_ATTRIBUTE or ROW_TYPE_TERM)

Throws:
WcmException

setPropertyType

public void setPropertyType(byte propertyType)
                     throws WcmException
Adds a property type.
The property type defines the kind of property to search on (string, date, integer, ...).
It must only be called when the row type is ROW_TYPE_ATTRIBUTE. The default value is PROPERTY_TYPE_STRING)

Throws:
WcmException

setPropertyOperator

public void setPropertyOperator(byte propertyOperator)
The property operator defines the context of the query entry value. It is only needed when the query entry is of row type IQueryEntry.ROW_TYPE_ATTRIBUTE. Use constants beginning with IQueryEntry.PROPERTY_OPERATOR_. Default is IQueryEntry.PROPERTY_OPERATOR_EQUAL.


setPropertyName

public void setPropertyName(String propertyName)
                     throws WcmException
Deprecated. as of NW04. See setPropertyName(IPropertyName)

Optional: defines in which attribute the search is to be executed if an attribute search is executed

Throws:
WcmException

setPropertyName

public void setPropertyName(IPropertyName cmPropertyName)
                     throws WcmException
Optional: defines in which attribute the search is to be executed if an attribute search is executed

Throws:
WcmException

getPropertyName

public String getPropertyName()
Deprecated. as of NW04. Use getCMPropertyName()

Returns:
the property name

getCMPropertyName

public IPropertyName getCMPropertyName()
Returns:
the IPropertyName object that has been set.

getPropertyType

public byte getPropertyType()
Returns:
the property type. For possible return values, see static attribute PROPERTY_TYPE_xxx

getPropertyOperator

public byte getPropertyOperator()
The property operator defines the context of the query entry value. It is only needed when the query entry is of row type IQueryEntry.ROW_TYPE_ATTRIBUTE. Use constants beginning with IQueryEntry.PROPERTY_OPERATOR_. Default is IQueryEntry.PROPERTY_OPERATOR_EQUAL.

Returns:
operator of the property

getTermAction

public byte getTermAction()
Returns the term action

Returns:
for possible return values, see static attribute TERM_ACTION_xxx

getTermWeight

public float getTermWeight()
Returns:
the term weight

getRowType

public String getRowType()
Returns the row type

Returns:
for possible return values, see static attributes ROW_TYPE_xxx

getValue1AsString

public String getValue1AsString()
Returns:
value1 in string format

getValue1DateValue

public Date getValue1DateValue()
Returns:
value1 as date

getValue1IntValue

public int getValue1IntValue()
Returns:
value1 as int

getValueAsString

public String getValueAsString()
Returns:
value set by setValue() in string format

getValueDateValue

public Date getValueDateValue()
Returns:
date value set by setValue()

getValueIntValue

public int getValueIntValue()
Returns:
int value set by setValue()

getValue2AsString

public String getValue2AsString()
Returns:
value2 in string format

getValue2DateValue

public Date getValue2DateValue()
Returns:
value2 date object if it is an date object

getValue2IntValue

public int getValue2IntValue()
Returns:
value2 int if it is an date object

setFuzziness

public void setFuzziness(float fuzziness)
must be used for fuzzy search. if no fuzziness is set the default fuzziness for the index is used. the default fuzziness can be set via the index administration

Parameters:
fuzziness - - value between 0.0 and 1.0 where 1.0 is exact search

getFuzziness

public float getFuzziness()
Returns:
fuzziness, that has been set for fuzzy search

specialEqual1

public boolean specialEqual1(IQueryEntry e2)


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. 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.