org.apache.beehive.controls.system.jdbc
Class JdbcControl.ComplexSqlFragment

Object
  extended by JdbcControl.ComplexSqlFragment
Enclosing interface:
JdbcControl

public static class JdbcControl.ComplexSqlFragment
extends Object

A ComplexSqlFragment can be used as a return value from a parameter reflection operation for return values which contain BOTH SQL text and parameters. For Example, the text portion could be something like 'where NAME = ?' and the parameter value is 'Fred'.


Field Summary
protected  List<JdbcControl.SQLParameter> parameters
           
protected  CharSequence sql
           
 
Constructor Summary
JdbcControl.ComplexSqlFragment()
          Create a new SQLFragment.
JdbcControl.ComplexSqlFragment(String sql, JdbcControl.SQLParameter[] parameters)
          Create a new SQLFragment with the specified SQL and parameter list.
 
Method Summary
 JdbcControl.SQLParameter[] getParameters()
          Get the parameters contained within this fragment.
 String getSQL()
          Get the SQL of this fragment.
 String toString()
          Get the SQL string contained within this fragment.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sql

protected CharSequence sql

parameters

protected List<JdbcControl.SQLParameter> parameters
Constructor Detail

JdbcControl.ComplexSqlFragment

public JdbcControl.ComplexSqlFragment()
Create a new SQLFragment.


JdbcControl.ComplexSqlFragment

public JdbcControl.ComplexSqlFragment(String sql,
                                      JdbcControl.SQLParameter[] parameters)
Create a new SQLFragment with the specified SQL and parameter list.

Parameters:
sql - SQL contents of the fragment.
parameters - Substitution parameters.
Method Detail

getSQL

public String getSQL()
Get the SQL of this fragment.

Returns:
String.

getParameters

public JdbcControl.SQLParameter[] getParameters()
Get the parameters contained within this fragment. Returns a zero-based array.

Returns:
SQLParameter array.

toString

public String toString()
Get the SQL string contained within this fragment.

Overrides:
toString in class Object
Returns:
String.