|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.svenson.AbstractDynamicProperties
com.cumulocity.model.JSONBase
com.cumulocity.model.Document<T>
public abstract class Document<T extends ID>
Represents the common elements of any modeled entity. Can serialize into and be deserialized from JSON.
Constructor Summary | |
---|---|
Document()
|
Method Summary | ||
---|---|---|
boolean |
equals(Object obj)
|
|
|
get(Class<C> clazz)
Returns the object whose parameter name is given by clazz, or null if no such property exists. |
|
Object |
get(String name)
Returns the object associated with the given property name, or null if no such property exists. |
|
Object |
getFragment(String name)
Returns the object associated with the given property name, or null if no such property exists. |
|
T |
getId()
|
|
String |
getInternalId()
|
|
String |
getRevision()
Deprecated. |
|
int |
hashCode()
|
|
void |
set(Object object)
Sets a property referring to the given object. |
|
|
set(Object object,
Class<C> clazz)
Sets a property referring to the given object. |
|
void |
set(Object object,
String propertyName)
Sets a property referring to the given object, using an arbitrary property name. |
|
void |
setId(T id)
|
|
void |
setInternalId(String internalId)
|
|
void |
setRevision(String revision)
Deprecated. |
|
String |
toString()
|
Methods inherited from class com.cumulocity.model.JSONBase |
---|
fromJSON, getJSONGenerator, getJSONParser, toJSON |
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 |
---|
public Document()
Method Detail |
---|
@JSONProperty(value="id", ignoreIfNull=true) @JSONConverter(type=IDTypeConverter.class) public T getId()
public void setId(T id)
@JSONProperty(value="_id", ignoreIfNull=true) public String getInternalId()
public void setInternalId(String internalId)
@Deprecated @JSONProperty(value="_rev", ignoreIfNull=true) public String getRevision()
@Deprecated public void setRevision(String revision)
@JSONProperty(ignore=true) public void set(Object object)
object
- @JSONProperty(ignore=true) public void set(Object object, String propertyName)
object
- propertyName
- @JSONProperty(ignore=true) public <C> void set(Object object, Class<C> clazz)
object
- clazz
- public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public <C> C get(Class<C> clazz)
clazz
-
set(Object)
public Object get(String name)
name
-
public Object getFragment(String name)
get(String name)
name
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |