net.sf.farrago.ddl
Class DdlSetSystemParamStmt

java.lang.Object
  extended by net.sf.farrago.ddl.DdlStmt
      extended by net.sf.farrago.ddl.DdlSetParamStmt
          extended by net.sf.farrago.ddl.DdlSetSystemParamStmt
All Implemented Interfaces:
FarragoSessionDdlStmt

public class DdlSetSystemParamStmt
extends DdlSetParamStmt

DdlSetSystemParamStmt represents the ALTER SYSTEM SET ... statement.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/ddl/DdlSetSystemParamStmt.java#21 $
Author:
John V. Sichi

Constructor Summary
DdlSetSystemParamStmt(String paramName, SqlLiteral paramValue)
          Constructs a new DdlSetSystemParamStmt.
 
Method Summary
protected  void handleImmutableParameter(FarragoSessionDdlValidator ddlValidator, InvalidNameException thrown)
          Handle immutable parameters.
protected  void handleInvalidName(FarragoSessionDdlValidator ddlValidator, InvalidNameException thrown)
          Handle invalide name exception.
protected  void handleReflectionException(FarragoSessionDdlValidator ddlValidator, Exception thrown)
          Handle reflection exception.
protected  void handleTypeMismatch(FarragoSessionDdlValidator ddlValidator, TypeMismatchException thrown)
          Handle type mismatch.
 void preValidate(FarragoSessionDdlValidator ddlValidator)
          Called before generic validation.
 void visit(DdlVisitor visitor)
          Invokes a visitor on this statement.
 
Methods inherited from class net.sf.farrago.ddl.DdlSetParamStmt
getParamName, getParamValue, preValidate
 
Methods inherited from class net.sf.farrago.ddl.DdlStmt
getModelElement, isDropRestricted, postCommit, postExecute, preExecute, requiresCommit, runsAsDml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DdlSetSystemParamStmt

public DdlSetSystemParamStmt(String paramName,
                             SqlLiteral paramValue)
Constructs a new DdlSetSystemParamStmt.

Parameters:
paramName - name of parameter to set
paramValue - new value for parameter
Method Detail

preValidate

public void preValidate(FarragoSessionDdlValidator ddlValidator)
Description copied from interface: FarragoSessionDdlStmt
Called before generic validation.

Specified by:
preValidate in interface FarragoSessionDdlStmt
Overrides:
preValidate in class DdlStmt
Parameters:
ddlValidator - the object validating this stmt

handleInvalidName

protected void handleInvalidName(FarragoSessionDdlValidator ddlValidator,
                                 InvalidNameException thrown)
Description copied from class: DdlSetParamStmt
Handle invalide name exception. Called when DdlSetParamStmt.paramName is not recognized as a member of the RefObject passed to DdlSetParamStmt.preValidate(FarragoSessionDdlValidator, RefObject, RefObject).

Specified by:
handleInvalidName in class DdlSetParamStmt
Parameters:
ddlValidator - the object passed to DdlSetParamStmt.preValidate(net.sf.farrago.session.FarragoSessionDdlValidator, javax.jmi.reflect.RefObject, javax.jmi.reflect.RefObject).
thrown - the InvalidNameException generated

handleReflectionException

protected void handleReflectionException(FarragoSessionDdlValidator ddlValidator,
                                         Exception thrown)
Description copied from class: DdlSetParamStmt
Handle reflection exception. Called when a reflection error occurs while performing type conversion on DdlSetParamStmt.paramValue.

Specified by:
handleReflectionException in class DdlSetParamStmt
Parameters:
ddlValidator - the object passed to DdlSetParamStmt.preValidate(net.sf.farrago.session.FarragoSessionDdlValidator, javax.jmi.reflect.RefObject, javax.jmi.reflect.RefObject).
thrown - the Exception

handleImmutableParameter

protected void handleImmutableParameter(FarragoSessionDdlValidator ddlValidator,
                                        InvalidNameException thrown)
Description copied from class: DdlSetParamStmt
Handle immutable parameters. Called when DdlSetParamStmt.paramName is an immutable parameter of the RefObject passed to DdlSetParamStmt.preValidate(FarragoSessionDdlValidator, RefObject, RefObject).

Specified by:
handleImmutableParameter in class DdlSetParamStmt
Parameters:
ddlValidator - the object passed to DdlSetParamStmt.preValidate(net.sf.farrago.session.FarragoSessionDdlValidator, javax.jmi.reflect.RefObject, javax.jmi.reflect.RefObject).
thrown - the InvalidNameException generated (which in this case indicates an immutable parameter)

handleTypeMismatch

protected void handleTypeMismatch(FarragoSessionDdlValidator ddlValidator,
                                  TypeMismatchException thrown)
Description copied from class: DdlSetParamStmt
Handle type mismatch. Called when DdlSetParamStmt.paramValue has successfully undergone type conversion but is not the expected type.

Specified by:
handleTypeMismatch in class DdlSetParamStmt
Parameters:
ddlValidator - the object passed to DdlSetParamStmt.preValidate(net.sf.farrago.session.FarragoSessionDdlValidator, javax.jmi.reflect.RefObject, javax.jmi.reflect.RefObject).
thrown - the TypeMismatchException thrown

visit

public void visit(DdlVisitor visitor)
Description copied from class: DdlStmt
Invokes a visitor on this statement.

Specified by:
visit in class DdlStmt
Parameters:
visitor - DdlVisitor to invoke