Class AlarmQueryResultImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<AlarmEvent>
-
- com.inductiveautomation.ignition.common.alarming.query.AlarmQueryResultImpl
-
- All Implemented Interfaces:
AlarmQueryResult
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<AlarmEvent>
,java.util.Collection<AlarmEvent>
,java.util.List<AlarmEvent>
,java.util.RandomAccess
public class AlarmQueryResultImpl extends java.util.ArrayList<AlarmEvent> implements AlarmQueryResult, java.io.Serializable
Returns a Dataset derived from an AlarmEvent query. TheDataset
is comprised of Primitive types to avoid exposing users to internal types.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DISPLAY_PATH
static int
EVENT_ID
static int
EVENT_STATE
static int
EVENT_TIME
static int
IS_SYSTEM_EVENT
static int
PRIORITY
static int
SOURCE
-
Constructor Summary
Constructors Constructor Description AlarmQueryResultImpl(boolean isHistory)
AlarmQueryResultImpl(AlarmQueryResult copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Dataset
buildAssociatedData(AlarmEvent evt)
Builds a dataset from associated data.protected Dataset
buildDS()
static AlarmQueryResult
buildFrom(java.util.List<AlarmQueryResult> results)
Combines multiple results into a single one.Dataset
getAssociatedData(java.lang.String uuid)
Returns the associated data of an event as a dataset.Dataset
getDataset()
Returns the alarms as a dataset.AlarmEvent
getEvent(java.lang.String uuid)
Returns the actual AlarmEvent object for the specified event uuid.protected Property[]
getPropertiesForDS()
Gets an array of the column property types for the dataset.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Field Detail
-
EVENT_ID
public static final int EVENT_ID
- See Also:
- Constant Field Values
-
SOURCE
public static final int SOURCE
- See Also:
- Constant Field Values
-
DISPLAY_PATH
public static final int DISPLAY_PATH
- See Also:
- Constant Field Values
-
EVENT_TIME
public static final int EVENT_TIME
- See Also:
- Constant Field Values
-
EVENT_STATE
public static final int EVENT_STATE
- See Also:
- Constant Field Values
-
PRIORITY
public static final int PRIORITY
- See Also:
- Constant Field Values
-
IS_SYSTEM_EVENT
public static final int IS_SYSTEM_EVENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AlarmQueryResultImpl
public AlarmQueryResultImpl(boolean isHistory)
-
AlarmQueryResultImpl
public AlarmQueryResultImpl(AlarmQueryResult copy)
-
-
Method Detail
-
buildFrom
public static AlarmQueryResult buildFrom(java.util.List<AlarmQueryResult> results)
Combines multiple results into a single one. If the incoming set is only one element, it is returned directly. *
-
getDataset
public Dataset getDataset()
Description copied from interface:AlarmQueryResult
Returns the alarms as a dataset. The specific columns depend on whether this is the result of a status query, or history query.
History: EventId, Source, DisplayPath, EventTime, EventState, Priority, IsSystemEvent
Status: EventId, Source, DisplayPath, EventTime, State, Priority- Specified by:
getDataset
in interfaceAlarmQueryResult
-
getAssociatedData
public Dataset getAssociatedData(java.lang.String uuid)
Description copied from interface:AlarmQueryResult
Returns the associated data of an event as a dataset. The columns are [PropertyName, Value]- Specified by:
getAssociatedData
in interfaceAlarmQueryResult
-
getEvent
public AlarmEvent getEvent(java.lang.String uuid)
Description copied from interface:AlarmQueryResult
Returns the actual AlarmEvent object for the specified event uuid.- Specified by:
getEvent
in interfaceAlarmQueryResult
-
getPropertiesForDS
protected Property[] getPropertiesForDS()
Gets an array of the column property types for the dataset.- Returns:
- Property[] , an array consisting of the
CommonAlarmProperties
for the AlarmQueryResult dataset.
-
buildDS
protected Dataset buildDS()
-
buildAssociatedData
protected Dataset buildAssociatedData(AlarmEvent evt)
Builds a dataset from associated data.
-
-