Class OptimizedDataSet
- java.lang.Object
-
- com.inductiveautomation.ignition.common.AbstractDataset
-
- com.inductiveautomation.ignition.client.gateway_interface.OptimizedDataSet
-
- All Implemented Interfaces:
Dataset
,java.io.Serializable
public class OptimizedDataSet extends AbstractDataset
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]
columns
protected static org.apache.log4j.Logger
log
protected static XMLReaderPool
xmlReaderPool
XML Reader pool used for deserializing xml serialized data-
Fields inherited from class com.inductiveautomation.ignition.common.AbstractDataset
_columnNamesLowercase, columnNames, columnTypes, qualityCodes
-
-
Constructor Summary
Constructors Constructor Description OptimizedDataSet()
OptimizedDataSet(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.Object[] columns)
Note: This constructor is used for serialization (see DataSetPersistenceDelegate)OptimizedDataSet(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.Object[] columns, QualityCode[][] quality)
OptimizedDataSet(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.Object[] columns, DataQuality[][] dataQualities)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
binarySearch(int column, java.lang.Object searchFor)
Performs a binary search on the specified column, looking for the specified key.byte[]
getByteColumn(int col)
Returns a primitive column.java.lang.Object[]
getColumns()
double[]
getDoubleColumn(int col)
Returns a primitive column.float[]
getFloatColumn(int col)
Returns a primitive column.int[]
getIntColumn(int col)
Returns a primitive column.long[]
getLongColumn(int col)
Returns a primitive column.double
getPrimitiveValueAt(int row, int col)
If the given column is a numeric type or a Date, then the value will be returned as a double.int
getRowCount()
Return the number of rows in this datasetshort[]
getShortColumn(int col)
Returns a primitive column.java.lang.Object
getValueAt(int row, int col)
Returns the value in the dataset at the given location.void
setFromXML(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.String encodedData, int rowCount)
java.lang.String
toString()
-
Methods inherited from class com.inductiveautomation.ignition.common.AbstractDataset
convertToQualityCodes, getAsXML, getBulkQualityCodes, getColumnCount, getColumnIndex, getColumnName, getColumnNames, getColumnType, getColumnTypes, getQualityAt, getValueAt, hasQualityData, setColumnNames, setColumnTypes, setDirty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.common.Dataset
getColumnAsList
-
-
-
-
Field Detail
-
xmlReaderPool
protected static XMLReaderPool xmlReaderPool
XML Reader pool used for deserializing xml serialized data
-
log
protected static org.apache.log4j.Logger log
-
columns
protected java.lang.Object[] columns
-
-
Constructor Detail
-
OptimizedDataSet
public OptimizedDataSet()
-
OptimizedDataSet
public OptimizedDataSet(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.Object[] columns)
Note: This constructor is used for serialization (see DataSetPersistenceDelegate)
-
OptimizedDataSet
public OptimizedDataSet(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.Object[] columns, QualityCode[][] quality)
-
OptimizedDataSet
@Deprecated public OptimizedDataSet(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.Object[] columns, DataQuality[][] dataQualities)
Deprecated.Deprecated due to use ofDataQuality
but required for deserialization of windows from versions 7.9 and prior.
-
-
Method Detail
-
setFromXML
public void setFromXML(java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class<?>> columnTypes, java.lang.String encodedData, int rowCount)
-
getColumns
public java.lang.Object[] getColumns()
-
getRowCount
public int getRowCount()
Description copied from interface:Dataset
Return the number of rows in this dataset
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
Description copied from interface:Dataset
Returns the value in the dataset at the given location.
-
getPrimitiveValueAt
public double getPrimitiveValueAt(int row, int col)
Description copied from class:AbstractDataset
If the given column is a numeric type or a Date, then the value will be returned as a double. The Chart uses this functionality to provide a seamless interface with the optimized dataset.- Specified by:
getPrimitiveValueAt
in interfaceDataset
- Overrides:
getPrimitiveValueAt
in classAbstractDataset
-
binarySearch
public int binarySearch(int column, java.lang.Object searchFor)
Description copied from interface:Dataset
Performs a binary search on the specified column, looking for the specified key. Column MUST be sorted in ascending order. Dataset provides an inefficient default implementation of binary search that allocates a new array list for the entire column.- Returns:
- index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees the return value will be greater than or equal to 0, but only if the key is found.
-
getIntColumn
public int[] getIntColumn(int col)
Returns a primitive column. USE AT YOUR OWN RISK - no checking is performed to ensure data is the correct type.
-
getDoubleColumn
public double[] getDoubleColumn(int col)
Returns a primitive column. USE AT YOUR OWN RISK - no checking is performed to ensure data is the correct type.
-
getLongColumn
public long[] getLongColumn(int col)
Returns a primitive column. USE AT YOUR OWN RISK - no checking is performed to ensure data is the correct type.
-
getFloatColumn
public float[] getFloatColumn(int col)
Returns a primitive column. USE AT YOUR OWN RISK - no checking is performed to ensure data is the correct type.
-
getByteColumn
public byte[] getByteColumn(int col)
Returns a primitive column. USE AT YOUR OWN RISK - no checking is performed to ensure data is the correct type.
-
getShortColumn
public short[] getShortColumn(int col)
Returns a primitive column. USE AT YOUR OWN RISK - no checking is performed to ensure data is the correct type.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-