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.voidAdds a sort or sorts to list.voidAdds a sort at given index.clone()Standard clone implementation.booleanStandard equals implementation.Returns the condition.Returns the data source entity name.intReturns the fetch limit.intReturns the fetch limit default (Integer.MAX_VALUE).RMJSONArchiver.GetKeys method.intReturns the number of sorts.getSorts()Returns the list of sorts.voidpropertyChange(PropertyChangeEvent anEvent) Implement PropertyChangeListener method to forward on.removeSort(int anIndex) Removes a sort at given index.intremoveSort(Sort aSort) Removes given sort.voidsetCondition(Condition aCondition) Sets the condition.voidsetEntityName(String anEntityName) Sets the data source entity name.voidsetFetchLimit(int aValue) Sets the fetch limit.voidSets 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, sendPropertyChangeMethods 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:
propertyChangein interfacePropertyChangeListener
-
clone
Standard clone implementation.- Overrides:
clonein classRMListenerList
-
getJSONKeys
RMJSONArchiver.GetKeys method.- Specified by:
getJSONKeysin interfaceRMJSONArchiver.GetKeys
-
toString
Returns a string representation of query.
-