Class BasicDataTransaction
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.history.sf.BasicDataTransaction
-
- All Implemented Interfaces:
DataTransaction
,GroupableData
,HistoricalData
,java.io.Serializable
public class BasicDataTransaction extends java.lang.Object implements DataTransaction, GroupableData
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BasicDataTransaction()
BasicDataTransaction(java.lang.String logger)
BasicDataTransaction(java.lang.String logger, HistoryFlavor flavor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addData(HistoricalData value)
java.util.List<HistoricalData>
getData()
int
getDataCount()
This is a fairly ambiguous number, but basically indicates how many rows will ultimately be inserted in the database.HistoryFlavor
getFlavor()
The very broad "flavor" designator, used to get the data to the correct sink.java.lang.String
getGroupId()
A string identifing the "group" of the data.java.lang.String
getLoggerName()
Returns the name of the logger that should be notified when something happens to this data.java.lang.String
getSignature()
The signature is a static string that describes this data as uniquely as possible.GroupableData
groupData(GroupableData other)
Merge another piece of similar data into this one.boolean
isEmpty()
void
setData(java.util.List<HistoricalData> data)
void
setFlavor(HistoryFlavor flavor)
void
setLoggerName(java.lang.String logger)
-
-
-
Constructor Detail
-
BasicDataTransaction
public BasicDataTransaction()
-
BasicDataTransaction
public BasicDataTransaction(java.lang.String logger)
-
BasicDataTransaction
public BasicDataTransaction(java.lang.String logger, HistoryFlavor flavor)
-
-
Method Detail
-
getSignature
public java.lang.String getSignature()
Description copied from interface:HistoricalData
The signature is a static string that describes this data as uniquely as possible. This will be used to group data in the data cache (for example, when displaying quarantined data), as well as uniquely identifying cacheable schemas, etc.Basically, the golden rule is that if two pieces of data have the same signature, the came from the same place, and are going to the same place, and in theory could be grouped together (note: they won't be, that is done with the
GroupableData
interface).- Specified by:
getSignature
in interfaceHistoricalData
-
getData
public java.util.List<HistoricalData> getData()
- Specified by:
getData
in interfaceDataTransaction
-
setData
public void setData(java.util.List<HistoricalData> data)
-
addData
public void addData(HistoricalData value)
-
getDataCount
public int getDataCount()
Description copied from interface:HistoricalData
This is a fairly ambiguous number, but basically indicates how many rows will ultimately be inserted in the database. Used for judging transaction size.- Specified by:
getDataCount
in interfaceHistoricalData
-
getFlavor
public HistoryFlavor getFlavor()
Description copied from interface:HistoricalData
The very broad "flavor" designator, used to get the data to the correct sink. That is, different sinks support different types of data, and this is used to match them up.- Specified by:
getFlavor
in interfaceHistoricalData
-
setFlavor
public void setFlavor(HistoryFlavor flavor)
-
getLoggerName
public java.lang.String getLoggerName()
Description copied from interface:HistoricalData
Returns the name of the logger that should be notified when something happens to this data. If null or empty, notifications won't occur (errors, however, may still be logged to the general logger).- Specified by:
getLoggerName
in interfaceHistoricalData
-
setLoggerName
public void setLoggerName(java.lang.String logger)
-
isEmpty
public boolean isEmpty()
-
getGroupId
public java.lang.String getGroupId()
Description copied from interface:GroupableData
A string identifing the "group" of the data. In other words, any piece of data from this group can be merged together.- Specified by:
getGroupId
in interfaceGroupableData
-
groupData
public GroupableData groupData(GroupableData other)
Description copied from interface:GroupableData
Merge another piece of similar data into this one.- Specified by:
groupData
in interfaceGroupableData
-
-