scriptella.core
Class DynamicContextDecorator

java.lang.Object
  extended by scriptella.core.DynamicContext
      extended by scriptella.core.DynamicContextDecorator
All Implemented Interfaces:
ParametersCallback

public class DynamicContextDecorator
extends DynamicContext

Allows to change behaviour of wrapped DynamicContext.

Based on Decorator (from GOF) design pattern.

Mostly intended to be used by interceptors.

Version:
1.0
Author:
Fyodor Kupolov

Field Summary
 
Fields inherited from class scriptella.core.DynamicContext
globalContext
 
Constructor Summary
DynamicContextDecorator(DynamicContext context)
           
 
Method Summary
 Connection getConnection()
           
 java.lang.Object getParameter(java.lang.String name)
          Returns the value of parameter specified by name.
 
Methods inherited from class scriptella.core.DynamicContext
getGlobalContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicContextDecorator

public DynamicContextDecorator(DynamicContext context)
Method Detail

getParameter

public java.lang.Object getParameter(java.lang.String name)
Description copied from interface: ParametersCallback
Returns the value of parameter specified by name.

The callback internally delegates a call to parent callbacks if the parameter cannot be found.

Specified by:
getParameter in interface ParametersCallback
Overrides:
getParameter in class DynamicContext
Parameters:
name - parameter name. Providers are allowed (but not required) to ignore a case of the name parameter to comply with their internal model. For example JDBC drivers are case-insensitive to column names.
Returns:
parameter value or null if parameter doesn't exist.

getConnection

public Connection getConnection()
Overrides:
getConnection in class DynamicContext


Copyright © Copyright 2006-2009 The Scriptella Project Team.