Class SnapTableView
java.lang.Object
com.inductiveautomation.snap.web.DataTableView
com.inductiveautomation.snap.filedata.SnapTableView
- All Implemented Interfaces:
- RMJSONArchiver.GetKeys,- PropertyChangeListener,- EventListener
public class SnapTableView
extends DataTableView
implements RMJSONArchiver.GetKeys, PropertyChangeListener
A class to represent a dataset generated from a table, a query and query parameters.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddParameter(Property aParameter) Adds a parameter.voidAdd a property change listener.protected voidOverride to clear filtered rows.protected QueryCreates the default query, substituting parameter values if it contains parameter keys.protected EntityReturns the query parameters entity.Creates a new row.protected EntityReturns the view entity - a modified version of the underlying table entity to include query relation + properties.protected voidfirePropertyChange(PropertyChangeEvent anEvent) Fires a property change.protected voidfirePropertyChange(String aPropName, Object anOldVal, Object aNewVal, int anIndex) Fires a property change.Returns the filter string.Returns the list of filtered rows.RMJSONArchiver.GetKeys method.getParameter(int anIndex) Return the individual parameter.getParameter(String aName) Returns the named parameter.intReturn the number of parameters.Returns the list of parameters.getParameterValue(String aName) Returns the current parameter value for given parameter name.Returns the query entity.Returns the query used to build actual query (may contain parameter names instead of values).Returns the view entity.voidpropertyChange(PropertyChangeEvent anEvent) Catches changes to condition and properties and forwards on.voidrefresh()Reloads rows.removeParameter(int anIndex) Removes a parameter at given index.intremoveParameter(Property aParameter) Removes a given parameter from parameters list.voidRemove a property change listener.protected voidOverride to clear filtered rows.voidSets the filter string.voidsetParameters(List<Property> theParameters) Sets a list of parameters.voidsetParameterValue(String aName, Object aValue) Sets the current parameter value for given parameter name.voidsetQueryTemplate(Query aQuery) Sets the query used to build actual query (may contain parameter names instead of values).toString()Standard toString implementation.Methods inherited from class com.inductiveautomation.snap.web.DataTableViewgetName, getQuery, getRows, getRowsImpl, getSite, getTable, getTableEntity, isRowsSet, setName, setQuery, setTable
- 
Constructor Details- 
SnapTableViewpublic SnapTableView()
 
- 
- 
Method Details- 
getQueryTemplateReturns the query used to build actual query (may contain parameter names instead of values).
- 
setQueryTemplateSets the query used to build actual query (may contain parameter names instead of values).
- 
createQueryCreates the default query, substituting parameter values if it contains parameter keys.- Overrides:
- createQueryin class- DataTableView
 
- 
getParameterCountpublic int getParameterCount()Return the number of parameters.
- 
getParameterReturn the individual parameter.
- 
getParametersReturns the list of parameters.
- 
setParametersSets a list of parameters.
- 
addParameterAdds a parameter.
- 
removeParameterRemoves a parameter at given index.
- 
removeParameterRemoves a given parameter from parameters list.
- 
getParameterReturns the named parameter.
- 
getParameterValueReturns the current parameter value for given parameter name.
- 
setParameterValueSets the current parameter value for given parameter name.
- 
getViewEntityReturns the view entity.
- 
createViewEntityReturns the view entity - a modified version of the underlying table entity to include query relation + properties.
- 
getQueryEntityReturns the query entity.
- 
createQueryEntityReturns the query parameters entity.
- 
createRowCreates a new row.
- 
addRowOverride to clear filtered rows.- Overrides:
- addRowin class- DataTableView
 
- 
removeRowOverride to clear filtered rows.- Overrides:
- removeRowin class- DataTableView
 
- 
getFilterReturns the filter string.
- 
setFilterSets the filter string.
- 
getFilteredRowsReturns the list of filtered rows.
- 
refreshpublic void refresh()Reloads rows.- Overrides:
- refreshin class- DataTableView
 
- 
propertyChangeCatches changes to condition and properties and forwards on.- Specified by:
- propertyChangein interface- PropertyChangeListener
 
- 
addPropertyChangeListenerAdd a property change listener.
- 
removePropertyChangeListenerRemove a property change listener.
- 
firePropertyChangeFires a property change.
- 
firePropertyChangeFires a property change.
- 
getJSONKeysRMJSONArchiver.GetKeys method.- Specified by:
- getJSONKeysin interface- RMJSONArchiver.GetKeys
 
- 
toStringStandard toString implementation.
 
-