microsoft.exchange.webservices.data
Class ServiceId

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.ServiceId
Direct Known Subclasses:
ConversationId, FolderId, ItemId

public abstract class ServiceId
extends ComplexProperty

Represents the Id of an Exchange object.


Constructor Summary
protected ServiceId()
          * Initializes a new instance.
protected ServiceId(java.lang.String uniqueId)
          * Initializes a new instance.
 
Method Summary
protected  void assign(ServiceId source)
          Assigns from existing id.
 boolean equals(java.lang.Object obj)
          Determines whether the specified instance is equal to the current instance.
 java.lang.String getChangeKey()
          Gets the change key associated with the Exchange object.
 java.lang.String getUniqueId()
          Gets the unique Id of the Exchange object.
protected abstract  java.lang.String getXmlElementName()
          Gets the name of the XML element.
 int hashCode()
          Serves as a hash function for a particular type.
protected  boolean isValid()
          True if this instance is valid, false otherthise.
protected  void readAttributesFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
          * Read attributes from XML.
 boolean sameIdAndChangeKey(ServiceId other)
          * Determines whether two ServiceId instances are equal (including ChangeKeys).
protected  void setChangeKey(java.lang.String changeKey)
          Sets the change key associated with the Exchange object.
protected  void setUniqueId(java.lang.String uniqueId)
          Sets the unique Id of the Exchange object.
 java.lang.String toString()
          * Returns a string that represents the current instance.
protected  void writeAttributesToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          * Writes attributes to XML.
protected  void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
          * Writes to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.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

protected ServiceId()
* Initializes a new instance.


ServiceId

protected ServiceId(java.lang.String uniqueId)
             throws java.lang.Exception
* Initializes a new instance.

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

readAttributesFromXml

protected void readAttributesFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
                              throws java.lang.Exception
* Read attributes from 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 attributes to XML.

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

getXmlElementName

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

Returns:
XML element name.

writeToXml

protected void writeToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
                   throws java.lang.Exception
* Writes to XML.

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

assign

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

Parameters:
source - The source.

isValid

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

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

getUniqueId

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

Returns:
unique Id of the Exchange object.

setUniqueId

protected void setUniqueId(java.lang.String uniqueId)
Sets the unique Id of the Exchange object.

Parameters:
uniqueId - unique Id of the Exchange object.

getChangeKey

public java.lang.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

protected void setChangeKey(java.lang.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(java.lang.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 java.lang.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 java.lang.Object
Returns:
A hash code for the current

toString

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

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