org.sape.carbon.services.sql
Interface StatementConfiguration

All Superinterfaces:
Configuration

public interface StatementConfiguration
extends Configuration

This configuration holds the definition of a specific SQL statement. It maintains the parameters that are configurable on java.sql.Statement objects and their subclasses in order to allow configurable modification of their use with the Statement Factory.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:36 $)
Author:
Vivekanand Kirubanandan, June 2002, Greg Hinkle, December 2002

Method Summary
 ConnectionFactory getConnectionFactory()
          Getter for the connection factory to be used when creating queries.
 Integer getFetchSize()
          Getter for the configured fetch size.
 Integer getMaxFieldSize()
          Getter for the maximum field size.
 Integer getMaxRows()
          Getter for the configured maximum number of rows to return.
 String getQuery()
          The getter for the sql code of this query
 String getQueryName()
          Getter for the name of the query
 Integer getQueryTimeOut()
          Getter for the configured query timeout.
 ResultSetConcurrencyEnum getResultSetConcurrency()
          Getter for the configured query's result set concurrency.
 ResultSetTypeEnum getResultSetType()
          Getter for the result set type
 void setConnectionFactory(ConnectionFactory connectionFactory)
          Setter for the connection factory
 void setFetchSize(Integer fetchSize)
          Setter for the fetch size on results sets.
 void setMaxFieldSize(Integer maxFieldSize)
          Setter for the size of fields to be returned.
 void setMaxRows(Integer maxRows)
          Setter for the max rows to return.
 void setQuery(String query)
          Setter for the sql query
 void setQueryName(String queryName)
          Setter for the query name
 void setQueryTimeOut(Integer queryTimeOut)
          Setter for the timeout in milleseconds of this query
 void setResultSetConcurrency(ResultSetConcurrencyEnum resultSetConcurrency)
          Setter for the concurrency of the result set.
 void setResultSetType(ResultSetTypeEnum resultSetType)
          Setter for the default type of result set.
 
Methods inherited from interface org.sape.carbon.core.config.Configuration
clone, getConfigurationInterface, getConfigurationName, getDataStructure, getRootElement, isConfigurationWritable, setConfigurationName, setConfigurationReadOnly
 

Method Detail

getQueryName

public String getQueryName()
Getter for the name of the query

Returns:
the name of the query

setQueryName

public void setQueryName(String queryName)
Setter for the query name

Parameters:
queryName - the name of the query

getQuery

public String getQuery()
The getter for the sql code of this query

Returns:
the sql query code

setQuery

public void setQuery(String query)
Setter for the sql query

Parameters:
query - the sql of this query

getConnectionFactory

public ConnectionFactory getConnectionFactory()
Getter for the connection factory to be used when creating queries.

Returns:
the specific connection factory for this query

setConnectionFactory

public void setConnectionFactory(ConnectionFactory connectionFactory)
Setter for the connection factory

Parameters:
connectionFactory - the default connection factory for this query

getResultSetType

public ResultSetTypeEnum getResultSetType()
Getter for the result set type

Returns:
the default type of result set

setResultSetType

public void setResultSetType(ResultSetTypeEnum resultSetType)
Setter for the default type of result set.

Parameters:
resultSetType - the type of result set created
See Also:
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE

getResultSetConcurrency

public ResultSetConcurrencyEnum getResultSetConcurrency()
Getter for the configured query's result set concurrency.

Returns:
the default concurrency for this query

setResultSetConcurrency

public void setResultSetConcurrency(ResultSetConcurrencyEnum resultSetConcurrency)
Setter for the concurrency of the result set.

Parameters:
resultSetConcurrency - the concurrency type of the result set
See Also:
ResultSet.CONCUR_READ_ONLY, ResultSet.CONCUR_UPDATABLE

getMaxRows

public Integer getMaxRows()
Getter for the configured maximum number of rows to return.

Returns:
the maximum number of rows to return.

setMaxRows

public void setMaxRows(Integer maxRows)
Setter for the max rows to return.

Parameters:
maxRows - The maximum number of rows to return from a query.

getFetchSize

public Integer getFetchSize()
Getter for the configured fetch size.

Returns:
Gets the configured driver hint for rows to return at a time.

setFetchSize

public void setFetchSize(Integer fetchSize)
Setter for the fetch size on results sets.

Parameters:
fetchSize - A driver hint for the count of records to be returned on each database message.

getMaxFieldSize

public Integer getMaxFieldSize()
Getter for the maximum field size.

Returns:
the maximum field size in bytes

setMaxFieldSize

public void setMaxFieldSize(Integer maxFieldSize)
Setter for the size of fields to be returned.

Parameters:
maxFieldSize - The max size, in bytes, that the driver should return for a column.

getQueryTimeOut

public Integer getQueryTimeOut()
Getter for the configured query timeout.

Returns:
the configured query timeout in milleseconds

setQueryTimeOut

public void setQueryTimeOut(Integer queryTimeOut)
Setter for the timeout in milleseconds of this query

Parameters:
queryTimeOut - the number of milleseconds before the driver should timeout a database query. (Drivers have defaults)


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.