/*
* The contents of this file are subject to the Sapient Public License
* Version 1.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://carbon.sf.net/License.html.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* The Original Code is The Carbon Component Framework.
*
* The Initial Developer of the Original Code is Sapient Corporation
*
* Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
*/
package org.sape.carbon.services.sql;
import org.sape.carbon.core.config.Configuration;
import org.sape.carbon.services.sql.connection.ConnectionFactory;
/**
* <p>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.</p>
*
* Copyright 2002 Sapient
* @since carbon 1.0
* @author Vivekanand Kirubanandan, June 2002
* @author Greg Hinkle, December 2002
* @version $Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:36 $)
*/
public interface StatementConfiguration extends Configuration {
/**
* Getter for the name of the query
* @return the name of the query
*/
String getQueryName();
/**
* Setter for the query name
* @param queryName the name of the query
*/
void setQueryName(String queryName);
/**
* The getter for the sql code of this query
* @return the sql query code
*/
String getQuery();
/**
* Setter for the sql query
* @param query the sql of this query
*/
void setQuery(String query);
/**
* Getter for the connection factory to be used when creating
* queries.
* @return the specific connection factory for this query
*/
ConnectionFactory getConnectionFactory();
/**
* Setter for the connection factory
* @param connectionFactory the default connection factory for this query
*/
void setConnectionFactory(ConnectionFactory connectionFactory);
/**
* Getter for the result set type
* @return the default type of result set
*/
ResultSetTypeEnum getResultSetType();
/**
* Setter for the default type of result set.
* @param resultSetType the type of result set created
* @see java.sql.ResultSet#TYPE_FORWARD_ONLY
* @see java.sql.ResultSet#TYPE_SCROLL_INSENSITIVE
* @see java.sql.ResultSet#TYPE_SCROLL_SENSITIVE
*/
void setResultSetType(ResultSetTypeEnum resultSetType);
/**
* Getter for the configured query's result set concurrency.
* @return the default concurrency for this query
*/
ResultSetConcurrencyEnum getResultSetConcurrency();
/**
* Setter for the concurrency of the result set.
* @param resultSetConcurrency the concurrency type of the result set
* @see java.sql.ResultSet#CONCUR_READ_ONLY
* @see java.sql.ResultSet#CONCUR_UPDATABLE
*/
void setResultSetConcurrency(ResultSetConcurrencyEnum resultSetConcurrency);
/**
* Getter for the configured maximum number of rows to return.
* @return the maximum number of rows to return.
*/
Integer getMaxRows();
/**
* Setter for the max rows to return.
* @param maxRows The maximum number of rows to return from a query.
*/
void setMaxRows(Integer maxRows);
/**
* Getter for the configured fetch size.
* @return Gets the configured driver hint for rows to return
* at a time.
*/
Integer getFetchSize();
/**
* Setter for the fetch size on results sets.
* @param fetchSize A driver hint for the count of records to be returned
* on each database message.
*/
void setFetchSize(Integer fetchSize);
/**
* Getter for the maximum field size.
* @return the maximum field size in bytes
*/
Integer getMaxFieldSize();
/**
* Setter for the size of fields to be returned.
* @param maxFieldSize The max size, in bytes, that the driver should return
* for a column.
*/
void setMaxFieldSize(Integer maxFieldSize);
/**
* Getter for the configured query timeout.
* @return the configured query timeout in milleseconds
*/
Integer getQueryTimeOut();
/**
* Setter for the timeout in milleseconds of this query
* @param queryTimeOut the number of milleseconds before the driver should
* timeout a database query. (Drivers have defaults)
*/
void setQueryTimeOut(Integer queryTimeOut);
}
|