org.apache.cocoon.components.language.markup.xsp
Class AbstractEsqlConnection
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.language.markup.xsp.AbstractEsqlConnection
- All Implemented Interfaces:
- LogEnabled
- Direct Known Subclasses:
- Cocoon2EsqlConnection
public abstract class AbstractEsqlConnection
- extends AbstractLogEnabled
- Version:
- CVS $Id: AbstractEsqlConnection.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Torsten Curdt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractEsqlConnection
protected AbstractEsqlConnection()
getConnection
protected abstract Connection getConnection()
throws SQLException
- Throws:
SQLException
setMultipleResults
public void setMultipleResults(String value)
- It appears that some commercial DBMSs like Oracle and Informix
are broken in that they don't follow the JDBC standard and
calls to getUpdateCount after getMoreResults result either in
an exception (Informix) or return the same value (i.e. not -1) (Oracle).
In addition, this feature is only useful with stored procedures.
Hence we disable it per default.
getMultipleResults
public boolean getMultipleResults()
getProperties
public Properties getProperties()
setProperty
public void setProperty(String name,
Object value)
setUser
public void setUser(String user)
setPassword
public void setPassword(String password)
setAutoCommit
public void setAutoCommit(boolean autocommit)
throws SQLException
- Throws:
SQLException
getAutoCommit
public boolean getAutoCommit()
throws SQLException
- Throws:
SQLException
getURL
public String getURL()
throws SQLException
- Throws:
SQLException
setURL
public void setURL(String url)
getMetaData
public DatabaseMetaData getMetaData()
throws SQLException
- Throws:
SQLException
commit
public void commit()
throws SQLException
- Throws:
SQLException
rollback
public void rollback()
throws SQLException
- Throws:
SQLException
close
public void close()
throws SQLException
- Throws:
SQLException
createQuery
public AbstractEsqlQuery createQuery(String type,
String queryString)
throws SQLException
- Factory method for creating an EsqlQuery object. If type is set to
"" or "auto" it will try to find type from the JDBC connection URL.
If this does not succeed the generic JDBC type will be assumed.
(This type does not work for some databases like mssql though)
- Parameters:
type
- {sybase|postgresql|mysql|oracle|jdbc}queryString
-
- Returns:
- implementation of the AbstractEsqlQuery
- Throws:
SQLException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.