Interface LogEntry
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
LogEntrySet.Cursor
This interface represents an entry in a
Log and provides getters and
setters for each of the supported
data types.
Unless stated otherwise, instances are only intended for short-term usage
since they are mostly backed by a cursor on a LogEntrySet and that
cursor's position might change.
- Author:
- Patrick Schmidt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longGenerated ID for serialisation. -
Method Summary
Modifier and TypeMethodDescriptionget(int columnIndex) Returns the value of the specified column.Returns the value of the specified column.booleangetBoolean(int columnIndex) Returns the value of the specified column.booleangetBoolean(String columnName) Returns the value of the specified column.bytegetByte(int columnIndex) Returns the value of the specified column.byteReturns the value of the specified column.doublegetDouble(int columnIndex) Returns the value of the specified column.doubleReturns the value of the specified column.getEntrySet(int columnIndex) Returns the value of the specified column.getEntrySet(String columnName) Returns the value of the specified column.floatgetFloat(int columnIndex) Returns the value of the specified column.floatReturns the value of the specified column.longgetID()Returns the ID of this log entry orLong.MIN_VALUEif this entry has no associated ID.intgetInteger(int columnIndex) Returns the value of the specified column.intgetInteger(String columnName) Returns the value of the specified column.longgetLong(int columnIndex) Returns the value of the specified column.longReturns the value of the specified column.Returns the schema of this log entry.shortgetShort(int columnIndex) Returns the value of the specified column.shortReturns the value of the specified column.getString(int columnIndex) Returns the value of the specified column.Returns the value of the specified column.getTimestamp(int columnIndex) Returns the value of the specified column.getTimestamp(String columnName) Returns the value of the specified column.getUUID(int columnIndex) Returns the value of the specified column.Returns the value of the specified column.booleanisNull(int columnIndex) Returns whether the value of the specified column isnull.booleanReturns whether the value of the specified column isnull.voidsetBoolean(int columnIndex, boolean value) Sets the value of the specified column.voidsetBoolean(String columnName, boolean value) Sets the value of the specified column.voidsetByte(int columnIndex, byte value) Sets the value of the specified column.voidSets the value of the specified column.voidsetDouble(int columnIndex, double value) Sets the value of the specified column.voidSets the value of the specified column.voidsetEntrySet(int columnIndex, LogEntrySet value) Sets the value of the specified column.voidsetEntrySet(String columnName, LogEntrySet value) Sets the value of the specified column.voidsetFloat(int columnIndex, float value) Sets the value of the specified column.voidSets the value of the specified column.voidsetID(long id) Sets the ID of this log entry orLong.MIN_VALUEif this entry has no associated ID.voidsetInteger(int columnIndex, int value) Sets the value of the specified column.voidsetInteger(String columnName, int value) Sets the value of the specified column.voidsetLong(int columnIndex, long value) Sets the value of the specified column.voidSets the value of the specified column.voidsetNull(int columnIndex) Sets the value of the specified column tonull.voidSets the value of the specified column tonull.voidsetShort(int columnIndex, short value) Sets the value of the specified column.voidSets the value of the specified column.voidSets the value of the specified column.voidSets the value of the specified column.voidsetTimestamp(int columnIndex, Timestamp value) Sets the value of the specified column.voidsetTimestamp(String columnName, Timestamp value) Sets the value of the specified column.voidSets the value of the specified column.voidSets the value of the specified column.
-
Field Details
-
serialVersionUID
static final long serialVersionUIDGenerated ID for serialisation.- See Also:
-
-
Method Details
-
getSchema
Schema getSchema()Returns the schema of this log entry.- Returns:
- the schema of this log entry
-
getID
long getID()Returns the ID of this log entry orLong.MIN_VALUEif this entry has no associated ID. The ID uniquely identifies a log entry (or the entry of a complex column).These IDs are created from a sequence in ascending order. I.e. they allow a more fine-grained temporal ordering, since timestamps may sometimes be inadequate. Some DBMSs may not support sub-second precision, and while
System.currentTimeMillis()may support millisecond precision it does often not support millisecond accuracy. I.e. logged entries with only a few milliseconds between them may receive the same timestamp.- Returns:
- the ID of this log entry or
Long.MIN_VALUE
-
setID
void setID(long id) Sets the ID of this log entry orLong.MIN_VALUEif this entry has no associated ID.- Parameters:
id- the ID of this log entry orLong.MIN_VALUE
-
get
Returns the value of the specified column.- Parameters:
columnIndex- the column's index- Returns:
- the column's value which may be
null
-
get
Returns the value of the specified column.- Parameters:
columnName- the column's name- Returns:
- the column's value which may be
null
-
getBoolean
boolean getBoolean(int columnIndex) Returns the value of the specified column. The column's data type must beDataType.BOOLEAN.- Parameters:
columnIndex- the column's index- Returns:
- the column's value or
falseif the value isnull
-
getBoolean
Returns the value of the specified column. The column's data type must beDataType.BOOLEAN.- Parameters:
columnName- the column's name- Returns:
- the column's value or
falseif the value isnull
-
getByte
byte getByte(int columnIndex) Returns the value of the specified column. The column's data type must beDataType.BYTE.- Parameters:
columnIndex- the column's index- Returns:
- the column's value or
0if the value isnull
-
getByte
Returns the value of the specified column. The column's data type must beDataType.BYTE.- Parameters:
columnName- the column's name- Returns:
- the column's value or
0if the value isnull
-
getShort
short getShort(int columnIndex) Returns the value of the specified column. The column's data type must beDataType.SHORT.- Parameters:
columnIndex- the column's index- Returns:
- the column's value or
0if the value isnull
-
getShort
Returns the value of the specified column. The column's data type must beDataType.SHORT.- Parameters:
columnName- the column's name- Returns:
- the column's value or
0if the value isnull
-
getInteger
int getInteger(int columnIndex) Returns the value of the specified column. The column's data type must beDataType.INTEGER.- Parameters:
columnIndex- the column's index- Returns:
- the column's value or
0if the value isnull
-
getInteger
Returns the value of the specified column. The column's data type must beDataType.INTEGER.- Parameters:
columnName- the column's name- Returns:
- the column's value or
0if the value isnull
-
getLong
long getLong(int columnIndex) Returns the value of the specified column. The column's data type must beDataType.LONG.- Parameters:
columnIndex- the column's index- Returns:
- the column's value or
0if the value isnull
-
getLong
Returns the value of the specified column. The column's data type must beDataType.LONG.- Parameters:
columnName- the column's name- Returns:
- the column's value or
0if the value isnull
-
getFloat
float getFloat(int columnIndex) Returns the value of the specified column. The column's data type must beDataType.FLOAT.- Parameters:
columnIndex- the column's index- Returns:
- the column's value or
0if the value isnull
-
getFloat
Returns the value of the specified column. The column's data type must beDataType.FLOAT.- Parameters:
columnName- the column's name- Returns:
- the column's value or
0if the value isnull
-
getDouble
double getDouble(int columnIndex) Returns the value of the specified column. The column's data type must beDataType.DOUBLE.- Parameters:
columnIndex- the column's index- Returns:
- the column's value or
0if the value isnull
-
getDouble
Returns the value of the specified column. The column's data type must beDataType.DOUBLE.- Parameters:
columnName- the column's name- Returns:
- the column's value or
0if the value isnull
-
getString
Returns the value of the specified column. The column's data type must beDataType.STRING.- Parameters:
columnIndex- the column's index- Returns:
- the column's value
-
getString
Returns the value of the specified column. The column's data type must beDataType.STRING.- Parameters:
columnName- the column's name- Returns:
- the column's value
-
getUUID
Returns the value of the specified column. The column's data type must beDataType.UUID.- Parameters:
columnIndex- the column's index- Returns:
- the column's value
-
getUUID
Returns the value of the specified column. The column's data type must beDataType.UUID.- Parameters:
columnName- the column's name- Returns:
- the column's value
-
getTimestamp
Returns the value of the specified column. The column's data type must beDataType.TIMESTAMP.- Parameters:
columnIndex- the column's index- Returns:
- the column's value
-
getTimestamp
Returns the value of the specified column. The column's data type must beDataType.TIMESTAMP.- Parameters:
columnName- the column's name- Returns:
- the column's value
-
getEntrySet
Returns the value of the specified column. The column's data type must beDataType.COMPLEX.- Parameters:
columnIndex- the column's index- Returns:
- the column's value
-
getEntrySet
Returns the value of the specified column. The column's data type must beDataType.COMPLEX.- Parameters:
columnName- the column's name- Returns:
- the column's value
-
isNull
boolean isNull(int columnIndex) Returns whether the value of the specified column isnull.- Parameters:
columnIndex- the column's index- Returns:
- whether the value of the specified column is
null
-
isNull
Returns whether the value of the specified column isnull.- Parameters:
columnName- the column's name- Returns:
- whether the value of the specified column is
null
-
setBoolean
void setBoolean(int columnIndex, boolean value) Sets the value of the specified column. The column's data type must beDataType.BOOLEAN.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setBoolean
Sets the value of the specified column. The column's data type must beDataType.BOOLEAN.- Parameters:
columnName- the column's namevalue- the new value
-
setByte
void setByte(int columnIndex, byte value) Sets the value of the specified column. The column's data type must beDataType.BYTE.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setByte
Sets the value of the specified column. The column's data type must beDataType.BYTE.- Parameters:
columnName- the column's namevalue- the new value
-
setShort
void setShort(int columnIndex, short value) Sets the value of the specified column. The column's data type must beDataType.SHORT.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setShort
Sets the value of the specified column. The column's data type must beDataType.SHORT.- Parameters:
columnName- the column's namevalue- the new value
-
setInteger
void setInteger(int columnIndex, int value) Sets the value of the specified column. The column's data type must beDataType.INTEGER.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setInteger
Sets the value of the specified column. The column's data type must beDataType.INTEGER.- Parameters:
columnName- the column's namevalue- the new value
-
setLong
void setLong(int columnIndex, long value) Sets the value of the specified column. The column's data type must beDataType.LONG.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setLong
Sets the value of the specified column. The column's data type must beDataType.LONG.- Parameters:
columnName- the column's namevalue- the new value
-
setFloat
void setFloat(int columnIndex, float value) Sets the value of the specified column. The column's data type must beDataType.FLOAT.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setFloat
Sets the value of the specified column. The column's data type must beDataType.FLOAT.- Parameters:
columnName- the column's namevalue- the new value
-
setDouble
void setDouble(int columnIndex, double value) Sets the value of the specified column. The column's data type must beDataType.DOUBLE.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setDouble
Sets the value of the specified column. The column's data type must beDataType.DOUBLE.- Parameters:
columnName- the column's namevalue- the new value
-
setString
Sets the value of the specified column. The column's data type must beDataType.STRING.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setString
Sets the value of the specified column. The column's data type must beDataType.STRING.- Parameters:
columnName- the column's namevalue- the new value
-
setUUID
Sets the value of the specified column. The column's data type must beDataType.UUID.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setUUID
Sets the value of the specified column. The column's data type must beDataType.UUID.- Parameters:
columnName- the column's namevalue- the new value
-
setTimestamp
Sets the value of the specified column. The column's data type must beDataType.TIMESTAMP.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setTimestamp
Sets the value of the specified column. The column's data type must beDataType.TIMESTAMP.- Parameters:
columnName- the column's namevalue- the new value
-
setEntrySet
Sets the value of the specified column. The column's data type must beDataType.COMPLEX.- Parameters:
columnIndex- the column's indexvalue- the new value
-
setEntrySet
Sets the value of the specified column. The column's data type must beDataType.COMPLEX.- Parameters:
columnName- the column's namevalue- the new value
-
setNull
void setNull(int columnIndex) Sets the value of the specified column tonull.- Parameters:
columnIndex- the column's index
-
setNull
Sets the value of the specified column tonull.- Parameters:
columnName- the column's name
-