Package com.inductiveautomation.snap.web
Class Row
- All Implemented Interfaces:
- RMJSONArchiver.GetKeys,- RMJSONArchiver.GetValue,- RMJSONArchiver.SetValue,- PropertyChangeListener,- Serializable,- Cloneable,- EventListener,- Map<String,- Object> 
- Direct Known Subclasses:
- SnapRow
public class Row
extends HashMap<String,Object>
implements PropertyChangeListener, RMJSONArchiver.GetKeys, RMJSONArchiver.GetValue, RMJSONArchiver.SetValue 
Represents a data bearing object from a WebSite.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds an object to a list at given index.voidAdds an object to a list at given index.voidaddPropertyChangeListener(PropertyChangeListener aListener) Add a property change listener.protected RowReturns the row this row was loaded from or the original state of this row.voiddelete()Deletes this row.booleanOverride to just check identity, since rows are unique.protected voidfirePropertyChange(String aPropName, Object anOldVal, Object aNewVal, int anIndex) Fires a property change.Returns the current row value for key.Returns the current row value for key.Returns the current row value for key.Returns the entity that describes the data in this row.booleanReturns whether file exists in data source (has been saved and, if so, not deleted).RMJSONArchiver method to return keys in property order and, potentially, NewValues key.getJSONValue(String aKey) RMJSONArchiver method to get archiver values via getValue() and handle NewValues.longReturns the file modification time.Returns the original state of this row (or null if row not modified).Returns the primary property.getProperty(String aName) Returns the named property.protected ObjectReturns the current value or RowLink for a key.getSite()Returns the WebSite that created this row.Row[]Returns an array of relation rows for this row that don't have a primary key value.Returns the current row value for key.Returns the current row value for key.voidinitValues(Map aMap) Initialize row values from map (or Entity default values).booleanReturns whether this row's row object has been changed.voidpropertyChange(PropertyChangeEvent anEvent) PropertyChangeListener method to propagate changes from row object to row.Override put to do conversion.Put value by string.Removes an object from list at given index.Removes an object from a list at given index.voidRemove a property change listener.voidsave()Saves this row.voidSets the entity that describes the data in this row.protected voidsetExists(boolean aFlag) Sets whether file exists in data source (has been saved and, if so, not deleted).voidsetJSONValue(String aKey, Object aValue) RMJSONArchiver method to put archiver values and handle NewValues.protected voidsetModified(boolean aValue) Sets whether this row's row object has been changed.voidsetModifiedTime(long aTime) Sets the file modification time.protected voidSets the WebSite that created this row.toString()Standard toString implementation.Methods inherited from class java.util.HashMapclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMaphashCode
- 
Constructor Details- 
Rowpublic Row()
 
- 
- 
Method Details- 
getSiteReturns the WebSite that created this row.
- 
setSiteSets the WebSite that created this row.
- 
getEntityReturns the entity that describes the data in this row.
- 
setEntitySets the entity that describes the data in this row.
- 
getPropertyReturns the named property.
- 
getPrimaryValueReturns the primary property.
- 
initValuesInitialize row values from map (or Entity default values).
- 
getReturns the current row value for key. If key is a relation, return value as an Row or List <Row>>.
- 
getReturns the current row value for key. If key is a relation, return value as a Row or List <Row>>.
- 
getReturns the current row value for key. If key is a relation, return value as a Row or List <Row>>.
- 
getValueReturns the current row value for key.
- 
getValueReturns the current row value for key.
- 
getRawReturns the current value or RowLink for a key.
- 
putPut value by string.
- 
putOverride put to do conversion.
- 
getOriginalReturns the original state of this row (or null if row not modified).
- 
createOriginalReturns the row this row was loaded from or the original state of this row.
- 
getUnresolvedRelationRowsReturns an array of relation rows for this row that don't have a primary key value.
- 
addAdds an object to a list at given index.
- 
addAdds an object to a list at given index.
- 
removeRemoves an object from a list at given index.
- 
removeRemoves an object from list at given index.
- 
getExistspublic boolean getExists()Returns whether file exists in data source (has been saved and, if so, not deleted).
- 
setExistsprotected void setExists(boolean aFlag) Sets whether file exists in data source (has been saved and, if so, not deleted).
- 
getModifiedTimepublic long getModifiedTime()Returns the file modification time.
- 
setModifiedTimepublic void setModifiedTime(long aTime) Sets the file modification time.
- 
isModifiedpublic boolean isModified()Returns whether this row's row object has been changed.
- 
setModifiedprotected void setModified(boolean aValue) Sets whether this row's row object has been changed.
- 
savepublic void save()Saves this row.
- 
deletepublic void delete()Deletes this row.
- 
propertyChangePropertyChangeListener method to propagate changes from row object to row.- Specified by:
- propertyChangein interface- PropertyChangeListener
 
- 
addPropertyChangeListenerAdd a property change listener.
- 
removePropertyChangeListenerRemove a property change listener.
- 
firePropertyChangeFires a property change.
- 
getJSONKeysRMJSONArchiver method to return keys in property order and, potentially, NewValues key.- Specified by:
- getJSONKeysin interface- RMJSONArchiver.GetKeys
 
- 
getJSONValueRMJSONArchiver method to get archiver values via getValue() and handle NewValues.- Specified by:
- getJSONValuein interface- RMJSONArchiver.GetValue
 
- 
setJSONValueRMJSONArchiver method to put archiver values and handle NewValues.- Specified by:
- setJSONValuein interface- RMJSONArchiver.SetValue
 
- 
equalsOverride to just check identity, since rows are unique.
- 
toStringStandard toString implementation.- Overrides:
- toStringin class- AbstractMap<String,- Object> 
 
 
-