Class ChangeRepresentation
- java.lang.Object
-
- com.cumulocity.rest.representation.BaseResourceRepresentation
-
- com.cumulocity.rest.representation.AbstractExtensibleRepresentation
-
- com.cumulocity.rest.representation.audit.ChangeRepresentation
-
- All Implemented Interfaces:
ResourceRepresentation,org.svenson.DynamicProperties
public class ChangeRepresentation extends AbstractExtensibleRepresentation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChangeRepresentation.ChangeRepresentationBuilderstatic classChangeRepresentation.ChangeType
-
Constructor Summary
Constructors Constructor Description ChangeRepresentation()ChangeRepresentation(String attribute, String type, Object previousValue, Object newValue)ChangeRepresentation(String attribute, String type, Object previousValue, Object newValue, ChangeRepresentation.ChangeType changeType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChangeRepresentation.ChangeRepresentationBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)StringgetAttribute()ChangeRepresentation.ChangeTypegetChangeType()ObjectgetNewValue()ObjectgetPreviousValue()StringgetType()inthashCode()voidsetAttribute(String attribute)voidsetChangeType(ChangeRepresentation.ChangeType changeType)voidsetNewValue(Object current)voidsetPreviousValue(Object previous)voidsetType(String type)StringtoString()-
Methods inherited from class com.cumulocity.rest.representation.AbstractExtensibleRepresentation
get, get, getAttrs, getProperty, hasProperty, propertyNames, removeProperty, set, set, set, setAttrs, setProperty
-
Methods inherited from class com.cumulocity.rest.representation.BaseResourceRepresentation
getSelf, getSelfDecoded, setSelf, toJSON
-
-
-
-
Constructor Detail
-
ChangeRepresentation
public ChangeRepresentation(String attribute, String type, Object previousValue, Object newValue)
-
ChangeRepresentation
public ChangeRepresentation()
-
ChangeRepresentation
public ChangeRepresentation(String attribute, String type, Object previousValue, Object newValue, ChangeRepresentation.ChangeType changeType)
-
-
Method Detail
-
getChangeType
@JSONProperty(ignoreIfNull=true) public ChangeRepresentation.ChangeType getChangeType()
-
getType
public String getType()
-
setType
public void setType(String type)
-
getAttribute
public String getAttribute()
-
setAttribute
public void setAttribute(String attribute)
-
getPreviousValue
@JSONConverter(type=AuditChangeValueConverter.class) public Object getPreviousValue()
-
setPreviousValue
public void setPreviousValue(Object previous)
-
getNewValue
@JSONConverter(type=AuditChangeValueConverter.class) public Object getNewValue()
-
setNewValue
public void setNewValue(Object current)
-
toString
public String toString()
- Overrides:
toStringin classBaseResourceRepresentation
-
builder
public static ChangeRepresentation.ChangeRepresentationBuilder builder()
-
canEqual
protected boolean canEqual(Object other)
-
setChangeType
public void setChangeType(ChangeRepresentation.ChangeType changeType)
-
-