org.apache.derby.impl.store.logical.operations
Class LogicalOperation

java.lang.Object
  extended byorg.apache.derby.impl.store.logical.operations.LogicalOperation
All Implemented Interfaces:
LogicalLoggable, java.io.Serializable
Direct Known Subclasses:
LogicalAbortOperation, LogicalCommitOperation, LogicalDeleteOperation, LogicalInsertOperation, LogicalUpdateOperation

public abstract class LogicalOperation
extends java.lang.Object
implements LogicalLoggable

A class representing the logical operation done in a logical log record

Author:
Egil S¿rensen
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.derby.iapi.store.logical.log.LogicalLoggable
ABORT_OPERATION, COMMIT_OPERATION, DELETE_OPERATION, INSERT_OPERATION, UPDATE_OPERATION
 
Constructor Summary
LogicalOperation(LogicalImage beforeImage, LogicalImage afterImage, org.apache.derby.iapi.types.DataValueDescriptor oldKey, org.apache.derby.iapi.types.DataValueDescriptor newKey, java.lang.String tableName)
          Constructor to create a logical operation
 
Method Summary
 org.apache.derby.iapi.types.DataValueDescriptor getNewKey()
           
 org.apache.derby.iapi.types.DataValueDescriptor getOldKey()
           
 LogicalImage getRedoImage()
           
 java.lang.String getTableName()
           
 LogicalImage getUndoImage()
           
 int group()
           
 boolean isRedoable()
           
 boolean isUndoable()
           
 int redoMe(java.sql.Connection conn)
          Redo this operation
 java.lang.String toString()
           
 int undoMe(java.sql.Connection conn)
          Undo this operation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogicalOperation

public LogicalOperation(LogicalImage beforeImage,
                        LogicalImage afterImage,
                        org.apache.derby.iapi.types.DataValueDescriptor oldKey,
                        org.apache.derby.iapi.types.DataValueDescriptor newKey,
                        java.lang.String tableName)
Constructor to create a logical operation

Parameters:
beforeImage - the before image of the affected row
afterImage - the after image of the affected row
oldKey - the old key of the affected row
newKey - the new key of the affected row
tableName - the name of the affected table
Method Detail

getNewKey

public org.apache.derby.iapi.types.DataValueDescriptor getNewKey()
Specified by:
getNewKey in interface LogicalLoggable

getOldKey

public org.apache.derby.iapi.types.DataValueDescriptor getOldKey()
Specified by:
getOldKey in interface LogicalLoggable

getRedoImage

public LogicalImage getRedoImage()
Specified by:
getRedoImage in interface LogicalLoggable

getTableName

public java.lang.String getTableName()
Specified by:
getTableName in interface LogicalLoggable

getUndoImage

public LogicalImage getUndoImage()
Specified by:
getUndoImage in interface LogicalLoggable

group

public int group()
Specified by:
group in interface LogicalLoggable

isRedoable

public boolean isRedoable()
Specified by:
isRedoable in interface LogicalLoggable

isUndoable

public boolean isUndoable()
Specified by:
isUndoable in interface LogicalLoggable

redoMe

public int redoMe(java.sql.Connection conn)
           throws java.sql.SQLException
Redo this operation

Specified by:
redoMe in interface LogicalLoggable
Throws:
java.sql.SQLException

undoMe

public int undoMe(java.sql.Connection conn)
           throws java.sql.SQLException
Undo this operation

Specified by:
undoMe in interface LogicalLoggable
Throws:
java.sql.SQLException

toString

public java.lang.String toString()