net.sf.farrago.session
Interface FarragoSessionDdlHandler


public interface FarragoSessionDdlHandler

FarragoSessionDdlHandler is for illustration purposes only; it is not meant to be implemented. The methods declared here are templates for the handler methods invoked by FarragoSessionDdlValidator for each object affected by a DDL statement.

Real handler implementations should provide overloads of these methods for all of the specific subtypes of CwmModelElement which they wish to handle. These overloads will be invoked reflectively via ReflectUtil.invokeVisitor(org.eigenbase.util.ReflectiveVisitor, java.lang.Object, java.lang.Class, java.lang.String).

If no handler is present for a particular type/action combination, FarragoSessionDdlValidator will assume that no special handling is required. Invocation uses the Glossary.ChainOfResponsibilityPattern, invoking handlers in order until one returns true.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/session/FarragoSessionDdlHandler.java#11 $
Author:
John V. Sichi

Method Summary
 void executeCreation(CwmModelElement modelElement)
          Executes creation of an object; for example, if modelElement has stored data associated with it, this call should allocate and initialize initial storage for the object.
 void executeDrop(CwmModelElement modelElement)
          Executes drop of an object; for example, if modelElement has stored data associated with it, this call should deallocate the object's storage.
 void executeModification(CwmModelElement modelElement)
          Executes modification of an object.
 void executeTruncation(CwmModelElement modelElement)
          Executes truncation of an object; for example, if modelElement has stored data associated with it, this call should deallocate and reinitialize the object's storage.
 void validateDefinition(CwmModelElement modelElement)
          Validates the definition of an object when it is created.
 void validateDrop(CwmModelElement modelElement)
          Validates that an object can be dropped.
 void validateModification(CwmModelElement modelElement)
          Validates the new definition of an object when it is altered.
 void validateTruncation(CwmModelElement modelElement)
          Validates that an object can be truncated.
 

Method Detail

validateDefinition

void validateDefinition(CwmModelElement modelElement)
Validates the definition of an object when it is created.

Parameters:
modelElement - element being validated

validateModification

void validateModification(CwmModelElement modelElement)
Validates the new definition of an object when it is altered.

Parameters:
modelElement - element being altered

validateDrop

void validateDrop(CwmModelElement modelElement)
Validates that an object can be dropped.

Parameters:
modelElement - element being dropped

validateTruncation

void validateTruncation(CwmModelElement modelElement)
Validates that an object can be truncated.

Parameters:
modelElement - element being validated

executeCreation

void executeCreation(CwmModelElement modelElement)
Executes creation of an object; for example, if modelElement has stored data associated with it, this call should allocate and initialize initial storage for the object.

Parameters:
modelElement - element being created

executeModification

void executeModification(CwmModelElement modelElement)
Executes modification of an object.

Parameters:
modelElement - element being modified

executeDrop

void executeDrop(CwmModelElement modelElement)
Executes drop of an object; for example, if modelElement has stored data associated with it, this call should deallocate the object's storage.

Parameters:
modelElement - element being created

executeTruncation

void executeTruncation(CwmModelElement modelElement)
Executes truncation of an object; for example, if modelElement has stored data associated with it, this call should deallocate and reinitialize the object's storage.

Parameters:
modelElement - element being created