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

java.lang.Object
  extended byorg.apache.derby.impl.store.logical.operations.LogicalOperationFactory

public class LogicalOperationFactory
extends java.lang.Object

The LoicalOperationFactory is used to create LogicalOperations according to their type (UPDATE, INSERT, DELETE, COMMIT or ABORT)

Author:
Egil S¿rensen

Method Summary
static LogicalOperationFactory getInstance()
          Gets the active LogicalOperationFactory.
 LogicalOperation makeOperation(LogicalImage beforeImage, LogicalImage afterImage, org.apache.derby.iapi.types.DataValueDescriptor oldKey, org.apache.derby.iapi.types.DataValueDescriptor newKey, java.lang.String tableName, int type)
          Makes a LogicalOperation using the providing information
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LogicalOperationFactory getInstance()
Gets the active LogicalOperationFactory. Ensures that there is only one active LogicalOperationFactory at all times.

Returns:
The active logicalOperationFactory

makeOperation

public LogicalOperation makeOperation(LogicalImage beforeImage,
                                      LogicalImage afterImage,
                                      org.apache.derby.iapi.types.DataValueDescriptor oldKey,
                                      org.apache.derby.iapi.types.DataValueDescriptor newKey,
                                      java.lang.String tableName,
                                      int type)
                               throws org.apache.derby.iapi.error.StandardException
Makes a LogicalOperation using the providing information

Parameters:
beforeImage - the before image of the operation
afterImage - the after image of the operation
oldKey - the old key of the affected row
newKey - the new key of the affected row
tableName - the name of the affected table
type - the type of the operation
Returns:
returns a new LogicalOperation of the correct type
Throws:
org.apache.derby.iapi.error.StandardException - if the provided type is not recognized a StandardException is thrown