edu.mssm.crover.tables.treatments
Class TableTreatment

java.lang.Object
  |
  +--edu.mssm.crover.tables.treatments.TableTreatment
All Implemented Interfaces:
Treatment
Direct Known Subclasses:
CompositionTableTreatment, ToTurnsTableTreatment, TurnDisplacementsTableTreatment

public class TableTreatment
extends java.lang.Object
implements Treatment

A strategy for treatments on tables.


Field Summary
protected  java.lang.Object parameter
          Stores the optional treatment parameter.
 
Constructor Summary
TableTreatment()
           
TableTreatment(java.lang.Object param)
          Initialize a new TableTreatment, with a parameter.
 
Method Summary
protected  void begin(java.lang.Object dest)
           
protected  void begin(Table dest)
           
protected  void end(java.lang.Object dest)
           
protected  void end(Table dest)
           
 java.lang.Object getParameter()
          Returns a parameter that could have been initialized when the treatment was created.
 void process(java.lang.Object dest)
          In place processing.
 void process(java.lang.Object source, java.lang.Object dest)
          Go through each instance of the table and perform an operation the nature of which is left to a subclass.
 void process(Table dest)
          Go through each instance of the table and perform an operation the nature of which is left to a subclass.
protected  void treatInstance(java.lang.Object dest, java.lang.Object instance)
           
protected  void treatInstance(Table dest, Table.RowIterator instance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameter

protected java.lang.Object parameter
Stores the optional treatment parameter.

Constructor Detail

TableTreatment

public TableTreatment(java.lang.Object param)
Initialize a new TableTreatment, with a parameter. This class does not care.

See Also:
getParameter()

TableTreatment

public TableTreatment()
Method Detail

getParameter

public java.lang.Object getParameter()
Returns a parameter that could have been initialized when the treatment was created. You know what you pass as the parameter.

Specified by:
getParameter in interface Treatment

process

public void process(java.lang.Object dest)
             throws InadequateSourceException,
                    TreatmentInterrupted
In place processing. The source and destination are the same object.

Specified by:
process in interface Treatment
InadequateSourceException
TreatmentInterrupted

process

public void process(Table dest)
             throws TreatmentInterrupted
Go through each instance of the table and perform an operation the nature of which is left to a subclass. In place processing. The source and destination are the same object. Invoque begin(dest), then treatInstance(dest, instance) for any instance of the source table. Invoque end(dest) before returning.

TreatmentInterrupted

process

public void process(java.lang.Object source,
                    java.lang.Object dest)
             throws InadequateBindingException,
                    TreatmentInterrupted
Go through each instance of the table and perform an operation the nature of which is left to a subclass. Source is cloned before executing the treatment. The source clone is processed, then returned to the client. Invoque begin(dest), then treatInstance(dest, instance) for any instance of the source table. Invoque end(dest) before returning. !NOT IMPLEMENTED!

InadequateBindingException
TreatmentInterrupted

begin

protected final void begin(java.lang.Object dest)
                    throws InadequateBindingException,
                           java.lang.Exception
InadequateBindingException
java.lang.Exception

treatInstance

protected final void treatInstance(java.lang.Object dest,
                                   java.lang.Object instance)
                            throws InadequateBindingException,
                                   java.lang.Exception
InadequateBindingException
java.lang.Exception

end

protected final void end(java.lang.Object dest)
                  throws InadequateBindingException,
                         java.lang.Exception
InadequateBindingException
java.lang.Exception

end

protected void end(Table dest)
            throws java.lang.Exception
java.lang.Exception

treatInstance

protected void treatInstance(Table dest,
                             Table.RowIterator instance)
                      throws java.lang.Exception
java.lang.Exception

begin

protected void begin(Table dest)
              throws java.lang.Exception
java.lang.Exception


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.