Interface LogEntry

All Superinterfaces:
Serializable
All Known Subinterfaces:
LogEntrySet.Cursor

public interface LogEntry extends Serializable
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

    Fields
    Modifier and Type
    Field
    Description
    static final long
    Generated ID for serialisation.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int columnIndex)
    Returns the value of the specified column.
    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.
    getEntrySet(int columnIndex)
    Returns the value of the specified column.
    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
    Returns the ID of this log entry or Long.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.
    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.
    getString(int columnIndex)
    Returns the value of the specified column.
    getString(String columnName)
    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.
    getUUID(String columnName)
    Returns the value of the specified column.
    boolean
    isNull(int columnIndex)
    Returns whether the value of the specified column is null.
    boolean
    isNull(String columnName)
    Returns whether the value of the specified column is null.
    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 or Long.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 to null.
    void
    setNull(String columnName)
    Sets the value of the specified column to null.
    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 Details

    • serialVersionUID

      static final long serialVersionUID
      Generated 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 or Long.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 or Long.MIN_VALUE if this entry has no associated ID.
      Parameters:
      id - the ID of this log entry or Long.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 be DataType.BOOLEAN.
      Parameters:
      columnIndex - the column's index
      Returns:
      the column's value or false if the value is null
    • getBoolean

      boolean getBoolean(String columnName)
      Returns the value of the specified column. The column's data type must be DataType.BOOLEAN.
      Parameters:
      columnName - the column's name
      Returns:
      the column's value or false if the value is null
    • getByte

      byte getByte(int columnIndex)
      Returns the value of the specified column. The column's data type must be DataType.BYTE.
      Parameters:
      columnIndex - the column's index
      Returns:
      the column's value or 0 if the value is null
    • getByte

      byte getByte(String columnName)
      Returns the value of the specified column. The column's data type must be DataType.BYTE.
      Parameters:
      columnName - the column's name
      Returns:
      the column's value or 0 if the value is null
    • getShort

      short getShort(int columnIndex)
      Returns the value of the specified column. The column's data type must be DataType.SHORT.
      Parameters:
      columnIndex - the column's index
      Returns:
      the column's value or 0 if the value is null
    • getShort

      short getShort(String columnName)
      Returns the value of the specified column. The column's data type must be DataType.SHORT.
      Parameters:
      columnName - the column's name
      Returns:
      the column's value or 0 if the value is null
    • getInteger

      int getInteger(int columnIndex)
      Returns the value of the specified column. The column's data type must be DataType.INTEGER.
      Parameters:
      columnIndex - the column's index
      Returns:
      the column's value or 0 if the value is null
    • getInteger

      int getInteger(String columnName)
      Returns the value of the specified column. The column's data type must be DataType.INTEGER.
      Parameters:
      columnName - the column's name
      Returns:
      the column's value or 0 if the value is null
    • getLong

      long getLong(int columnIndex)
      Returns the value of the specified column. The column's data type must be DataType.LONG.
      Parameters:
      columnIndex - the column's index
      Returns:
      the column's value or 0 if the value is null
    • getLong

      long getLong(String columnName)
      Returns the value of the specified column. The column's data type must be DataType.LONG.
      Parameters:
      columnName - the column's name
      Returns:
      the column's value or 0 if the value is null
    • getFloat

      float getFloat(int columnIndex)
      Returns the value of the specified column. The column's data type must be DataType.FLOAT.
      Parameters:
      columnIndex - the column's index
      Returns:
      the column's value or 0 if the value is null
    • getFloat

      float getFloat(String columnName)
      Returns the value of the specified column. The column's data type must be DataType.FLOAT.
      Parameters:
      columnName - the column's name
      Returns:
      the column's value or 0 if the value is null
    • getDouble

      double getDouble(int columnIndex)
      Returns the value of the specified column. The column's data type must be DataType.DOUBLE.
      Parameters:
      columnIndex - the column's index
      Returns:
      the column's value or 0 if the value is null
    • getDouble

      double getDouble(String columnName)
      Returns the value of the specified column. The column's data type must be DataType.DOUBLE.
      Parameters:
      columnName - the column's name
      Returns:
      the column's value or 0 if the value is null
    • getString

      String getString(int columnIndex)
      Returns the value of the specified column. The column's data type must be DataType.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 be DataType.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 be DataType.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 be DataType.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 be DataType.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 be DataType.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 be DataType.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 be DataType.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 is null.
      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 is null.
      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 be DataType.BOOLEAN.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setBoolean

      void setBoolean(String columnName, boolean value)
      Sets the value of the specified column. The column's data type must be DataType.BOOLEAN.
      Parameters:
      columnName - the column's name
      value - the new value
    • setByte

      void setByte(int columnIndex, byte value)
      Sets the value of the specified column. The column's data type must be DataType.BYTE.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setByte

      void setByte(String columnName, byte value)
      Sets the value of the specified column. The column's data type must be DataType.BYTE.
      Parameters:
      columnName - the column's name
      value - the new value
    • setShort

      void setShort(int columnIndex, short value)
      Sets the value of the specified column. The column's data type must be DataType.SHORT.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setShort

      void setShort(String columnName, short value)
      Sets the value of the specified column. The column's data type must be DataType.SHORT.
      Parameters:
      columnName - the column's name
      value - the new value
    • setInteger

      void setInteger(int columnIndex, int value)
      Sets the value of the specified column. The column's data type must be DataType.INTEGER.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setInteger

      void setInteger(String columnName, int value)
      Sets the value of the specified column. The column's data type must be DataType.INTEGER.
      Parameters:
      columnName - the column's name
      value - the new value
    • setLong

      void setLong(int columnIndex, long value)
      Sets the value of the specified column. The column's data type must be DataType.LONG.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setLong

      void setLong(String columnName, long value)
      Sets the value of the specified column. The column's data type must be DataType.LONG.
      Parameters:
      columnName - the column's name
      value - the new value
    • setFloat

      void setFloat(int columnIndex, float value)
      Sets the value of the specified column. The column's data type must be DataType.FLOAT.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setFloat

      void setFloat(String columnName, float value)
      Sets the value of the specified column. The column's data type must be DataType.FLOAT.
      Parameters:
      columnName - the column's name
      value - the new value
    • setDouble

      void setDouble(int columnIndex, double value)
      Sets the value of the specified column. The column's data type must be DataType.DOUBLE.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setDouble

      void setDouble(String columnName, double value)
      Sets the value of the specified column. The column's data type must be DataType.DOUBLE.
      Parameters:
      columnName - the column's name
      value - the new value
    • setString

      void setString(int columnIndex, String value)
      Sets the value of the specified column. The column's data type must be DataType.STRING.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setString

      void setString(String columnName, String value)
      Sets the value of the specified column. The column's data type must be DataType.STRING.
      Parameters:
      columnName - the column's name
      value - the new value
    • setUUID

      void setUUID(int columnIndex, UUID value)
      Sets the value of the specified column. The column's data type must be DataType.UUID.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setUUID

      void setUUID(String columnName, UUID value)
      Sets the value of the specified column. The column's data type must be DataType.UUID.
      Parameters:
      columnName - the column's name
      value - the new value
    • setTimestamp

      void setTimestamp(int columnIndex, Timestamp value)
      Sets the value of the specified column. The column's data type must be DataType.TIMESTAMP.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setTimestamp

      void setTimestamp(String columnName, Timestamp value)
      Sets the value of the specified column. The column's data type must be DataType.TIMESTAMP.
      Parameters:
      columnName - the column's name
      value - the new value
    • setEntrySet

      void setEntrySet(int columnIndex, LogEntrySet value)
      Sets the value of the specified column. The column's data type must be DataType.COMPLEX.
      Parameters:
      columnIndex - the column's index
      value - the new value
    • setEntrySet

      void setEntrySet(String columnName, LogEntrySet value)
      Sets the value of the specified column. The column's data type must be DataType.COMPLEX.
      Parameters:
      columnName - the column's name
      value - the new value
    • setNull

      void setNull(int columnIndex)
      Sets the value of the specified column to null.
      Parameters:
      columnIndex - the column's index
    • setNull

      void setNull(String columnName)
      Sets the value of the specified column to null.
      Parameters:
      columnName - the column's name