org.objectweb.cjdbc.controller.backend
Class DriverCompliance

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.backend.DriverCompliance

public class DriverCompliance
extends java.lang.Object

This class checks if a given driver provides the mandatory features necessary for C-JDBC.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
private  java.lang.String databaseProductName
           
private static java.lang.String DEFAULT_TEST_STATEMENT
           
private  boolean hasBeenTested
           
private  boolean isCompliant
           
private  Trace logger
           
private  boolean supportGetColumnClassName
           
private  boolean supportGetColumnCount
           
private  boolean supportGetColumnDisplaySize
           
private  boolean supportGetColumnType
           
private  boolean supportGetColumnTypeName
           
private  boolean supportGetGeneratedKeys
           
private  boolean supportGetTableName
           
private  boolean supportSetCursorName
           
private  boolean supportSetFetchSize
           
private  boolean supportSetMaxRows
           
private  boolean supportSetQueryTimeout
           
private static int TIMEOUT_VALUE
           
 
Constructor Summary
DriverCompliance(Trace logger)
          Builds a new DriverCompliance object.
 
Method Summary
 boolean complianceTest(java.lang.String backendUrl, java.lang.String login, java.lang.String password, java.lang.String driverPath, java.lang.String driverClassName, java.lang.String connectionTestStatement)
          Check the driver compliance.
 java.lang.String getDatabaseProductName()
          Returns the databaseProductName value.
 boolean isCompliant()
           
 boolean supportGetColumnClassName()
           
 boolean supportGetColumnCount()
           
 boolean supportGetColumnDisplaySize()
           
 boolean supportGetColumnType()
           
 boolean supportGetColumnTypeName()
           
 boolean supportGetGeneratedKeys()
           
 boolean supportGetTableName()
           
 boolean supportSetCursorName()
          Returns the supportSetCursorName value.
 boolean supportSetFetchSize()
          Returns the supportSetFetchSize value.
 boolean supportSetMaxRows()
           
 boolean supportSetQueryTimeout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isCompliant

private boolean isCompliant

hasBeenTested

private boolean hasBeenTested

supportSetQueryTimeout

private boolean supportSetQueryTimeout

supportGetGeneratedKeys

private boolean supportGetGeneratedKeys

supportGetColumnCount

private boolean supportGetColumnCount

supportGetColumnClassName

private boolean supportGetColumnClassName

supportGetColumnTypeName

private boolean supportGetColumnTypeName

supportGetColumnType

private boolean supportGetColumnType

supportGetColumnDisplaySize

private boolean supportGetColumnDisplaySize

supportGetTableName

private boolean supportGetTableName

supportSetCursorName

private boolean supportSetCursorName

supportSetFetchSize

private boolean supportSetFetchSize

supportSetMaxRows

private boolean supportSetMaxRows

logger

private Trace logger

TIMEOUT_VALUE

private static final int TIMEOUT_VALUE
See Also:
Constant Field Values

DEFAULT_TEST_STATEMENT

private static final java.lang.String DEFAULT_TEST_STATEMENT
See Also:
Constant Field Values

databaseProductName

private java.lang.String databaseProductName
Constructor Detail

DriverCompliance

public DriverCompliance(Trace logger)
Builds a new DriverCompliance object.

Parameters:
logger - the logger to use
Method Detail

complianceTest

public boolean complianceTest(java.lang.String backendUrl,
                              java.lang.String login,
                              java.lang.String password,
                              java.lang.String driverPath,
                              java.lang.String driverClassName,
                              java.lang.String connectionTestStatement)
                       throws java.net.ConnectException
Check the driver compliance.

Parameters:
backendUrl - the JDBC URL to connect to
login - the user login
password - the user password
driverPath - path for driver
driverClassName - class name for driver
connectionTestStatement - SQL statement used to check if a connection is still valid
Returns:
true if the driver is C-JDBC compliant
Throws:
java.net.ConnectException - if it is not possible to connect to the backend

isCompliant

public boolean isCompliant()
Returns:
true if the driver is compliant to the C-JDBC requirements

supportGetGeneratedKeys

public boolean supportGetGeneratedKeys()
Returns:
true if the driver supports getGeneratedKeys

supportGetColumnClassName

public boolean supportGetColumnClassName()
Returns:
true if the driver supports getColumnClassName

supportGetColumnCount

public boolean supportGetColumnCount()
Returns:
true if the driver supports getColumnCount

supportGetColumnDisplaySize

public boolean supportGetColumnDisplaySize()
Returns:
true if the driver supports getColumnDisplaySize

supportGetColumnType

public boolean supportGetColumnType()
Returns:
true if the driver supports getColumnType

supportGetColumnTypeName

public boolean supportGetColumnTypeName()
Returns:
true if the driver supports getColumnTypeName

supportGetTableName

public boolean supportGetTableName()
Returns:
true if the driver supports getTableName

supportSetQueryTimeout

public boolean supportSetQueryTimeout()
Returns:
true if the driver supports setQueryTimeout

supportSetMaxRows

public boolean supportSetMaxRows()
Returns:
true if the driver supports Statement.setMaxRows

supportSetCursorName

public boolean supportSetCursorName()
Returns the supportSetCursorName value.

Returns:
Returns the supportSetCursorName.

supportSetFetchSize

public boolean supportSetFetchSize()
Returns the supportSetFetchSize value.

Returns:
Returns the supportSetFetchSize.

getDatabaseProductName

public java.lang.String getDatabaseProductName()
Returns the databaseProductName value.

Returns:
Returns the databaseProductName.


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.