microsoft.exchange.webservices.data.property.complex
Class ServiceId

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.complex.ComplexProperty
      extended by microsoft.exchange.webservices.data.property.complex.ServiceId
All Implemented Interfaces:
ISelfValidate, ComplexFunctionDelegate<EwsServiceXmlReader>
Direct Known Subclasses:
ConversationId, FolderId, ItemId

public abstract class ServiceId
extends ComplexProperty

Represents the Id of an Exchange object.


Constructor Summary
ServiceId()
          Initializes a new instance.
ServiceId(String uniqueId)
          Initializes a new instance.
 
Method Summary
 void assign(ServiceId source)
          Assigns from existing id.
 boolean equals(Object obj)
          Determines whether the specified instance is equal to the current instance.
 String getChangeKey()
          Gets the change key associated with the Exchange object.
 String getUniqueId()
          Gets the unique Id of the Exchange object.
abstract  String getXmlElementName()
          Gets the name of the XML element.
 int hashCode()
          Serves as a hash function for a particular type.
 boolean isValid()
          True if this instance is valid, false otherthise.
 void readAttributesFromXml(EwsServiceXmlReader reader)
          Read attribute from XML.
 boolean sameIdAndChangeKey(ServiceId other)
          Determines whether two ServiceId instances are equal (including ChangeKeys).
 void setChangeKey(String changeKey)
          Sets the change key associated with the Exchange object.
 void setUniqueId(String uniqueId)
          Sets the unique Id of the Exchange object.
 String toString()
          Returns a string that represents the current instance.
 void writeAttributesToXml(EwsServiceXmlWriter writer)
          Writes attribute to XML.
 void writeToXml(EwsServiceXmlWriter writer)
          Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.property.complex.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeElementsToXml, writeToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceId

public ServiceId()
Initializes a new instance.


ServiceId

public ServiceId(String uniqueId)
          throws Exception
Initializes a new instance.

Parameters:
uniqueId - The unique id.
Throws:
Exception - the exception
Method Detail

readAttributesFromXml

public void readAttributesFromXml(EwsServiceXmlReader reader)
                           throws Exception
Read attribute from XML.

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

writeAttributesToXml

public void writeAttributesToXml(EwsServiceXmlWriter writer)
                          throws ServiceXmlSerializationException
Writes attribute to XML.

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

getXmlElementName

public abstract String getXmlElementName()
Gets the name of the XML element.

Returns:
XML element name.

writeToXml

public void writeToXml(EwsServiceXmlWriter writer)
                throws Exception
Writes to XML.

Parameters:
writer - The writer.
Throws:
Exception - the exception

assign

public void assign(ServiceId source)
Assigns from existing id.

Parameters:
source - The source.

isValid

public boolean isValid()
True if this instance is valid, false otherthise.

Returns:
true if this instance is valid; otherwise,false

getUniqueId

public String getUniqueId()
Gets the unique Id of the Exchange object.

Returns:
unique Id of the Exchange object.

setUniqueId

public void setUniqueId(String uniqueId)
Sets the unique Id of the Exchange object.

Parameters:
uniqueId - unique Id of the Exchange object.

getChangeKey

public String getChangeKey()
Gets the change key associated with the Exchange object. The change key represents the version of the associated item or folder.

Returns:
change key associated with the Exchange object.

setChangeKey

public void setChangeKey(String changeKey)
Sets the change key associated with the Exchange object. The change key represents the version of the associated item or folder.

Parameters:
changeKey - change key associated with the Exchange object.

sameIdAndChangeKey

public boolean sameIdAndChangeKey(ServiceId other)
Determines whether two ServiceId instances are equal (including ChangeKeys).

Parameters:
other - The ServiceId to compare with the current ServiceId.
Returns:
true if equal otherwise false.

equals

public boolean equals(Object obj)
Determines whether the specified instance is equal to the current instance. We do not consider the ChangeKey for ServiceId.Equals.

Overrides:
equals in class Object
Parameters:
obj - The object to compare with the current instance
Returns:
true if the specified object is equal to the current instance, otherwise, false.

hashCode

public int hashCode()
Serves as a hash function for a particular type. We do not consider the change key in the hash code computation.

Overrides:
hashCode in class Object
Returns:
A hash code for the current

toString

public String toString()
Returns a string that represents the current instance.

Overrides:
toString in class Object
Returns:
A string that represents the current instance.


Copyright © 2012–2015 Microsoft. All rights reserved.