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 class
ChangeRepresentation.ChangeRepresentationBuilder
static class
ChangeRepresentation.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.ChangeRepresentationBuilder
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getAttribute()
ChangeRepresentation.ChangeType
getChangeType()
Object
getNewValue()
Object
getPreviousValue()
String
getType()
int
hashCode()
void
setAttribute(String attribute)
void
setChangeType(ChangeRepresentation.ChangeType changeType)
void
setNewValue(Object current)
void
setPreviousValue(Object previous)
void
setType(String type)
String
toString()
-
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:
toString
in classBaseResourceRepresentation
-
builder
public static ChangeRepresentation.ChangeRepresentationBuilder builder()
-
canEqual
protected boolean canEqual(Object other)
-
setChangeType
public void setChangeType(ChangeRepresentation.ChangeType changeType)
-
-