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
,PropertyChangeListener
,Cloneable
,EventListener
An object to fetch a dataset from a data source entity with a set condition and parameters.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCondition
(Condition aCondition) Adds a condition to query.addCondition
(String aPropertyName, Condition.Operator anOperator, Object aValue) Adds a condition to query for given property name, operator and value.void
Adds a sort or sorts to list.void
Adds a sort at given index.clone()
Standard clone implementation.boolean
Standard equals implementation.Returns the condition.Returns the data source entity name.int
Returns the fetch limit.int
Returns the fetch limit default (Integer.MAX_VALUE).RMJSONArchiver.GetKeys method.int
Returns the number of sorts.getSorts()
Returns the list of sorts.void
propertyChange
(PropertyChangeEvent anEvent) Implement PropertyChangeListener method to forward on.removeSort
(int anIndex) Removes a sort at given index.int
removeSort
(Sort aSort) Removes given sort.void
setCondition
(Condition aCondition) Sets the condition.void
setEntityName
(String anEntityName) Sets the data source entity name.void
setFetchLimit
(int aValue) Sets the fetch limit.void
Sets the list of sorts.toString()
Returns a string representation of query.Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Field Details
-
Condition_Prop
- See Also:
-
Sort_Prop
- See Also:
-
-
Constructor Details
-
Query
public Query()Creates a new query. -
Query
Creates a new query with given entity name. -
Query
Creates a new query with given entity.
-
-
Method Details
-
getEntityName
Returns the data source entity name. -
setEntityName
Sets the data source entity name. -
getCondition
Returns the condition. -
setCondition
Sets the condition. -
addCondition
Adds a condition to query. -
addCondition
Adds a condition to query for given property name, operator and value. -
getFetchLimit
public int getFetchLimit()Returns the fetch limit. -
setFetchLimit
public void setFetchLimit(int aValue) Sets the fetch limit. -
getFetchLimitDefault
public int getFetchLimitDefault()Returns the fetch limit default (Integer.MAX_VALUE). -
getSortCount
public int getSortCount()Returns the number of sorts. -
getSorts
Returns the list of sorts. -
setSorts
Sets the list of sorts. -
addSort
Adds a sort or sorts to list. -
addSort
Adds a sort at given index. -
removeSort
Removes a sort at given index. -
removeSort
Removes given sort. -
equals
Standard equals implementation. -
propertyChange
Implement PropertyChangeListener method to forward on.- Specified by:
propertyChange
in interfacePropertyChangeListener
-
clone
Standard clone implementation.- Overrides:
clone
in classRMListenerList
-
getJSONKeys
RMJSONArchiver.GetKeys method.- Specified by:
getJSONKeys
in interfaceRMJSONArchiver.GetKeys
-
toString
Returns a string representation of query.
-