com.cumulocity.model
Class ID

java.lang.Object
  extended by org.svenson.AbstractDynamicProperties
      extended by com.cumulocity.model.ID
All Implemented Interfaces:
org.svenson.DynamicProperties
Direct Known Subclasses:
GId, Reference, XtId

public class ID
extends org.svenson.AbstractDynamicProperties


Constructor Summary
ID()
           
ID(String id)
           
 
Method Summary
 boolean equals(Object obj)
           
 boolean equalsIgnoreClass(ID otherId)
          This method compares if two ids have the same content (type, value) even if they have different classes.
 String getName()
           
 String getType()
           
 String getValue()
           
 int hashCode()
           
 void setName(String name)
           
 void setType(String type)
           
 void setValue(String value)
           
 String toString()
           
 
Methods inherited from class org.svenson.AbstractDynamicProperties
getProperty, propertyNames, setProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ID

public ID()

ID

public ID(String id)
Method Detail

getType

public String getType()

setType

public void setType(String type)

getValue

public String getValue()

setValue

public void setValue(String value)

getName

@JSONProperty(ignore=true)
public String getName()

setName

public void setName(String name)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

equalsIgnoreClass

public boolean equalsIgnoreClass(ID otherId)
This method compares if two ids have the same content (type, value) even if they have different classes. This method is useful for the identity service.

Parameters:
otherId - the ID to compare with this instance
Returns:
true if both ID have the same contents (type, value) regardless of the class, false otherwise

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.