org.pentaho.di.core.undo
Class TransAction

java.lang.Object
  extended by org.pentaho.di.core.undo.TransAction

public class TransAction
extends Object

This class store undo and redo information... Possible changes to a transformation:

step

hop

note

connection

Build an Undo/Redo class containing:

Type of change

Description of action

Link to previous infomation

Since:
19-12-2003
Author:
Matt

Field Summary
static String[] desc_action
           
static int TYPE_ACTION_CHANGE_CLUSTER
           
static int TYPE_ACTION_CHANGE_CONNECTION
           
static int TYPE_ACTION_CHANGE_HOP
           
static int TYPE_ACTION_CHANGE_JOB_ENTRY
           
static int TYPE_ACTION_CHANGE_JOB_HOP
           
static int TYPE_ACTION_CHANGE_NOTE
           
static int TYPE_ACTION_CHANGE_PARTITION
           
static int TYPE_ACTION_CHANGE_RELATIONSHIP
           
static int TYPE_ACTION_CHANGE_SLAVE
           
static int TYPE_ACTION_CHANGE_STEP
           
static int TYPE_ACTION_CHANGE_TABLE
           
static int TYPE_ACTION_CHANGE_TABLEITEM
           
static int TYPE_ACTION_DELETE_CLUSTER
           
static int TYPE_ACTION_DELETE_CONNECTION
           
static int TYPE_ACTION_DELETE_HOP
           
static int TYPE_ACTION_DELETE_JOB_ENTRY
           
static int TYPE_ACTION_DELETE_JOB_HOP
           
static int TYPE_ACTION_DELETE_NOTE
           
static int TYPE_ACTION_DELETE_PARTITION
           
static int TYPE_ACTION_DELETE_RELATIONSHIP
           
static int TYPE_ACTION_DELETE_SLAVE
           
static int TYPE_ACTION_DELETE_STEP
           
static int TYPE_ACTION_DELETE_TABLE
           
static int TYPE_ACTION_DELETE_TABLEITEM
           
static int TYPE_ACTION_NEW_CLUSTER
           
static int TYPE_ACTION_NEW_CONNECTION
           
static int TYPE_ACTION_NEW_HOP
           
static int TYPE_ACTION_NEW_JOB_ENTRY
           
static int TYPE_ACTION_NEW_JOB_HOP
           
static int TYPE_ACTION_NEW_NOTE
           
static int TYPE_ACTION_NEW_PARTITION
           
static int TYPE_ACTION_NEW_RELATIONSHIP
           
static int TYPE_ACTION_NEW_SLAVE
           
static int TYPE_ACTION_NEW_STEP
           
static int TYPE_ACTION_NEW_TABLE
           
static int TYPE_ACTION_NEW_TABLEITEM
           
static int TYPE_ACTION_NONE
           
static int TYPE_ACTION_POSITION_JOB_ENTRY
           
static int TYPE_ACTION_POSITION_NOTE
           
static int TYPE_ACTION_POSITION_STEP
           
static int TYPE_ACTION_POSITION_TABLE
           
static int TYPE_ACTION_POSITION_TABLEITEM
           
 
Constructor Summary
TransAction()
           
 
Method Summary
 Object[] getCurrent()
           
 int[] getCurrentIndex()
           
 Point[] getCurrentLocation()
           
 boolean getNextAlso()
          Get the status of the nextAlso flag.
 Object[] getPrevious()
           
 int[] getPreviousIndex()
           
 Point[] getPreviousLocation()
           
 int getType()
           
 void setChanged(Object[] prev, Object[] curr, int[] idx)
           
 void setDelete(Object[] prev, int[] idx)
           
 void setItemMove(int[] prev, int[] curr)
           
 void setNew(Object[] prev, int[] position)
           
 void setNextAlso(boolean nextAlso)
          Indicate that the next operations needs to be undone too.
 void setPosition(Object[] obj, int[] idx, Point[] prev, Point[] curr)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_ACTION_NONE

public static final int TYPE_ACTION_NONE
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_STEP

public static final int TYPE_ACTION_CHANGE_STEP
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_CONNECTION

public static final int TYPE_ACTION_CHANGE_CONNECTION
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_HOP

public static final int TYPE_ACTION_CHANGE_HOP
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_NOTE

public static final int TYPE_ACTION_CHANGE_NOTE
See Also:
Constant Field Values

TYPE_ACTION_NEW_STEP

public static final int TYPE_ACTION_NEW_STEP
See Also:
Constant Field Values

TYPE_ACTION_NEW_CONNECTION

public static final int TYPE_ACTION_NEW_CONNECTION
See Also:
Constant Field Values

TYPE_ACTION_NEW_HOP

public static final int TYPE_ACTION_NEW_HOP
See Also:
Constant Field Values

TYPE_ACTION_NEW_NOTE

public static final int TYPE_ACTION_NEW_NOTE
See Also:
Constant Field Values

TYPE_ACTION_DELETE_STEP

public static final int TYPE_ACTION_DELETE_STEP
See Also:
Constant Field Values

TYPE_ACTION_DELETE_CONNECTION

public static final int TYPE_ACTION_DELETE_CONNECTION
See Also:
Constant Field Values

TYPE_ACTION_DELETE_HOP

public static final int TYPE_ACTION_DELETE_HOP
See Also:
Constant Field Values

TYPE_ACTION_DELETE_NOTE

public static final int TYPE_ACTION_DELETE_NOTE
See Also:
Constant Field Values

TYPE_ACTION_POSITION_STEP

public static final int TYPE_ACTION_POSITION_STEP
See Also:
Constant Field Values

TYPE_ACTION_POSITION_NOTE

public static final int TYPE_ACTION_POSITION_NOTE
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_JOB_ENTRY

public static final int TYPE_ACTION_CHANGE_JOB_ENTRY
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_JOB_HOP

public static final int TYPE_ACTION_CHANGE_JOB_HOP
See Also:
Constant Field Values

TYPE_ACTION_NEW_JOB_ENTRY

public static final int TYPE_ACTION_NEW_JOB_ENTRY
See Also:
Constant Field Values

TYPE_ACTION_NEW_JOB_HOP

public static final int TYPE_ACTION_NEW_JOB_HOP
See Also:
Constant Field Values

TYPE_ACTION_DELETE_JOB_ENTRY

public static final int TYPE_ACTION_DELETE_JOB_ENTRY
See Also:
Constant Field Values

TYPE_ACTION_DELETE_JOB_HOP

public static final int TYPE_ACTION_DELETE_JOB_HOP
See Also:
Constant Field Values

TYPE_ACTION_POSITION_JOB_ENTRY

public static final int TYPE_ACTION_POSITION_JOB_ENTRY
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_TABLEITEM

public static final int TYPE_ACTION_CHANGE_TABLEITEM
See Also:
Constant Field Values

TYPE_ACTION_NEW_TABLEITEM

public static final int TYPE_ACTION_NEW_TABLEITEM
See Also:
Constant Field Values

TYPE_ACTION_DELETE_TABLEITEM

public static final int TYPE_ACTION_DELETE_TABLEITEM
See Also:
Constant Field Values

TYPE_ACTION_POSITION_TABLEITEM

public static final int TYPE_ACTION_POSITION_TABLEITEM
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_TABLE

public static final int TYPE_ACTION_CHANGE_TABLE
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_RELATIONSHIP

public static final int TYPE_ACTION_CHANGE_RELATIONSHIP
See Also:
Constant Field Values

TYPE_ACTION_NEW_TABLE

public static final int TYPE_ACTION_NEW_TABLE
See Also:
Constant Field Values

TYPE_ACTION_NEW_RELATIONSHIP

public static final int TYPE_ACTION_NEW_RELATIONSHIP
See Also:
Constant Field Values

TYPE_ACTION_DELETE_TABLE

public static final int TYPE_ACTION_DELETE_TABLE
See Also:
Constant Field Values

TYPE_ACTION_DELETE_RELATIONSHIP

public static final int TYPE_ACTION_DELETE_RELATIONSHIP
See Also:
Constant Field Values

TYPE_ACTION_POSITION_TABLE

public static final int TYPE_ACTION_POSITION_TABLE
See Also:
Constant Field Values

TYPE_ACTION_NEW_SLAVE

public static final int TYPE_ACTION_NEW_SLAVE
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_SLAVE

public static final int TYPE_ACTION_CHANGE_SLAVE
See Also:
Constant Field Values

TYPE_ACTION_DELETE_SLAVE

public static final int TYPE_ACTION_DELETE_SLAVE
See Also:
Constant Field Values

TYPE_ACTION_NEW_CLUSTER

public static final int TYPE_ACTION_NEW_CLUSTER
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_CLUSTER

public static final int TYPE_ACTION_CHANGE_CLUSTER
See Also:
Constant Field Values

TYPE_ACTION_DELETE_CLUSTER

public static final int TYPE_ACTION_DELETE_CLUSTER
See Also:
Constant Field Values

TYPE_ACTION_NEW_PARTITION

public static final int TYPE_ACTION_NEW_PARTITION
See Also:
Constant Field Values

TYPE_ACTION_CHANGE_PARTITION

public static final int TYPE_ACTION_CHANGE_PARTITION
See Also:
Constant Field Values

TYPE_ACTION_DELETE_PARTITION

public static final int TYPE_ACTION_DELETE_PARTITION
See Also:
Constant Field Values

desc_action

public static final String[] desc_action
Constructor Detail

TransAction

public TransAction()
Method Detail

setDelete

public void setDelete(Object[] prev,
                      int[] idx)

setChanged

public void setChanged(Object[] prev,
                       Object[] curr,
                       int[] idx)

setNew

public void setNew(Object[] prev,
                   int[] position)

setPosition

public void setPosition(Object[] obj,
                        int[] idx,
                        Point[] prev,
                        Point[] curr)

setItemMove

public void setItemMove(int[] prev,
                        int[] curr)

getType

public int getType()

getPrevious

public Object[] getPrevious()

getCurrent

public Object[] getCurrent()

getPreviousLocation

public Point[] getPreviousLocation()

getCurrentLocation

public Point[] getCurrentLocation()

getPreviousIndex

public int[] getPreviousIndex()

getCurrentIndex

public int[] getCurrentIndex()

setNextAlso

public void setNextAlso(boolean nextAlso)
Indicate that the next operations needs to be undone too.

Parameters:
nextAlso - The nextAlso to set.

getNextAlso

public boolean getNextAlso()
Get the status of the nextAlso flag.

Returns:
true if the next operation needs to be done too.

toString

public String toString()
Overrides:
toString in class Object