Class Diff<T>
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.difference.Diff<T>
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,Serializable
- Direct Known Subclasses:
EntityDefDiff,EntityRelationshipDefDiff,FieldDefDiff,IndexDefDiff,IndexFieldDefDiff,PropertyDiff,RecordDiff,SchemaDefDiff
A node in a tree of differences: whether a named value was added, removed, changed or left unchanged,
with its old and new values and the diffs of its children.
- See Also:
-
Field Summary
Fields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a child diff, changing this diff's type fromDiffType.NONEtoDiffType.CHANGEDif the child is not NONE.addChildProperty(DiffType type, String name, Object oldValue, Object newValue) Adds aPropertyDiffchild built from the arguments, updating this diff's type asaddChild(Diff)does.Diff<?> fromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).Diff<?> getChildByName(String name) Returns the first child with the given name (case-sensitive), ornullif there is none.getName()getType()setNewValue(T newValue) setOldValue(T oldValue) toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.Methods inherited from class com.northconcepts.datapipeline.foundations.core.Bean
addExceptionProperties, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exceptionMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
fromXml, fromXml, fromXmlElement, toXml, toXml, toXml, toXml, toXml, toXmlElement
-
Constructor Details
-
Diff
public Diff() -
Diff
-
-
Method Details
-
getType
-
setType
-
getName
-
setName
-
getChildren
-
getChildByName
Returns the first child with the given name (case-sensitive), ornullif there is none. -
addChild
Adds a child diff, changing this diff's type fromDiffType.NONEtoDiffType.CHANGEDif the child is not NONE. -
addChildProperty
Adds aPropertyDiffchild built from the arguments, updating this diff's type asaddChild(Diff)does. -
getOldValue
-
setOldValue
-
getNewValue
-
setNewValue
-
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classBean- Parameters:
source-- Returns:
- this instance.
-