br.ufg.integrate.wrapper.jdbc.impl
Class StatementImpl

java.lang.Object
  extended by br.ufg.integrate.wrapper.jdbc.IntegrateStatement
      extended by br.ufg.integrate.wrapper.jdbc.impl.StatementImpl
All Implemented Interfaces:
Statement, Wrapper
Direct Known Subclasses:
CsvStatement

public class StatementImpl
extends IntegrateStatement

Version:
0.1 Adapted from xlSQL.
Author:
Rogerio

Field Summary
protected  Connection conn
           
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Constructor Summary
StatementImpl(Connection con)
           
StatementImpl(Connection con, Statement stmt)
          Create a new StatementImpl object.
 
Method Summary
 void addBatch(String sql)
          Implements method in interface java.sql.Statement
 void cancel()
          Implements method in interface java.sql.Statement
 void clearBatch()
          Implements method in interface java.sql.Statement
 void clearWarnings()
          Implements method in interface java.sql.Statement
 void close()
          Implements method in interface java.sql.Statement
 boolean execute(String sql)
          Implements method in interface java.sql.Statement
 boolean execute(String sql, int autoGeneratedKeys)
          Implements method in interface java.sql.Statement
 boolean execute(String sql, int[] columnIndexes)
          Implements method in interface java.sql.Statement
 boolean execute(String sql, String[] columnNames)
          Implements method in interface java.sql.Statement
 int[] executeBatch()
          Implements method in interface java.sql.Statement
 ResultSet executeQuery(String sql)
          Implements method in interface java.sql.Statement
 int executeUpdate(String sql)
          Implements method in interface java.sql.Statement
 int executeUpdate(String sql, int autoGeneratedKeys)
          Implements method in interface java.sql.Statement
 int executeUpdate(String sql, int[] columnIndexes)
          Implements method in interface java.sql.Statement
 int executeUpdate(String sql, String[] columnNames)
          Implements method in interface java.sql.Statement
 Connection getConnection()
          Implements method in interface java.sql.Statement
 int getFetchDirection()
          Implements method in interface java.sql.Statement
 int getFetchSize()
          Implements method in interface java.sql.Statement
 ResultSet getGeneratedKeys()
          Implements method in interface java.sql.Statement
 int getMaxFieldSize()
          Implements method in interface java.sql.Statement
 int getMaxRows()
          Implements method in interface java.sql.Statement
 boolean getMoreResults()
          Implements method in interface java.sql.Statement
 boolean getMoreResults(int current)
          Implements method in interface java.sql.Statement
 int getQueryTimeout()
          Implements method in interface java.sql.Statement
 ResultSet getResultSet()
          Implements method in interface java.sql.Statement
 int getResultSetConcurrency()
          Implements method in interface java.sql.Statement
 int getResultSetHoldability()
          Implements method in interface java.sql.Statement
 int getResultSetType()
          Implements method in interface java.sql.Statement
 int getUpdateCount()
          Implements method in interface java.sql.Statement
 SQLWarning getWarnings()
          Implements method in interface java.sql.Statement
 boolean isClosed()
           
 boolean isPoolable()
           
 boolean isWrapperFor(Class arg0)
           
 void setCursorName(String name)
          Implements method in interface java.sql.Statement
 void setEscapeProcessing(boolean enable)
          Implements method in interface java.sql.Statement
 void setFetchDirection(int direction)
          Implements method in interface java.sql.Statement
 void setFetchSize(int rows)
          Implements method in interface java.sql.Statement
 void setMaxFieldSize(int max)
          Implements method in interface java.sql.Statement
 void setMaxRows(int max)
          Implements method in interface java.sql.Statement
 void setPoolable(boolean arg0)
           
 void setQueryTimeout(int seconds)
          Implements method in interface java.sql.Statement
<T> T
unwrap(Class<T> arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

protected Connection conn
Constructor Detail

StatementImpl

public StatementImpl(Connection con)
              throws SQLException
Throws:
SQLException

StatementImpl

public StatementImpl(Connection con,
                     Statement stmt)
              throws SQLException
Create a new StatementImpl object.

Throws:
SQLException
Method Detail

addBatch

public void addBatch(String sql)
              throws SQLException
Implements method in interface java.sql.Statement

Specified by:
addBatch in interface Statement
Overrides:
addBatch in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.addBatch(java.lang.String)

cancel

public void cancel()
            throws SQLException
Implements method in interface java.sql.Statement

Specified by:
cancel in interface Statement
Overrides:
cancel in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.cancel()

clearBatch

public void clearBatch()
                throws SQLException
Implements method in interface java.sql.Statement

Specified by:
clearBatch in interface Statement
Overrides:
clearBatch in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.clearBatch()

clearWarnings

public void clearWarnings()
                   throws SQLException
Implements method in interface java.sql.Statement

Specified by:
clearWarnings in interface Statement
Overrides:
clearWarnings in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.clearWarnings()

close

public void close()
           throws SQLException
Implements method in interface java.sql.Statement

Specified by:
close in interface Statement
Specified by:
close in class IntegrateStatement
Throws:
SQLException - if a database access error occurs
See Also:
Statement.close()

execute

public boolean execute(String sql)
                throws SQLException
Implements method in interface java.sql.Statement

Specified by:
execute in interface Statement
Specified by:
execute in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.execute(java.lang.String)

execute

public boolean execute(String sql,
                       String[] columnNames)
                throws SQLException
Implements method in interface java.sql.Statement

Specified by:
execute in interface Statement
Overrides:
execute in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.execute(java.lang.String)

execute

public boolean execute(String sql,
                       int autoGeneratedKeys)
                throws SQLException
Implements method in interface java.sql.Statement

Specified by:
execute in interface Statement
Overrides:
execute in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.execute(java.lang.String)

execute

public boolean execute(String sql,
                       int[] columnIndexes)
                throws SQLException
Implements method in interface java.sql.Statement

Specified by:
execute in interface Statement
Overrides:
execute in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.execute(java.lang.String)

executeBatch

public int[] executeBatch()
                   throws SQLException
Implements method in interface java.sql.Statement

Specified by:
executeBatch in interface Statement
Overrides:
executeBatch in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.executeBatch()

executeQuery

public ResultSet executeQuery(String sql)
                       throws SQLException
Implements method in interface java.sql.Statement

Specified by:
executeQuery in interface Statement
Specified by:
executeQuery in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.executeQuery(java.lang.String)

executeUpdate

public int executeUpdate(String sql)
                  throws SQLException
Implements method in interface java.sql.Statement

Specified by:
executeUpdate in interface Statement
Specified by:
executeUpdate in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.executeUpdate(java.lang.String)

executeUpdate

public int executeUpdate(String sql,
                         String[] columnNames)
                  throws SQLException
Implements method in interface java.sql.Statement

Specified by:
executeUpdate in interface Statement
Overrides:
executeUpdate in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.executeUpdate(java.lang.String)

executeUpdate

public int executeUpdate(String sql,
                         int autoGeneratedKeys)
                  throws SQLException
Implements method in interface java.sql.Statement

Specified by:
executeUpdate in interface Statement
Overrides:
executeUpdate in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.executeUpdate(java.lang.String)

executeUpdate

public int executeUpdate(String sql,
                         int[] columnIndexes)
                  throws SQLException
Implements method in interface java.sql.Statement

Specified by:
executeUpdate in interface Statement
Overrides:
executeUpdate in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.executeUpdate(java.lang.String)

getConnection

public Connection getConnection()
                         throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getConnection in interface Statement
Specified by:
getConnection in class IntegrateStatement
Returns:
The connection value
Throws:
SQLException - Description of Exception
See Also:
Statement.getConnection()

getFetchDirection

public int getFetchDirection()
                      throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getFetchDirection in interface Statement
Overrides:
getFetchDirection in class IntegrateStatement
Returns:
The fetchDirection value
Throws:
SQLException - Description of Exception
See Also:
Statement.getFetchDirection()

getFetchSize

public int getFetchSize()
                 throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getFetchSize in interface Statement
Overrides:
getFetchSize in class IntegrateStatement
Returns:
The fetchSize value
Throws:
SQLException - Description of Exception
See Also:
Statement.getFetchSize()

getGeneratedKeys

public ResultSet getGeneratedKeys()
                           throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getGeneratedKeys in interface Statement
Overrides:
getGeneratedKeys in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.getGeneratedKeys()

getMaxFieldSize

public int getMaxFieldSize()
                    throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getMaxFieldSize in interface Statement
Overrides:
getMaxFieldSize in class IntegrateStatement
Returns:
The maxFieldSize value
Throws:
SQLException - Description of Exception
See Also:
Statement.getMaxFieldSize()

getMaxRows

public int getMaxRows()
               throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getMaxRows in interface Statement
Overrides:
getMaxRows in class IntegrateStatement
Returns:
The maxRows value
Throws:
SQLException - Description of Exception
See Also:
Statement.getMaxRows()

getMoreResults

public boolean getMoreResults()
                       throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getMoreResults in interface Statement
Overrides:
getMoreResults in class IntegrateStatement
Returns:
The moreResults value
Throws:
SQLException - Description of Exception
See Also:
Statement.getMoreResults()

getMoreResults

public boolean getMoreResults(int current)
                       throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getMoreResults in interface Statement
Overrides:
getMoreResults in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.getMoreResults()

getQueryTimeout

public int getQueryTimeout()
                    throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getQueryTimeout in interface Statement
Overrides:
getQueryTimeout in class IntegrateStatement
Returns:
The queryTimeout value
Throws:
SQLException - Description of Exception
See Also:
Statement.getQueryTimeout()

getResultSet

public ResultSet getResultSet()
                       throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getResultSet in interface Statement
Overrides:
getResultSet in class IntegrateStatement
Returns:
The resultSet value
Throws:
SQLException - Description of Exception
See Also:
Statement.getResultSet()

getResultSetConcurrency

public int getResultSetConcurrency()
                            throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getResultSetConcurrency in interface Statement
Overrides:
getResultSetConcurrency in class IntegrateStatement
Returns:
The resultSetConcurrency value
Throws:
SQLException - Description of Exception
See Also:
Statement.getResultSetConcurrency()

getResultSetHoldability

public int getResultSetHoldability()
                            throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getResultSetHoldability in interface Statement
Overrides:
getResultSetHoldability in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.getResultSetHoldability()

getResultSetType

public int getResultSetType()
                     throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getResultSetType in interface Statement
Overrides:
getResultSetType in class IntegrateStatement
Returns:
The resultSetType value
Throws:
SQLException - Description of Exception
See Also:
Statement.getResultSetType()

getUpdateCount

public int getUpdateCount()
                   throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getUpdateCount in interface Statement
Overrides:
getUpdateCount in class IntegrateStatement
Returns:
The updateCount value
Throws:
SQLException - Description of Exception
See Also:
Statement.getUpdateCount()

getWarnings

public SQLWarning getWarnings()
                       throws SQLException
Implements method in interface java.sql.Statement

Specified by:
getWarnings in interface Statement
Overrides:
getWarnings in class IntegrateStatement
Returns:
The warnings value
Throws:
SQLException - Description of Exception
See Also:
Statement.getWarnings()

isClosed

public boolean isClosed()
                 throws SQLException
Specified by:
isClosed in interface Statement
Overrides:
isClosed in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.isClosed()

isPoolable

public boolean isPoolable()
                   throws SQLException
Specified by:
isPoolable in interface Statement
Overrides:
isPoolable in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.isPoolable()

isWrapperFor

public boolean isWrapperFor(Class arg0)
                     throws SQLException
Specified by:
isWrapperFor in interface Wrapper
Overrides:
isWrapperFor in class IntegrateStatement
Throws:
SQLException
See Also:
Wrapper.isWrapperFor(java.lang.Class)

setCursorName

public void setCursorName(String name)
                   throws SQLException
Implements method in interface java.sql.Statement

Specified by:
setCursorName in interface Statement
Overrides:
setCursorName in class IntegrateStatement
Parameters:
name - The new cursorName value
Throws:
SQLException - Description of Exception
See Also:
Statement.setCursorName(java.lang.String)

setEscapeProcessing

public void setEscapeProcessing(boolean enable)
                         throws SQLException
Implements method in interface java.sql.Statement

Specified by:
setEscapeProcessing in interface Statement
Overrides:
setEscapeProcessing in class IntegrateStatement
Parameters:
enable - The new escapeProcessing value
Throws:
SQLException - Description of Exception
See Also:
Statement.setEscapeProcessing(boolean)

setFetchDirection

public void setFetchDirection(int direction)
                       throws SQLException
Implements method in interface java.sql.Statement

Specified by:
setFetchDirection in interface Statement
Overrides:
setFetchDirection in class IntegrateStatement
Parameters:
direction - The new fetchDirection value
Throws:
SQLException - Description of Exception
See Also:
Statement.setFetchDirection(int)

setFetchSize

public void setFetchSize(int rows)
                  throws SQLException
Implements method in interface java.sql.Statement

Specified by:
setFetchSize in interface Statement
Overrides:
setFetchSize in class IntegrateStatement
Parameters:
rows - The new fetchSize value
Throws:
SQLException - Description of Exception
See Also:
Statement.setFetchSize(int)

setMaxFieldSize

public void setMaxFieldSize(int max)
                     throws SQLException
Implements method in interface java.sql.Statement

Specified by:
setMaxFieldSize in interface Statement
Overrides:
setMaxFieldSize in class IntegrateStatement
Parameters:
max - The new maxFieldSize value
Throws:
SQLException - Description of Exception
See Also:
Statement.setMaxFieldSize(int)

setMaxRows

public void setMaxRows(int max)
                throws SQLException
Implements method in interface java.sql.Statement

Specified by:
setMaxRows in interface Statement
Overrides:
setMaxRows in class IntegrateStatement
Parameters:
max - The new maxRows value
Throws:
SQLException - Description of Exception
See Also:
Statement.setMaxRows(int)

setQueryTimeout

public void setQueryTimeout(int seconds)
                     throws SQLException
Implements method in interface java.sql.Statement

Specified by:
setQueryTimeout in interface Statement
Overrides:
setQueryTimeout in class IntegrateStatement
Parameters:
seconds - The new queryTimeout value
Throws:
SQLException - Description of Exception
See Also:
Statement.setQueryTimeout(int)

setPoolable

public void setPoolable(boolean arg0)
                 throws SQLException
Specified by:
setPoolable in interface Statement
Overrides:
setPoolable in class IntegrateStatement
Throws:
SQLException
See Also:
Statement.isPoolable()

unwrap

public <T> T unwrap(Class<T> arg0)
         throws SQLException
Specified by:
unwrap in interface Wrapper
Overrides:
unwrap in class IntegrateStatement
Throws:
SQLException
See Also:
Wrapper.unwrap(java.lang.Class)


Copyright © 2008 Rogério Arantes Gaioso. All Rights Reserved.