Class BasicHistoricalRecord
java.lang.Object
com.inductiveautomation.ignition.gateway.storeforward.data.history.BasicHistoricalRecord
- All Implemented Interfaces:
PersistentData
The basic historical record represents a specific query with columns of data.
It contains both the data and the table structure, including columns.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<HistoricalColumn>
static final PersistentFlavor<BasicHistoricalRecord>
protected String
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(HistoricalColumn column) Adds a pre-defined column to the row.void
Creates a value column with the given name.void
addColumn
(String name, QualifiedValue value) Adds a column with data to the row.void
coalesce
(BasicHistoricalRecord other) Coalesces the provided BasicHistoricalRecord into this record.coalesce
(List<BasicHistoricalRecord> other) Coalesces the provided list of BasicHistoricalRecord objects into this record.boolean
int
This returns the number of rows for this historical record.PersistentFlavor<? extends BasicHistoricalRecord>
Retrieves thePersistentFlavor
associated with this kind of persistent data.getQuery
(DBTranslator translator) Returns an SQL INSERT statement for this record, using the provided translator to generate the necessary comma-separated columns.Returns the table structure for the historical record.int
hashCode()
toString()
-
Field Details
-
FLAVOR
-
columns
-
tableName
-
loggerName
-
-
Constructor Details
-
BasicHistoricalRecord
-
BasicHistoricalRecord
-
-
Method Details
-
getFlavor
Description copied from interface:PersistentData
Retrieves thePersistentFlavor
associated with this kind of persistent data.- Specified by:
getFlavor
in interfacePersistentData
- Returns:
- a
PersistentFlavor
object
-
getColumns
-
addColumn
Adds a pre-defined column to the row. This allows the caller to provide a custom column type, or use something besides the standard ValueHistoricalColumn. -
addColumn
Creates a value column with the given name. Values must be added later with addRow. -
addColumn
Adds a column with data to the row. Quickest way to build a single row HistoricalRecord. -
addRow
-
getStructureSignature
Returns the table structure for the historical record. The expected output string should be "table_name{column_1, column_2, ..., column_x}- Returns:
- A string representing the table structure for the historical record.
-
getDataCount
public int getDataCount()This returns the number of rows for this historical record.- Specified by:
getDataCount
in interfacePersistentData
- Returns:
- the count of data elements
-
getLoggerName
-
getTableName
-
coalesce
Coalesces the provided BasicHistoricalRecord into this record.- Parameters:
other
- the record to coalesce- Returns:
- a new BasicHistoricalRecord representing the combined data of this and the provided record
-
coalesce
Coalesces the provided list of BasicHistoricalRecord objects into this record.- Parameters:
other
- the records to coalesce- Returns:
- a new BasicHistoricalRecord representing the combined data of this and the provided records
-
getQuery
Returns an SQL INSERT statement for this record, using the provided translator to generate the necessary comma-separated columns.- Parameters:
translator
- the DBTranslator used to generate the comma-separated columns- Returns:
- the SQL INSERT statement
-
toString
-
equals
-
hashCode
public int hashCode()
-