com.bowstreet.builders.webapp.api
Class SqlStatement

java.lang.Object
  extended by com.bowstreet.builders.BaseBuilderAPI
      extended by com.bowstreet.builders.webapp.api.SqlStatement

public class SqlStatement
extends com.bowstreet.builders.BaseBuilderAPI

Builder for creating JDBC statements (either PreparedStatements or CallableStatements) that are ready for execution
Note: this is a builder API wrapper class, intended to be called by the regen logic of a builder. It can be used to programmatically add a call to the SqlStatement builder to a model.


Nested Class Summary
static interface SqlStatement.BuilderStaticValues
          Constant values imported from the builder definition file.
 
Constructor Summary
SqlStatement(BuilderCall parent, GenContext gc)
           
 
Method Summary
 boolean getAllowDynamicSQL()
          When enabled, allows indirect references to be used in the SQL Statement input
 java.lang.String getAutoCreateInputs()
          Whether or not to automatically create Variables for each positional input parameter in the SQL Statement
Legal values: Manual (Manual), AutoCreateDistinctVariables (Auto-create Distinct Variables), AutoCreateXMLVariable (Auto-create XML Variable)
 java.lang.String getConcurrency()
          The concurrency mode for the ResultSet, if any, generated by this statement
Legal values: (), ReadOnly (Read Only), Updatable (Updatable)
 IXml getCustomTransforms()
          Inputs for over-riding the builder's default transformation of result set columns
 java.lang.String getDynamicParametersMethodName()
          The method to be used for defining input and output parameters at run time
 java.lang.String getExecutionTimeout()
          The maximum time in seconds that this statement will be allowed to execute
 java.lang.String getFetchDirection()
          The direction in which rows of the ResultSet, if any, are fetched
Legal values: (), Forward (Forward), Reverse (Reverse), Unknown (Unknown)
 java.lang.String getFetchSize()
          The number of rows to be fetched from the database each time new rows are needed
 boolean getFireCreateEvents()
          Whether or not to fire an event when a statement is created and prepared for execution (adds an event declaration to the web app)
 java.lang.String getGeneratedKeyColumn()
          Name of the column containing the automatically generated key to be retrieved.
 boolean getHideWebAppArtifacts()
          Whether or not to hide any WebApp artifacts generated by this builder
 IXml getInputParameters()
          Input parameters for substitution into the SQL statement in place of fields denoted by '?'
 boolean getInputParametersAreSearchCriteria()
          When enabled input parameters are treated as search criteria.
 boolean getLogServerStats()
          Whether or not to log server statistics for this builder instance
 boolean getLogSqlStatements()
          Whether or not to log a readable copy of the actual SQL statements prepared for execution
 boolean getLogSqlWarnings()
          Whether or not to log SQL warning messages that are generated when a statement is prepared for execution
 java.lang.String getMaxFieldSize()
          Sets the maximum number of bytes in a column of type BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR (excess data is silently discarded)
 java.lang.String getMaxRows()
          Sets the maximum number of rows for any ResultSet created from this statement (excess rows are silently dropped)
 java.lang.String getName()
          Specify name of this builder call (required and must contain only alphanumeric characters and underscores)
 IXml getOutputParameters()
          Output parameter definitions for substitution into the callable SQL statement in place of fields denoted by '?'
 boolean getPreserveAutomaticBindings()
          Preserve the current automatic bindings even when the Name or SQL Statement inputs are changed.
 java.lang.String getScrollType()
          The type of ResultSet, if any, generated by this statement
Legal values: (), Forward (Forward), Insensitive (Insensitive), Sensitive (Sensitive)
 IXml getSqlInClause()
          Optionally specify SQL IN clauses
Legal values: (), AND (AND), OR (OR)
 java.lang.String getSqlInValuesDelimiter()
          A delimiter to use if the reference specified in the Values column is delimited string data
Legal values: ^ (^), ^| (^|)
 java.lang.String getSqlStatement()
          SQL statement with optional positional parameters (for example, "SELECT * from EMPLOYEES where SALARY > ?")
 void initializeBuilderInputs()
           
 void setAllowDynamicSQL(boolean value)
          When enabled, allows indirect references to be used in the SQL Statement input
 void setAutoCreateInputs(java.lang.String value)
          Whether or not to automatically create Variables for each positional input parameter in the SQL Statement
Legal values: Manual (Manual), AutoCreateDistinctVariables (Auto-create Distinct Variables), AutoCreateXMLVariable (Auto-create XML Variable)
 void setConcurrency(java.lang.String value)
          The concurrency mode for the ResultSet, if any, generated by this statement
Legal values: (), ReadOnly (Read Only), Updatable (Updatable)
 void setCustomTransforms(IXml value)
          Inputs for over-riding the builder's default transformation of result set columns
 void setDynamicParametersMethodName(java.lang.String value)
          The method to be used for defining input and output parameters at run time
 void setExecutionTimeout(java.lang.String value)
          The maximum time in seconds that this statement will be allowed to execute
 void setFetchDirection(java.lang.String value)
          The direction in which rows of the ResultSet, if any, are fetched
Legal values: (), Forward (Forward), Reverse (Reverse), Unknown (Unknown)
 void setFetchSize(java.lang.String value)
          The number of rows to be fetched from the database each time new rows are needed
 void setFireCreateEvents(boolean value)
          Whether or not to fire an event when a statement is created and prepared for execution (adds an event declaration to the web app)
 void setGeneratedKeyColumn(java.lang.String value)
          Name of the column containing the automatically generated key to be retrieved.
 void setHideWebAppArtifacts(boolean value)
          Whether or not to hide any WebApp artifacts generated by this builder
 void setInputParameters(IXml value)
          Input parameters for substitution into the SQL statement in place of fields denoted by '?'
 void setInputParametersAreSearchCriteria(boolean value)
          When enabled input parameters are treated as search criteria.
 void setLogServerStats(boolean value)
          Whether or not to log server statistics for this builder instance
 void setLogSqlStatements(boolean value)
          Whether or not to log a readable copy of the actual SQL statements prepared for execution
 void setLogSqlWarnings(boolean value)
          Whether or not to log SQL warning messages that are generated when a statement is prepared for execution
 void setMaxFieldSize(java.lang.String value)
          Sets the maximum number of bytes in a column of type BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR (excess data is silently discarded)
 void setMaxRows(java.lang.String value)
          Sets the maximum number of rows for any ResultSet created from this statement (excess rows are silently dropped)
 void setName(java.lang.String value)
          Specify name of this builder call (required and must contain only alphanumeric characters and underscores)
 void setOutputParameters(IXml value)
          Output parameter definitions for substitution into the callable SQL statement in place of fields denoted by '?'
 void setPreserveAutomaticBindings(boolean value)
          Preserve the current automatic bindings even when the Name or SQL Statement inputs are changed.
 void setScrollType(java.lang.String value)
          The type of ResultSet, if any, generated by this statement
Legal values: (), Forward (Forward), Insensitive (Insensitive), Sensitive (Sensitive)
 void setSqlInClause(IXml value)
          Optionally specify SQL IN clauses
Legal values: (), AND (AND), OR (OR)
 void setSqlInValuesDelimiter(java.lang.String value)
          A delimiter to use if the reference specified in the Values column is delimited string data
Legal values: ^ (^), ^| (^|)
 void setSqlStatement(java.lang.String value)
          SQL statement with optional positional parameters (for example, "SELECT * from EMPLOYEES where SALARY > ?")
 
Methods inherited from class com.bowstreet.builders.BaseBuilderAPI
getBuilderCall, getBuilderInputs, invokeBuilder, invokeBuilderBC, setBuilderInputs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlStatement

public SqlStatement(BuilderCall parent,
                    GenContext gc)
Method Detail

getAllowDynamicSQL

public boolean getAllowDynamicSQL()
When enabled, allows indirect references to be used in the SQL Statement input


getAutoCreateInputs

public java.lang.String getAutoCreateInputs()
Whether or not to automatically create Variables for each positional input parameter in the SQL Statement
Legal values: Manual (Manual), AutoCreateDistinctVariables (Auto-create Distinct Variables), AutoCreateXMLVariable (Auto-create XML Variable)


getConcurrency

public java.lang.String getConcurrency()
The concurrency mode for the ResultSet, if any, generated by this statement
Legal values: (), ReadOnly (Read Only), Updatable (Updatable)


getCustomTransforms

public IXml getCustomTransforms()
Inputs for over-riding the builder's default transformation of result set columns


getDynamicParametersMethodName

public java.lang.String getDynamicParametersMethodName()
The method to be used for defining input and output parameters at run time


getExecutionTimeout

public java.lang.String getExecutionTimeout()
The maximum time in seconds that this statement will be allowed to execute


getFetchDirection

public java.lang.String getFetchDirection()
The direction in which rows of the ResultSet, if any, are fetched
Legal values: (), Forward (Forward), Reverse (Reverse), Unknown (Unknown)


getFetchSize

public java.lang.String getFetchSize()
The number of rows to be fetched from the database each time new rows are needed


getFireCreateEvents

public boolean getFireCreateEvents()
Whether or not to fire an event when a statement is created and prepared for execution (adds an event declaration to the web app)


getGeneratedKeyColumn

public java.lang.String getGeneratedKeyColumn()
Name of the column containing the automatically generated key to be retrieved.


getHideWebAppArtifacts

public boolean getHideWebAppArtifacts()
Whether or not to hide any WebApp artifacts generated by this builder


getInputParameters

public IXml getInputParameters()
Input parameters for substitution into the SQL statement in place of fields denoted by '?' characters
Legal values: (), Automatic (Automatic), Custom (Custom), ARRAY (ARRAY), BIGINT (BIGINT), BINARY (BINARY), BIT (BIT), BLOB (BLOB), CHAR (CHAR), CLOB (CLOB), DATE (DATE), DECIMAL (DECIMAL), DISTINCT (DISTINCT), DOUBLE (DOUBLE), FLOAT (FLOAT), INTEGER (INTEGER), JAVA_OBJECT (JAVA_OBJECT), LONGVARBINARY (LONGVARBINARY), LONGVARCHAR (LONGVARCHAR), NULL (NULL), NUMERIC (NUMERIC), OTHER (OTHER), REAL (REAL), REF (REF), SMALLINT (SMALLINT), STRUCT (STRUCT), TIME (TIME), TIMESTAMP (TIMESTAMP), TINYINT (TINYINT), VARBINARY (VARBINARY), VARCHAR (VARCHAR)


getInputParametersAreSearchCriteria

public boolean getInputParametersAreSearchCriteria()
When enabled input parameters are treated as search criteria.


getLogServerStats

public boolean getLogServerStats()
Whether or not to log server statistics for this builder instance


getLogSqlStatements

public boolean getLogSqlStatements()
Whether or not to log a readable copy of the actual SQL statements prepared for execution


getLogSqlWarnings

public boolean getLogSqlWarnings()
Whether or not to log SQL warning messages that are generated when a statement is prepared for execution


getMaxFieldSize

public java.lang.String getMaxFieldSize()
Sets the maximum number of bytes in a column of type BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR (excess data is silently discarded)


getMaxRows

public java.lang.String getMaxRows()
Sets the maximum number of rows for any ResultSet created from this statement (excess rows are silently dropped)


getName

public java.lang.String getName()
Specify name of this builder call (required and must contain only alphanumeric characters and underscores)


getOutputParameters

public IXml getOutputParameters()
Output parameter definitions for substitution into the callable SQL statement in place of fields denoted by '?' characters
Legal values: (), Custom (Custom), ARRAY (ARRAY), BIGINT (BIGINT), BINARY (BINARY), BIT (BIT), BLOB (BLOB), CHAR (CHAR), CLOB (CLOB), DATE (DATE), DECIMAL (DECIMAL), DISTINCT (DISTINCT), DOUBLE (DOUBLE), FLOAT (FLOAT), INTEGER (INTEGER), JAVA_OBJECT (JAVA_OBJECT), LONGVARBINARY (LONGVARBINARY), LONGVARCHAR (LONGVARCHAR), NULL (NULL), NUMERIC (NUMERIC), OTHER (OTHER), REAL (REAL), REF (REF), SMALLINT (SMALLINT), STRUCT (STRUCT), TIME (TIME), TIMESTAMP (TIMESTAMP), TINYINT (TINYINT), VARBINARY (VARBINARY), VARCHAR (VARCHAR)


getPreserveAutomaticBindings

public boolean getPreserveAutomaticBindings()
Preserve the current automatic bindings even when the Name or SQL Statement inputs are changed.


getScrollType

public java.lang.String getScrollType()
The type of ResultSet, if any, generated by this statement
Legal values: (), Forward (Forward), Insensitive (Insensitive), Sensitive (Sensitive)


getSqlInClause

public IXml getSqlInClause()
Optionally specify SQL IN clauses
Legal values: (), AND (AND), OR (OR)


getSqlInValuesDelimiter

public java.lang.String getSqlInValuesDelimiter()
A delimiter to use if the reference specified in the Values column is delimited string data
Legal values: ^ (^), ^| (^|)


getSqlStatement

public java.lang.String getSqlStatement()
SQL statement with optional positional parameters (for example, "SELECT * from EMPLOYEES where SALARY > ?")


initializeBuilderInputs

public void initializeBuilderInputs()
Overrides:
initializeBuilderInputs in class com.bowstreet.builders.BaseBuilderAPI

setAllowDynamicSQL

public void setAllowDynamicSQL(boolean value)
When enabled, allows indirect references to be used in the SQL Statement input


setAutoCreateInputs

public void setAutoCreateInputs(java.lang.String value)
Whether or not to automatically create Variables for each positional input parameter in the SQL Statement
Legal values: Manual (Manual), AutoCreateDistinctVariables (Auto-create Distinct Variables), AutoCreateXMLVariable (Auto-create XML Variable)


setConcurrency

public void setConcurrency(java.lang.String value)
The concurrency mode for the ResultSet, if any, generated by this statement
Legal values: (), ReadOnly (Read Only), Updatable (Updatable)


setCustomTransforms

public void setCustomTransforms(IXml value)
Inputs for over-riding the builder's default transformation of result set columns


setDynamicParametersMethodName

public void setDynamicParametersMethodName(java.lang.String value)
The method to be used for defining input and output parameters at run time


setExecutionTimeout

public void setExecutionTimeout(java.lang.String value)
The maximum time in seconds that this statement will be allowed to execute


setFetchDirection

public void setFetchDirection(java.lang.String value)
The direction in which rows of the ResultSet, if any, are fetched
Legal values: (), Forward (Forward), Reverse (Reverse), Unknown (Unknown)


setFetchSize

public void setFetchSize(java.lang.String value)
The number of rows to be fetched from the database each time new rows are needed


setFireCreateEvents

public void setFireCreateEvents(boolean value)
Whether or not to fire an event when a statement is created and prepared for execution (adds an event declaration to the web app)


setGeneratedKeyColumn

public void setGeneratedKeyColumn(java.lang.String value)
Name of the column containing the automatically generated key to be retrieved.


setHideWebAppArtifacts

public void setHideWebAppArtifacts(boolean value)
Whether or not to hide any WebApp artifacts generated by this builder


setInputParameters

public void setInputParameters(IXml value)
Input parameters for substitution into the SQL statement in place of fields denoted by '?' characters
Legal values: (), Automatic (Automatic), Custom (Custom), ARRAY (ARRAY), BIGINT (BIGINT), BINARY (BINARY), BIT (BIT), BLOB (BLOB), CHAR (CHAR), CLOB (CLOB), DATE (DATE), DECIMAL (DECIMAL), DISTINCT (DISTINCT), DOUBLE (DOUBLE), FLOAT (FLOAT), INTEGER (INTEGER), JAVA_OBJECT (JAVA_OBJECT), LONGVARBINARY (LONGVARBINARY), LONGVARCHAR (LONGVARCHAR), NULL (NULL), NUMERIC (NUMERIC), OTHER (OTHER), REAL (REAL), REF (REF), SMALLINT (SMALLINT), STRUCT (STRUCT), TIME (TIME), TIMESTAMP (TIMESTAMP), TINYINT (TINYINT), VARBINARY (VARBINARY), VARCHAR (VARCHAR)


setInputParametersAreSearchCriteria

public void setInputParametersAreSearchCriteria(boolean value)
When enabled input parameters are treated as search criteria.


setLogServerStats

public void setLogServerStats(boolean value)
Whether or not to log server statistics for this builder instance


setLogSqlStatements

public void setLogSqlStatements(boolean value)
Whether or not to log a readable copy of the actual SQL statements prepared for execution


setLogSqlWarnings

public void setLogSqlWarnings(boolean value)
Whether or not to log SQL warning messages that are generated when a statement is prepared for execution


setMaxFieldSize

public void setMaxFieldSize(java.lang.String value)
Sets the maximum number of bytes in a column of type BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR (excess data is silently discarded)


setMaxRows

public void setMaxRows(java.lang.String value)
Sets the maximum number of rows for any ResultSet created from this statement (excess rows are silently dropped)


setName

public void setName(java.lang.String value)
Specify name of this builder call (required and must contain only alphanumeric characters and underscores)


setOutputParameters

public void setOutputParameters(IXml value)
Output parameter definitions for substitution into the callable SQL statement in place of fields denoted by '?' characters
Legal values: (), Custom (Custom), ARRAY (ARRAY), BIGINT (BIGINT), BINARY (BINARY), BIT (BIT), BLOB (BLOB), CHAR (CHAR), CLOB (CLOB), DATE (DATE), DECIMAL (DECIMAL), DISTINCT (DISTINCT), DOUBLE (DOUBLE), FLOAT (FLOAT), INTEGER (INTEGER), JAVA_OBJECT (JAVA_OBJECT), LONGVARBINARY (LONGVARBINARY), LONGVARCHAR (LONGVARCHAR), NULL (NULL), NUMERIC (NUMERIC), OTHER (OTHER), REAL (REAL), REF (REF), SMALLINT (SMALLINT), STRUCT (STRUCT), TIME (TIME), TIMESTAMP (TIMESTAMP), TINYINT (TINYINT), VARBINARY (VARBINARY), VARCHAR (VARCHAR)


setPreserveAutomaticBindings

public void setPreserveAutomaticBindings(boolean value)
Preserve the current automatic bindings even when the Name or SQL Statement inputs are changed.


setScrollType

public void setScrollType(java.lang.String value)
The type of ResultSet, if any, generated by this statement
Legal values: (), Forward (Forward), Insensitive (Insensitive), Sensitive (Sensitive)


setSqlInClause

public void setSqlInClause(IXml value)
Optionally specify SQL IN clauses
Legal values: (), AND (AND), OR (OR)


setSqlInValuesDelimiter

public void setSqlInValuesDelimiter(java.lang.String value)
A delimiter to use if the reference specified in the Values column is delimited string data
Legal values: ^ (^), ^| (^|)


setSqlStatement

public void setSqlStatement(java.lang.String value)
SQL statement with optional positional parameters (for example, "SELECT * from EMPLOYEES where SALARY > ?")



Copyright © 2009 IBM. All Rights Reserved.