Interface LogEntry
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
LogEntrySet.Cursor
public interface LogEntry extends Serializable
This interface represents an entry in aLogand 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
LogEntrySetand that cursor's position might change.- Author:
- Patrick Schmidt
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUIDGenerated ID for serialisation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectget(int columnIndex)Returns the value of the specified column.Objectget(String columnName)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.bytegetByte(String columnName)Returns the value of the specified column.doublegetDouble(int columnIndex)Returns the value of the specified column.doublegetDouble(String columnName)Returns the value of the specified column.LogEntrySetgetEntrySet(int columnIndex)Returns the value of the specified column.LogEntrySetgetEntrySet(String columnName)Returns the value of the specified column.floatgetFloat(int columnIndex)Returns the value of the specified column.floatgetFloat(String columnName)Returns 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.longgetLong(String columnName)Returns the value of the specified column.SchemagetSchema()Returns the schema of this log entry.shortgetShort(int columnIndex)Returns the value of the specified column.shortgetShort(String columnName)Returns the value of the specified column.StringgetString(int columnIndex)Returns the value of the specified column.StringgetString(String columnName)Returns the value of the specified column.TimestampgetTimestamp(int columnIndex)Returns the value of the specified column.TimestampgetTimestamp(String columnName)Returns the value of the specified column.UUIDgetUUID(int columnIndex)Returns the value of the specified column.UUIDgetUUID(String columnName)Returns the value of the specified column.booleanisNull(int columnIndex)Returns whether the value of the specified column isnull.booleanisNull(String columnName)Returns 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.voidsetByte(String columnName, byte value)Sets the value of the specified column.voidsetDouble(int columnIndex, double value)Sets the value of the specified column.voidsetDouble(String columnName, double value)Sets 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.voidsetFloat(String columnName, float value)Sets 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.voidsetLong(String columnName, long value)Sets the value of the specified column.voidsetNull(int columnIndex)Sets the value of the specified column tonull.voidsetNull(String columnName)Sets the value of the specified column tonull.voidsetShort(int columnIndex, short value)Sets the value of the specified column.voidsetShort(String columnName, short value)Sets the value of the specified column.voidsetString(int columnIndex, String value)Sets the value of the specified column.voidsetString(String columnName, String value)Sets 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.voidsetUUID(int columnIndex, UUID value)Sets the value of the specified column.voidsetUUID(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_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
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
falseif 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
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
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
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
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
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
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
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
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
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
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
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
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
0if 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
-
-