Class Query
- java.lang.Object
- 
- com.inductiveautomation.rm.base.RMListenerList
- 
- com.inductiveautomation.rm.base.RMObject
- 
- com.inductiveautomation.snap.data.Query
 
 
 
- 
- All Implemented Interfaces:
- RMJSONArchiver.GetKeys,- RMPropertyChanger,- java.beans.PropertyChangeListener,- java.lang.Cloneable,- java.util.EventListener
 
 public class Query extends RMObject implements RMJSONArchiver.GetKeys, java.beans.PropertyChangeListener An object to fetch a dataset from a data source entity with a set condition and parameters.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringCondition_Propstatic java.lang.StringSort_Prop
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryaddCondition(Condition aCondition)Adds a condition to query.QueryaddCondition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue)Adds a condition to query for given property name, operator and value.voidaddSort(Sort aSort)Adds a sort or sorts to list.voidaddSort(Sort aSort, int anIndex)Adds a sort at given index.Queryclone()Standard clone implementation.booleanequals(java.lang.Object anObj)Standard equals implementation.ConditiongetCondition()Returns the condition.java.lang.StringgetEntityName()Returns the data source entity name.intgetFetchLimit()Returns the fetch limit.intgetFetchLimitDefault()Returns the fetch limit default (Integer.MAX_VALUE).java.util.List<java.lang.String>getJSONKeys()RMJSONArchiver.GetKeys method.intgetSortCount()Returns the number of sorts.java.util.List<Sort>getSorts()Returns the list of sorts.voidpropertyChange(java.beans.PropertyChangeEvent anEvent)Implement PropertyChangeListener method to forward on.SortremoveSort(int anIndex)Removes a sort at given index.intremoveSort(Sort aSort)Removes given sort.voidsetCondition(Condition aCondition)Sets the condition.voidsetEntityName(java.lang.String anEntityName)Sets the data source entity name.voidsetFetchLimit(int aValue)Sets the fetch limit.voidsetSorts(java.util.List<Sort> theSorts)Sets the list of sorts.java.lang.StringtoString()Returns a string representation of query.- 
Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Field Detail- 
Condition_Proppublic static final java.lang.String Condition_Prop - See Also:
- Constant Field Values
 
 - 
Sort_Proppublic static final java.lang.String Sort_Prop - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Querypublic Query() Creates a new query.
 - 
Querypublic Query(java.lang.String anEntityName) Creates a new query with given entity name.
 - 
Querypublic Query(Entity anEntity) Creates a new query with given entity.
 
- 
 - 
Method Detail- 
getEntityNamepublic java.lang.String getEntityName() Returns the data source entity name.
 - 
setEntityNamepublic void setEntityName(java.lang.String anEntityName) Sets the data source entity name.
 - 
getConditionpublic Condition getCondition() Returns the condition.
 - 
setConditionpublic void setCondition(Condition aCondition) Sets the condition.
 - 
addConditionpublic Query addCondition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue) Adds a condition to query for given property name, operator and value.
 - 
getFetchLimitpublic int getFetchLimit() Returns the fetch limit.
 - 
setFetchLimitpublic void setFetchLimit(int aValue) Sets the fetch limit.
 - 
getFetchLimitDefaultpublic int getFetchLimitDefault() Returns the fetch limit default (Integer.MAX_VALUE).
 - 
getSortCountpublic int getSortCount() Returns the number of sorts.
 - 
getSortspublic java.util.List<Sort> getSorts() Returns the list of sorts.
 - 
setSortspublic void setSorts(java.util.List<Sort> theSorts) Sets the list of sorts.
 - 
addSortpublic void addSort(Sort aSort) Adds a sort or sorts to list.
 - 
addSortpublic void addSort(Sort aSort, int anIndex) Adds a sort at given index.
 - 
removeSortpublic Sort removeSort(int anIndex) Removes a sort at given index.
 - 
removeSortpublic int removeSort(Sort aSort) Removes given sort.
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.- Overrides:
- equalsin class- java.lang.Object
 
 - 
propertyChangepublic void propertyChange(java.beans.PropertyChangeEvent anEvent) Implement PropertyChangeListener method to forward on.- Specified by:
- propertyChangein interface- java.beans.PropertyChangeListener
 
 - 
clonepublic Query clone() Standard clone implementation.- Overrides:
- clonein class- RMListenerList
 
 - 
getJSONKeyspublic java.util.List<java.lang.String> getJSONKeys() RMJSONArchiver.GetKeys method.- Specified by:
- getJSONKeysin interface- RMJSONArchiver.GetKeys
 
 
- 
 
-