Class SearchFilter.ContainsSubstring
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.search.filter.SearchFilter
-
- microsoft.exchange.webservices.data.search.filter.SearchFilter.PropertyBasedFilter
-
- microsoft.exchange.webservices.data.search.filter.SearchFilter.ContainsSubstring
-
- All Implemented Interfaces:
ISelfValidate,ComplexFunctionDelegate<EwsServiceXmlReader>
- 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.search.filter.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
Constructors Constructor Description ContainsSubstring()Initializes a new instance of the class.ContainsSubstring(PropertyDefinitionBase propertyDefinition, String value)Initializes a new instance of the class.ContainsSubstring(PropertyDefinitionBase propertyDefinition, String value, ContainmentMode containmentMode, ComparisonMode comparisonMode)Initializes a new instance of the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComparisonModegetComparisonMode()Gets the comparison mode.ContainmentModegetContainmentMode()Gets the containment mode.StringgetValue()gets the value to compare the specified property with.protected StringgetXmlElementName()Gets the name of the XML element.protected voidinternalValidate()validates instance.voidreadAttributesFromXml(EwsServiceXmlReader reader)Reads the attribute of Xml.voidsetComparisonMode(ComparisonMode comparisonMode)sets the comparison mode.voidsetContainmentMode(ContainmentMode containmentMode)sets the ContainmentMode.voidsetValue(String value)sets the value to compare the specified property with.booleantryReadElementFromXml(EwsServiceXmlReader reader)Tries to read element from XML.voidwriteAttributesToXml(EwsServiceXmlWriter writer)Writes the attribute to XML.voidwriteElementsToXml(EwsServiceXmlWriter writer)Writes the elements to Xml.-
Methods inherited from class microsoft.exchange.webservices.data.search.filter.SearchFilter.PropertyBasedFilter
getPropertyDefinition, setPropertyDefinition
-
Methods inherited from class microsoft.exchange.webservices.data.search.filter.SearchFilter
loadFromXml, writeToXml
-
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, loadFromXml, loadFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeToXml, writeToXml
-
-
-
-
Constructor Detail
-
ContainsSubstring
public ContainsSubstring()
Initializes a new instance of the class.
-
ContainsSubstring
public ContainsSubstring(PropertyDefinitionBase propertyDefinition, 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.
-
ContainsSubstring
public ContainsSubstring(PropertyDefinitionBase propertyDefinition, 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:
internalValidatein classSearchFilter.PropertyBasedFilter- Throws:
ServiceValidationException- the service validation exception
-
getXmlElementName
protected String getXmlElementName()
Gets the name of the XML element.- Specified by:
getXmlElementNamein classSearchFilter- Returns:
- the xml element name
-
tryReadElementFromXml
public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws Exception
Tries to read element from XML.- Overrides:
tryReadElementFromXmlin classSearchFilter.PropertyBasedFilter- Parameters:
reader- the reader- Returns:
- True if element was read.
- Throws:
Exception- the exception
-
readAttributesFromXml
public void readAttributesFromXml(EwsServiceXmlReader reader) throws Exception
Reads the attribute of Xml.- Overrides:
readAttributesFromXmlin classComplexProperty- Parameters:
reader- the reader- Throws:
Exception- the exception
-
writeAttributesToXml
public void writeAttributesToXml(EwsServiceXmlWriter writer) throws ServiceXmlSerializationException
Writes the attribute to XML.- Overrides:
writeAttributesToXmlin classComplexProperty- Parameters:
writer- the writer- Throws:
ServiceXmlSerializationException- the service xml serialization exception
-
writeElementsToXml
public void writeElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException
Writes the elements to Xml.- Overrides:
writeElementsToXmlin classSearchFilter.PropertyBasedFilter- Parameters:
writer- the writer- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- 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 String getValue()
gets the value to compare the specified property with.- Returns:
- String
-
-