wt.replication.unit
Class UnitSeedOperation

java.lang.Object
  extended bywt.replication.unit.UnitOperation
      extended bywt.replication.unit.UnitSeedOperation

public class UnitSeedOperation
extends UnitOperation


Field Summary
protected static int ADD
           
private static String CLASSNAME
           
private  int mode
           
protected static int REMOVE
           
private static String RESOURCE
           
private  WTObject seed
           
 
Fields inherited from class wt.replication.unit.UnitOperation
theUnit
 
Constructor Summary
(package private) UnitSeedOperation(WTObject a_seed, WTUnit a_unit, int a_mode)
           
 
Method Summary
protected static boolean add(WTObject a_seed, WTUnit a_unit)
          Adds the Seed item to the WTUnit.
 WTUnit execute()
          This method adds or deletes the seed item to/from the WTUnit.
protected static UnitSeedLink findUnitSeedLink(WTObject a_seed, WTUnit a_unit)
          Returns the UnitSeedLink object (if it exists) for the Seed object and WTUnit.
protected static QueryResult getUnitSeedLinks(WTUnit a_unit)
           
protected static QueryResult getUnitSeedObjects(WTUnit a_unit)
           
protected static boolean remove(WTObject a_seed, WTUnit a_unit)
          Removes the Seed object from the WTUnit.
 
Methods inherited from class wt.replication.unit.UnitOperation
executeLockingTransaction, executeTransaction, executeTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

ADD

protected static final int ADD
See Also:
Constant Field Values

REMOVE

protected static final int REMOVE
See Also:
Constant Field Values

seed

private WTObject seed

mode

private int mode
Constructor Detail

UnitSeedOperation

UnitSeedOperation(WTObject a_seed,
                  WTUnit a_unit,
                  int a_mode)
Method Detail

execute

public WTUnit execute()
               throws WTException
This method adds or deletes the seed item to/from the WTUnit. If the item has been added or deleted, then the WTUnit modification timestamp is updated.

Specified by:
execute in class UnitOperation
Returns:
WTUnit that the operation was performed on
Throws:
WTException

findUnitSeedLink

protected static UnitSeedLink findUnitSeedLink(WTObject a_seed,
                                               WTUnit a_unit)
                                        throws WTException
Returns the UnitSeedLink object (if it exists) for the Seed object and WTUnit.

Parameters:
a_seed -
a_unit -
Returns:
UnitSeedLink
Throws:
WTException

getUnitSeedObjects

protected static QueryResult getUnitSeedObjects(WTUnit a_unit)
                                         throws WTException
Throws:
WTException

getUnitSeedLinks

protected static QueryResult getUnitSeedLinks(WTUnit a_unit)
                                       throws WTException
Throws:
WTException

add

protected static boolean add(WTObject a_seed,
                             WTUnit a_unit)
                      throws WTException
Adds the Seed item to the WTUnit. If the item is added, then true is returned. Either the PRE_ADD_UNIT and POST_ADD_UNIT are emitted.

Supported API: false

Parameters:
a_seed -
a_unit -
Returns:
boolean
Throws:
WTException

remove

protected static boolean remove(WTObject a_seed,
                                WTUnit a_unit)
                         throws WTException
Removes the Seed object from the WTUnit. If the item is actually removed, then true is returned. The PRE_REMOVE_UNIT and POST_REMOVE_UNIT events are emitted.

Supported API: false

Parameters:
a_seed -
a_unit -
Returns:
boolean
Throws:
WTException