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 Summary
Constructors -
Method Summary
Modifier 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.DataTableView
getName, getQuery, getRows, getRowsImpl, getSite, getTable, getTableEntity, isRowsSet, setName, setQuery, setTable
-
Constructor Details
-
SnapTableView
public SnapTableView()
-
-
Method Details
-
getQueryTemplate
Returns the query used to build actual query (may contain parameter names instead of values). -
setQueryTemplate
Sets the query used to build actual query (may contain parameter names instead of values). -
createQuery
Creates the default query, substituting parameter values if it contains parameter keys.- Overrides:
createQueryin classDataTableView
-
getParameterCount
public int getParameterCount()Return the number of parameters. -
getParameter
Return the individual parameter. -
getParameters
Returns the list of parameters. -
setParameters
Sets a list of parameters. -
addParameter
Adds a parameter. -
removeParameter
Removes a parameter at given index. -
removeParameter
Removes a given parameter from parameters list. -
getParameter
Returns the named parameter. -
getParameterValue
Returns the current parameter value for given parameter name. -
setParameterValue
Sets the current parameter value for given parameter name. -
getViewEntity
Returns the view entity. -
createViewEntity
Returns the view entity - a modified version of the underlying table entity to include query relation + properties. -
getQueryEntity
Returns the query entity. -
createQueryEntity
Returns the query parameters entity. -
createRow
Creates a new row. -
addRow
Override to clear filtered rows.- Overrides:
addRowin classDataTableView
-
removeRow
Override to clear filtered rows.- Overrides:
removeRowin classDataTableView
-
getFilter
Returns the filter string. -
setFilter
Sets the filter string. -
getFilteredRows
Returns the list of filtered rows. -
refresh
public void refresh()Reloads rows.- Overrides:
refreshin classDataTableView
-
propertyChange
Catches changes to condition and properties and forwards on.- Specified by:
propertyChangein interfacePropertyChangeListener
-
addPropertyChangeListener
Add a property change listener. -
removePropertyChangeListener
Remove a property change listener. -
firePropertyChange
Fires a property change. -
firePropertyChange
Fires a property change. -
getJSONKeys
RMJSONArchiver.GetKeys method.- Specified by:
getJSONKeysin interfaceRMJSONArchiver.GetKeys
-
toString
Standard toString implementation.
-