org.h2.log
Class UndoLogRecord

java.lang.Object
  extended by org.h2.log.UndoLogRecord

public class UndoLogRecord
extends java.lang.Object

An entry in a undo log.


Field Summary
static short DELETE
          Operation type meaning the row was deleted.
static short INSERT
          Operation type meaning the row was inserted.
 
Constructor Summary
UndoLogRecord(Table table, short op, Row row)
          Create a new undo log record
 
Method Summary
 void commit()
          This method is called after the operation was committed.
 Row getRow()
          Get the row that was deleted or inserted.
 Table getTable()
          Get the table.
 void undo(Session session)
          Un-do the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSERT

public static final short INSERT
Operation type meaning the row was inserted.

See Also:
Constant Field Values

DELETE

public static final short DELETE
Operation type meaning the row was deleted.

See Also:
Constant Field Values
Constructor Detail

UndoLogRecord

public UndoLogRecord(Table table,
                     short op,
                     Row row)
Create a new undo log record

Parameters:
table - the table
op - the operation type
row - the row that was deleted or inserted
Method Detail

undo

public void undo(Session session)
          throws java.sql.SQLException
Un-do the operation. If the row was inserted before, it is deleted now, and vice versa.

Parameters:
session - the session
Throws:
java.sql.SQLException

getTable

public Table getTable()
Get the table.

Returns:
the table

commit

public void commit()
            throws java.sql.SQLException
This method is called after the operation was committed. It commits the change to the indexes.

Throws:
java.sql.SQLException

getRow

public Row getRow()
Get the row that was deleted or inserted.

Returns:
the row