wt.fc.manifest
Class AbstractDirective

java.lang.Object
  extended bywt.fc.manifest.AbstractDirective
All Implemented Interfaces:
Directive
Direct Known Subclasses:
QueryAdhocForeignKeyExistenceDirective, QueryLinkExistenceDirective

public abstract class AbstractDirective
extends Object
implements Directive

This class defines a pattern for Directive implementation classes.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private  Map criteria
           
private static String RESOURCE
           
private  DirectiveResult result
           
private static boolean verbose
           
protected static boolean VERBOSE
           
 
Fields inherited from interface wt.fc.manifest.Directive
CRITERIA, RESULT
 
Constructor Summary
AbstractDirective()
           
 
Method Summary
 void addOperation(Directive directive)
          This method defines a pattern for Directive implementation classes.
 DirectiveCriteria[] getDirectiveCriteria(DirectiveCriteriaKey key)
          Get a DirectiveCriteria array given the input DirectiveCriteriaKey.
 DirectiveResult getResult()
          Gets the object for the association that plays role: result.
 String[] getTypes()
          Determines what types are internally stored in the DirectiveCriteria objects for this Directive, and returns an array of String objects representing the list of fully qualified class names for those types.
 void processOperation(Directive directive)
          This method is responsible for doing the real work of merging the necessary operation information from the Directive being added, to the Directive it is being added to.
 void putDirectiveCriteria(DirectiveCriteria directiveCriteria, DirectiveCriteriaKey key)
          This method checks for an existing DirectiveCriteria object that is the same is the input object.
private  void resultValidate(DirectiveResult a_Result)
           
 void setResult(DirectiveResult a_Result)
          Sets the object for the association that plays role: result.
 String toString()
           
 void validateOperation(Directive directive)
          Validates that the Directive being added is of the same type as the Directive it is being added to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

verbose

private static boolean verbose

criteria

private Map criteria

result

private DirectiveResult result

VERBOSE

protected static final boolean VERBOSE
Constructor Detail

AbstractDirective

public AbstractDirective()
Method Detail

addOperation

public void addOperation(Directive directive)
                  throws WTException
This method defines a pattern for Directive implementation classes. It makes calls to validateOperation(Directive directive) and processOperation(Directive directive) which is implemented in the concrete Directive implementations and is responsible for merging the operations.

Supported API: false

Specified by:
addOperation in interface Directive
Parameters:
directive - Represents the database operation or set of database operations that are being added to this Directive object.
Throws:
WTException

validateOperation

public void validateOperation(Directive directive)
                       throws WTException
Validates that the Directive being added is of the same type as the Directive it is being added to. If they are not of the same type an Exception is thrown. If for some reason Directive objects of different types can be added to one another, the concrete implementations of those Directive types would need to override this mehod and do validation appropriate to their implementation.

Supported API: false

Parameters:
directive - Represents the database operation or set of database operations that are being added to this Directive object.
Throws:
WTException

processOperation

public void processOperation(Directive directive)
                      throws WTException
This method is responsible for doing the real work of merging the necessary operation information from the Directive being added, to the Directive it is being added to.

Supported API: false

Parameters:
directive - Represents the database operation or set of database operations that are being added to this Directive object.
Throws:
WTException

getDirectiveCriteria

public DirectiveCriteria[] getDirectiveCriteria(DirectiveCriteriaKey key)
Get a DirectiveCriteria array given the input DirectiveCriteriaKey.

Supported API: false

Specified by:
getDirectiveCriteria in interface Directive
Parameters:
key -
Returns:
DirectiveCriteria[]

putDirectiveCriteria

public void putDirectiveCriteria(DirectiveCriteria directiveCriteria,
                                 DirectiveCriteriaKey key)
This method checks for an existing DirectiveCriteria object that is the same is the input object. If it finds one it appends any QueryKey objects are already stored in the existing DirectiveCriteria object otherwise it is added to the list of DirectiveCriteria objects associated to the input Directive.

Supported API: false

Specified by:
putDirectiveCriteria in interface Directive
Parameters:
directiveCriteria -
key -

getTypes

public String[] getTypes()
Determines what types are internally stored in the DirectiveCriteria objects for this Directive, and returns an array of String objects representing the list of fully qualified class names for those types.

Supported API: false

Specified by:
getTypes in interface Directive
Returns:
String[]

getResult

public DirectiveResult getResult()
Gets the object for the association that plays role: result.

Supported API: false

Specified by:
getResult in interface Directive
Returns:
DirectiveResult

setResult

public void setResult(DirectiveResult a_Result)
               throws WTPropertyVetoException
Sets the object for the association that plays role: result.

Supported API: false

Specified by:
setResult in interface Directive
Parameters:
a_Result -
Throws:
WTPropertyVetoException

resultValidate

private void resultValidate(DirectiveResult a_Result)
                     throws WTPropertyVetoException
Parameters:
a_Result -
Throws:
WTPropertyVetoException

toString

public String toString()