microsoft.exchange.webservices.data
Class SearchFilter.ContainsSubstring

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.SearchFilter
          extended by microsoft.exchange.webservices.data.SearchFilter.PropertyBasedFilter
              extended by microsoft.exchange.webservices.data.SearchFilter.ContainsSubstring
Enclosing class:
SearchFilter

public static final class SearchFilter.ContainsSubstring
extends SearchFilter.PropertyBasedFilter

Represents a search filter that checks for the presence of a substring inside a text property. Applications can use ContainsSubstring to define conditions such as "Field CONTAINS Value" or "Field IS PREFIXED WITH Value".


Nested Class Summary
 
Nested classes/interfaces inherited from class microsoft.exchange.webservices.data.SearchFilter
SearchFilter.ContainsSubstring, SearchFilter.ExcludesBitmask, SearchFilter.Exists, SearchFilter.IsEqualTo, SearchFilter.IsGreaterThan, SearchFilter.IsGreaterThanOrEqualTo, SearchFilter.IsLessThan, SearchFilter.IsLessThanOrEqualTo, SearchFilter.IsNotEqualTo, SearchFilter.Not, SearchFilter.PropertyBasedFilter, SearchFilter.RelationalFilter, SearchFilter.SearchFilterCollection
 
Constructor Summary
SearchFilter.ContainsSubstring()
          Initializes a new instance of the class.
SearchFilter.ContainsSubstring(PropertyDefinitionBase propertyDefinition, java.lang.String value)
          Initializes a new instance of the class.
SearchFilter.ContainsSubstring(PropertyDefinitionBase propertyDefinition, java.lang.String value, ContainmentMode containmentMode, ComparisonMode comparisonMode)
          Initializes a new instance of the class.
 
Method Summary
 ComparisonMode getComparisonMode()
          Gets the comparison mode.
 ContainmentMode getContainmentMode()
          Gets the containment mode.
 java.lang.String getValue()
          gets the value to compare the specified property with.
protected  java.lang.String getXmlElementName()
          Gets the name of the XML element.
protected  void internalValidate()
          validates instance.
protected  void readAttributesFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Reads the attribute of Xml.
 void setComparisonMode(ComparisonMode comparisonMode)
          sets the comparison mode.
 void setContainmentMode(ContainmentMode containmentMode)
          sets the ContainmentMode.
 void setValue(java.lang.String value)
          sets the value to compare the specified property with.
protected  boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          Tries to read element from XML.
protected  void writeAttributesToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes the attributes to XML.
protected  void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          Writes the elements to Xml.
 
Methods inherited from class microsoft.exchange.webservices.data.SearchFilter.PropertyBasedFilter
getPropertyDefinition, setPropertyDefinition
 
Methods inherited from class microsoft.exchange.webservices.data.SearchFilter
loadFromXml, writeToXml
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, loadFromXml, loadFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchFilter.ContainsSubstring

public SearchFilter.ContainsSubstring()
Initializes a new instance of the class.


SearchFilter.ContainsSubstring

public SearchFilter.ContainsSubstring(PropertyDefinitionBase propertyDefinition,
                                      java.lang.String value)
Initializes a new instance of the class.

Parameters:
propertyDefinition - The definition of the property that is being compared.
value - The value to compare with.

SearchFilter.ContainsSubstring

public SearchFilter.ContainsSubstring(PropertyDefinitionBase propertyDefinition,
                                      java.lang.String value,
                                      ContainmentMode containmentMode,
                                      ComparisonMode comparisonMode)
Initializes a new instance of the class.

Parameters:
propertyDefinition - The definition of the property that is being compared.
value - The value to compare with.
containmentMode - The containment mode.
comparisonMode - The comparison mode.
Method Detail

internalValidate

protected void internalValidate()
                         throws ServiceValidationException
validates instance.

Overrides:
internalValidate in class SearchFilter.PropertyBasedFilter
Throws:
ServiceValidationException - the service validation exception

getXmlElementName

protected java.lang.String getXmlElementName()
Gets the name of the XML element.

Specified by:
getXmlElementName in class SearchFilter
Returns:
the xml element name

tryReadElementFromXml

protected boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                                 throws java.lang.Exception
Tries to read element from XML.

Overrides:
tryReadElementFromXml in class SearchFilter.PropertyBasedFilter
Parameters:
reader - the reader
Returns:
True if element was read.
Throws:
java.lang.Exception - the exception

readAttributesFromXml

protected void readAttributesFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                              throws java.lang.Exception
Reads the attribute of Xml.

Overrides:
readAttributesFromXml in class ComplexProperty
Parameters:
reader - the reader
Throws:
java.lang.Exception - the exception

writeAttributesToXml

protected void writeAttributesToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                             throws ServiceXmlSerializationException
Writes the attributes to XML.

Overrides:
writeAttributesToXml in class ComplexProperty
Parameters:
writer - the writer
Throws:
ServiceXmlSerializationException - the service xml serialization exception

writeElementsToXml

protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                           throws javax.xml.stream.XMLStreamException,
                                  ServiceXmlSerializationException
Writes the elements to Xml.

Overrides:
writeElementsToXml in class SearchFilter.PropertyBasedFilter
Parameters:
writer - the writer
Throws:
javax.xml.stream.XMLStreamException - the xML stream exception
ServiceXmlSerializationException - the service xml serialization exception

getContainmentMode

public ContainmentMode getContainmentMode()
Gets the containment mode.

Returns:
ContainmentMode

setContainmentMode

public void setContainmentMode(ContainmentMode containmentMode)
sets the ContainmentMode.

Parameters:
containmentMode - the new containment mode

getComparisonMode

public ComparisonMode getComparisonMode()
Gets the comparison mode.

Returns:
ComparisonMode

setComparisonMode

public void setComparisonMode(ComparisonMode comparisonMode)
sets the comparison mode.

Parameters:
comparisonMode - the new comparison mode

getValue

public java.lang.String getValue()
gets the value to compare the specified property with.

Returns:
String

setValue

public void setValue(java.lang.String value)
sets the value to compare the specified property with.

Parameters:
value - the new value