public class DataRow extends HashMap<String,Object>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
protected String |
entityName |
protected long |
replacesVersion |
protected long |
version |
Constructor and Description |
---|
DataRow(int initialCapacity) |
DataRow(Map<String,?> map) |
Modifier and Type | Method and Description |
---|---|
DataRow |
applyDiff(DataRow diff)
Builds a new DataRow, merging changes from
diff parameter with data
contained in this DataRow. |
DataRow |
createDiff(DataRow row)
Creates a DataRow that contains only the keys that have values that differ between
this object and
row parameter. |
ObjectId |
createTargetObjectId(String entityName,
DbRelationship relationship)
Returns an ObjectId of an object on the other side of the to-one relationship, for
this DataRow representing a source of relationship.
|
String |
getEntityName() |
long |
getReplacesVersion() |
long |
getVersion() |
void |
setEntityName(String entityName) |
void |
setReplacesVersion(long replacesVersion)
Sets the version of DataRow replaced by this one in the store.
|
String |
toString() |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode
protected long version
protected long replacesVersion
protected String entityName
public long getVersion()
public long getReplacesVersion()
public void setReplacesVersion(long replacesVersion)
public DataRow applyDiff(DataRow diff)
diff
parameter with data
contained in this DataRow.public DataRow createDiff(DataRow row)
row
parameter. Diff values are taken from the
row
parameter. It is assumed that key sets are compatible in both rows
(e.g. they represent snapshots for the same entity). Returns null if no differences
are found.public ObjectId createTargetObjectId(String entityName, DbRelationship relationship)
public String toString()
toString
in class AbstractMap<String,Object>
public String getEntityName()
public void setEntityName(String entityName)
Copyright © 2001–2018 Apache Cayenne. All rights reserved.