Interface LogEntry
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
LogEntrySet.Cursor
public interface LogEntry extends Serializable
This interface represents an entry in aLog
and provides getters and setters for each of the supporteddata 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
Fields Modifier and Type Field Description static long
serialVersionUID
Generated ID for serialisation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
get(int columnIndex)
Returns the value of the specified column.Object
get(String columnName)
Returns the value of the specified column.boolean
getBoolean(int columnIndex)
Returns the value of the specified column.boolean
getBoolean(String columnName)
Returns the value of the specified column.byte
getByte(int columnIndex)
Returns the value of the specified column.byte
getByte(String columnName)
Returns the value of the specified column.double
getDouble(int columnIndex)
Returns the value of the specified column.double
getDouble(String columnName)
Returns the value of the specified column.LogEntrySet
getEntrySet(int columnIndex)
Returns the value of the specified column.LogEntrySet
getEntrySet(String columnName)
Returns the value of the specified column.float
getFloat(int columnIndex)
Returns the value of the specified column.float
getFloat(String columnName)
Returns the value of the specified column.long
getID()
Returns the ID of this log entry orLong.MIN_VALUE
if this entry has no associated ID.int
getInteger(int columnIndex)
Returns the value of the specified column.int
getInteger(String columnName)
Returns the value of the specified column.long
getLong(int columnIndex)
Returns the value of the specified column.long
getLong(String columnName)
Returns the value of the specified column.Schema
getSchema()
Returns the schema of this log entry.short
getShort(int columnIndex)
Returns the value of the specified column.short
getShort(String columnName)
Returns the value of the specified column.String
getString(int columnIndex)
Returns the value of the specified column.String
getString(String columnName)
Returns the value of the specified column.Timestamp
getTimestamp(int columnIndex)
Returns the value of the specified column.Timestamp
getTimestamp(String columnName)
Returns the value of the specified column.UUID
getUUID(int columnIndex)
Returns the value of the specified column.UUID
getUUID(String columnName)
Returns the value of the specified column.boolean
isNull(int columnIndex)
Returns whether the value of the specified column isnull
.boolean
isNull(String columnName)
Returns whether the value of the specified column isnull
.void
setBoolean(int columnIndex, boolean value)
Sets the value of the specified column.void
setBoolean(String columnName, boolean value)
Sets the value of the specified column.void
setByte(int columnIndex, byte value)
Sets the value of the specified column.void
setByte(String columnName, byte value)
Sets the value of the specified column.void
setDouble(int columnIndex, double value)
Sets the value of the specified column.void
setDouble(String columnName, double value)
Sets the value of the specified column.void
setEntrySet(int columnIndex, LogEntrySet value)
Sets the value of the specified column.void
setEntrySet(String columnName, LogEntrySet value)
Sets the value of the specified column.void
setFloat(int columnIndex, float value)
Sets the value of the specified column.void
setFloat(String columnName, float value)
Sets the value of the specified column.void
setID(long id)
Sets the ID of this log entry orLong.MIN_VALUE
if this entry has no associated ID.void
setInteger(int columnIndex, int value)
Sets the value of the specified column.void
setInteger(String columnName, int value)
Sets the value of the specified column.void
setLong(int columnIndex, long value)
Sets the value of the specified column.void
setLong(String columnName, long value)
Sets the value of the specified column.void
setNull(int columnIndex)
Sets the value of the specified column tonull
.void
setNull(String columnName)
Sets the value of the specified column tonull
.void
setShort(int columnIndex, short value)
Sets the value of the specified column.void
setShort(String columnName, short value)
Sets the value of the specified column.void
setString(int columnIndex, String value)
Sets the value of the specified column.void
setString(String columnName, String value)
Sets the value of the specified column.void
setTimestamp(int columnIndex, Timestamp value)
Sets the value of the specified column.void
setTimestamp(String columnName, Timestamp value)
Sets the value of the specified column.void
setUUID(int columnIndex, UUID value)
Sets the value of the specified column.void
setUUID(String columnName, UUID value)
Sets the value of the specified column.
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
Generated ID for serialisation.- See Also:
- Constant Field Values
-
-
Method Detail
-
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_VALUE
if 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_VALUE
if this entry has no associated ID.- Parameters:
id
- the ID of this log entry orLong.MIN_VALUE
-
get
Object get(int columnIndex)
Returns the value of the specified column.- Parameters:
columnIndex
- the column's index- Returns:
- the column's value which may be
null
-
get
Object get(String columnName)
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
false
if the value isnull
-
getBoolean
boolean getBoolean(String columnName)
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
false
if 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
0
if the value isnull
-
getByte
byte getByte(String columnName)
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
0
if 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
0
if the value isnull
-
getShort
short getShort(String columnName)
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
0
if 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
0
if the value isnull
-
getInteger
int getInteger(String columnName)
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
0
if 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
0
if the value isnull
-
getLong
long getLong(String columnName)
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
0
if 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
0
if the value isnull
-
getFloat
float getFloat(String columnName)
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
0
if 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
0
if the value isnull
-
getDouble
double getDouble(String columnName)
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
0
if the value isnull
-
getString
String getString(int columnIndex)
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
String getString(String columnName)
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
UUID getUUID(int columnIndex)
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
UUID getUUID(String columnName)
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
Timestamp getTimestamp(int columnIndex)
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
Timestamp getTimestamp(String columnName)
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
LogEntrySet getEntrySet(int columnIndex)
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
LogEntrySet getEntrySet(String columnName)
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
boolean isNull(String columnName)
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
void setBoolean(String columnName, boolean value)
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
void setByte(String columnName, byte value)
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
void setShort(String columnName, short value)
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
void setInteger(String columnName, int value)
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
void setLong(String columnName, long value)
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
void setFloat(String columnName, float value)
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
void setDouble(String columnName, double value)
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
void setString(int columnIndex, String value)
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
void setString(String columnName, String value)
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
void setUUID(int columnIndex, UUID value)
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
void setUUID(String columnName, UUID value)
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
void setTimestamp(int columnIndex, Timestamp value)
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
void setTimestamp(String columnName, Timestamp value)
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
void setEntrySet(int columnIndex, LogEntrySet value)
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
void setEntrySet(String columnName, LogEntrySet value)
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
void setNull(String columnName)
Sets the value of the specified column tonull
.- Parameters:
columnName
- the column's name
-
-