Class BasicDataset
java.lang.Object
com.inductiveautomation.ignition.common.AbstractDataset
com.inductiveautomation.ignition.common.BasicDataset
- All Implemented Interfaces:
Dataset
,Serializable
- Direct Known Subclasses:
ColumnAttributesDataSet
,JsonDataset
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object[][]
protected static XMLReaderPool
XML Reader pool used for deserializing xml serialized dataFields inherited from class com.inductiveautomation.ignition.common.AbstractDataset
_columnNamesLowercase, columnNames, columnTypes, qualityCodes
-
Constructor Summary
ConstructorsConstructorDescriptionBasicDataset
(Dataset copy) BasicDataset
(String[] columnNames, Class<?>[] columnTypes, Object[][] data) BasicDataset
(List<String> columnNames, List<Class<?>> columnTypes) Constructor that takes all of the information needed to create a populated dataset.BasicDataset
(List<String> columnNames, List<Class<?>> columnTypes, Object[][] data, QualityCode[][] quality) BasicDataset
(List<String> columnNames, List<Class<?>> columnTypes, Object[][] data, DataQuality[][] quality) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionint
binarySearch
(int column, Object key) Performs a binary search on the specified column, looking for the specified key.boolean
columnContainsNulls
(int col) boolean
Object[][]
getData()
int
Return the number of rows in this datasetgetValueAt
(int row, int col) Returns the value in the dataset at the given location.void
This function was added in 1.5.5 to solve a dataset serialization problem.void
setColumnNames
(List<String> list) void
setColumnTypes
(List<Class<?>> list) void
Deprecated.void
setDataDirectly
(Object[][] list) Sets the data array, and fires a change event.void
void
setValueAt
(int row, int col, Object value) Not part of the public Dataset APItoString()
Methods inherited from class com.inductiveautomation.ignition.common.AbstractDataset
convertToQualityCodes, getAsXML, getBulkQualityCodes, getColumnCount, getColumnIndex, getColumnName, getColumnNames, getColumnType, getColumnTypes, getPrimitiveValueAt, getQualityAt, getValueAt, hasQualityData, 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 Details
-
xmlReaderPool
XML Reader pool used for deserializing xml serialized data -
data
-
-
Constructor Details
-
BasicDataset
public BasicDataset() -
BasicDataset
-
BasicDataset
Constructor that takes all of the information needed to create a populated dataset.- Parameters:
columnNames
- The column names of the dataset. Must match the length of columnTypes and data.lengthcolumnTypes
- The types of each column. Must match the length of columnNames and data.lengthdata
- The raw data. An array of columns of data. (NOT rows.)
-
BasicDataset
@Deprecated public BasicDataset(List<String> columnNames, List<Class<?>> columnTypes, Object[][] data, DataQuality[][] quality) Deprecated.Needed for deserialization backwards compatibility. Do not use this method for new code. -
BasicDataset
-
BasicDataset
-
BasicDataset
-
BasicDataset
-
-
Method Details
-
getValueAt
Description copied from interface:Dataset
Returns the value in the dataset at the given location. -
getRowCount
public int getRowCount()Description copied from interface:Dataset
Return the number of rows in this dataset -
setValueAt
Not part of the public Dataset API- Throws:
ClassCastException
-
binarySearch
Performs a binary search on the specified column, looking for the specified key. Column MUST be sorted in ascending order with NULL values LAST- 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.
-
setFromXML
-
getData
-
setDataDirectly
Sets the data array, and fires a change event. The data array of a Dataset is a double object array, with the first index indicating column, and the second indicating row.Returns:
-
setData
Deprecated.This setter function should ONLY BE CALLED DURING DE-SERIALIZATION, which means that you should NEVER CALL THIS FUNCTION DIRECTLY.- See Also:
-
setAllDirectly
This function was added in 1.5.5 to solve a dataset serialization problem. On a component that starts out with a non-null dataset, during de-serialization, the three set functions were called on that dataset. This caused three fireChange()s, with the first two causing the dataset to be in an inconsistent state. See the DataSetPersistenceDelegate. -
columnContainsNulls
public boolean columnContainsNulls(int col) -
datasetContainsNulls
public boolean datasetContainsNulls() -
toString
-
setColumnNames
- Overrides:
setColumnNames
in classAbstractDataset
-
setColumnTypes
- Overrides:
setColumnTypes
in classAbstractDataset
-