Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.content.document.jdbc
Class Connection

    java.lang.Object
      com.bea.p13n.content.document.jdbc.Connection

All Implemented Interfaces:
  Connection

public class Connection
extends Object
implements Connection

A connection to a DMS via an internally used DocumentProvider.

All the real functionality of this class is in the prepareCall() method.

See Also:
  `Driver`, `prepareCall(java.lang.String)`

Field Summary
`static String` | `DOCUMENT_PROVIDER_PROP` Deprecated. The property name of the DocumentProvider class to use.
`protected DocumentProvider` | `provider` Deprecated. The document provider we're using.

Fields inherited from interface java.sql.Connection
`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

Constructor Summary
`protected` | `Connection(DocumentProvider provider)` Deprecated. Constructor.
`` | `Connection(String url, Properties props)` Deprecated. Constructor.
`` | `Connection(String url, Properties props, ClassLoader classLoader)` Deprecated. Constructor.

Method Summary
`void` | `clearWarnings()` Deprecated. Intentional empty implementation.
`void` | `close()` Deprecated. This will close the DocumentProvider
`void` | `commit()` Deprecated. Ignored.
`DocumentProvider` | `createDocumentProvider(Properties p)` Deprecated. Create and initialize a DocumentProvider from the given properties.
`DocumentProvider` | `createDocumentProvider(Properties p, ClassLoader classLoader)` Deprecated. Create and initialize a DocumentProvider from the given properties.
`static DocumentProvider` | `createDocumentProvider(String clName, Properties p)` Deprecated. Create and initialize a DocumentProvider.
`static DocumentProvider` | `createDocumentProvider(String clName, Properties p, ClassLoader classLoader)` Deprecated. Create and initialize a DocumentProvider.
`Statement` | `createStatement()` Deprecated. Not supported.
`Statement` | `createStatement(int resultSetType, int resultSetConcurrency)` Deprecated. Not supported.
`Statement` | `createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)` Deprecated. Not supported.
`boolean` | `getAutoCommit()` Deprecated. We're readonly anyways.
`String` | `getCatalog()` Deprecated. Not supported.
`protected DocumentProvider` | `getDocumentProvider()` Deprecated. Get the document provider used.
`int` | `getHoldability()` Deprecated.
`DatabaseMetaData` | `getMetaData()` Deprecated. Not supported.
`int` | `getTransactionIsolation()` Deprecated. Get the transaction isolation level used by the document provider.
`Map` | `getTypeMap()` Deprecated. Not supported.
`SQLWarning` | `getWarnings()` Deprecated. Intentional empty implementation.
`boolean` | `isClosed()` Deprecated. Tell if this connection/document provider has been closed.
`boolean` | `isReadOnly()` Deprecated. DocumentProvider's are read only.
`String` | `nativeSQL(String sql)` Deprecated. Not supported.
`CallableStatement` | `prepareCall(String sql)` Deprecated. Prepare a Callable statement for use.
`CallableStatement` | `prepareCall(String sql, int resultSetType, int resultSetConcurrency)` Deprecated.
`CallableStatement` | `prepareCall(String sql, int resultSetType, int resultSetConcurrency, int holdability)` Deprecated.
`PreparedStatement` | `prepareStatement(String sql)` Deprecated. Not supported.
`PreparedStatement` | `prepareStatement(String sql, int autoGeneratedKeys)` Deprecated. Not supported.
`PreparedStatement` | `prepareStatement(String sql, int[] columnIndexes)` Deprecated. Not supported.
`PreparedStatement` | `prepareStatement(String sql, int resultSetType, int resultSetConcurrency)` Deprecated. Not supported.
`PreparedStatement` | `prepareStatement(String sql, int type, int concurrency, int holdability)` Deprecated. Not supported.
`PreparedStatement` | `prepareStatement(String sql, String[] columnNames)` Deprecated. Not supported.
`void` | `releaseSavepoint(Savepoint savepoint)` Deprecated.
`void` | `rollback()` Deprecated. This will reset the DocumentProvider.
`void` | `rollback(Savepoint savepoint)` Deprecated.
`void` | `setAutoCommit(boolean autoCommit)` Deprecated. Ignored.
`void` | `setCatalog(String catalog)` Deprecated. Not supported.
`protected void` | `setDocumentProvider(DocumentProvider provider)` Deprecated. Set the document provider to use.
`void` | `setHoldability(int holdability)` Deprecated.
`void` | `setReadOnly(boolean readOnly)` Deprecated. Ignored.
`Savepoint` | `setSavepoint()` Deprecated.
`Savepoint` | `setSavepoint(String name)` Deprecated.
`void` | `setTransactionIsolation(int level)` Deprecated. Set the transaction isolation level on the document provider.
`void` | `setTypeMap(Map map)` Deprecated. Not supported.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DOCUMENT_PROVIDER_PROP

    public static final String DOCUMENT_PROVIDER_PROP

  Deprecated.
  The property name of the DocumentProvider class to use.

  See Also:
    Constant Field Values

### provider

    protected DocumentProvider provider

  Deprecated.
  The document provider we're using.

Constructor Detail

### Connection

    protected Connection(DocumentProvider provider)

  Deprecated.
  Constructor.

See Also:
  `setDocumentProvider(com.bea.p13n.content.document.spi.DocumentProvider)`

### Connection

    public Connection(String url,
                      Properties props)
               throws DocumentException

  Deprecated.
  Constructor.

  This will pull the class name of the DocumentProvider to use from the properties at DOCUMENT_PROVIDER_PROP ("documentProvider"). It will instantiate the provider and initialize it.

Throws:
  `DocumentException` - thrown if the DocumentProvider cannot be created or initialized.
See Also:
  `createDocumentProvider(java.util.Properties, java.lang.ClassLoader)`

### Connection

    public Connection(String url,
                      Properties props,
                      ClassLoader classLoader)
               throws DocumentException

  Deprecated.
  Constructor.

  This will pull the class name of the DocumentProvider to use from the properties at DOCUMENT_PROVIDER_PROP ("documentProvider"). It will instantiate the provider and initialize it.

Throws:
  `DocumentException` - thrown if the DocumentProvider cannot be created or initialized.
See Also:
  `createDocumentProvider(java.util.Properties, java.lang.ClassLoader)`

Method Detail

### clearWarnings

    public void clearWarnings()

  Deprecated.
  Intentional empty implementation.

  Specified by:
    `clearWarnings` in interface `Connection`

### close

    public void close()
               throws SQLException

  Deprecated.
  This will close the DocumentProvider

  Specified by:
    `close` in interface `Connection`
  Throws:
    `SQLException` - thrown on an error.
  See Also:
    `DocumentProvider.close()`

### commit

    public void commit()

  Deprecated.
  Ignored.

  Specified by:
    `commit` in interface `Connection`

### createDocumentProvider

    public DocumentProvider createDocumentProvider(Properties p)
                                            throws DocumentException

  Deprecated.
  Create and initialize a DocumentProvider from the given properties.

  This is called by the constructor. This method will pull the document provider class name from the properties, load the class, create an instance, and initialize it. Subclasses can override to modify where the DocumentProvider comes from.

  Parameters:
    `p` - the properties.
  Returns:
    the DocumentProvider.
  Throws:
    `DocumentException` - thrown on an error
  See Also:
    `createDocumentProvider(java.lang.String, java.util.Properties)`

### createDocumentProvider

    public DocumentProvider createDocumentProvider(Properties p,
                                                   ClassLoader classLoader)
                                            throws DocumentException

  Deprecated.
  Create and initialize a DocumentProvider from the given properties.

  This is called by the constructor. This method will pull the document provider class name from the properties, load the class, create an instance, and initialize it. Subclasses can override to modify where the DocumentProvider comes from.

  Parameters:
    `p` - the properties.
  Returns:
    the DocumentProvider.
  Throws:
    `DocumentException` - thrown on an error
  See Also:
    `createDocumentProvider(java.lang.String, java.util.Properties)`

### createDocumentProvider

    public static DocumentProvider createDocumentProvider(String clName,
                                                          Properties p)
                                                   throws DocumentException

  Deprecated.
  Create and initialize a DocumentProvider.

  This will load the specified class, create an instance, cast it to DocumentProvider, and invoke init() on that. It will also wrap any exceptions into a DocumentException.

  Parameters:
    `clName` - the class name of the document provider.
    `p` - the configuration properties to initialize the provider with.
  Returns:
    the initialize document provider.
  Throws:
    `DocumentException` - thrown on an error.

### createDocumentProvider

    public static DocumentProvider createDocumentProvider(String clName,
                                                          Properties p,
                                                          ClassLoader classLoader)
                                                   throws DocumentException

  Deprecated.
  Create and initialize a DocumentProvider.

  This will load the specified class, create an instance, cast it to DocumentProvider, and invoke init() on that. It will also wrap any exceptions into a DocumentException.

  Parameters:
    `clName` - the class name of the document provider.
    `p` - the configuration properties to initialize the provider with.
  Returns:
    the initialize document provider.
  Throws:
    `DocumentException` - thrown on an error.

### createStatement

    public Statement createStatement()
                              throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `createStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.

### createStatement

    public Statement createStatement(int resultSetType,
                                     int resultSetConcurrency)
                              throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `createStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.
  See Also:
    `createStatement()`

### createStatement

    public Statement createStatement(int resultSetType,
                                     int resultSetConcurrency,
                                     int resultSetHoldability)
                              throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `createStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.
  See Also:
    `createStatement()`

### getAutoCommit

    public boolean getAutoCommit()

  Deprecated.
  We're readonly anyways.

  Specified by:
    `getAutoCommit` in interface `Connection`
  Returns:
    true.

### getCatalog

    public String getCatalog()
                      throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `getCatalog` in interface `Connection`
  Throws:
    `SQLException` - always thrown.

### getDocumentProvider

    protected DocumentProvider getDocumentProvider()
                                            throws DocumentException

  Deprecated.
  Get the document provider used.

  Throws:
    `DocumentException` - thrown if the provider is null (i.e. closed or uninitialized).

### getHoldability

    public int getHoldability()
                       throws SQLException

  Deprecated.
  Specified by:
    `getHoldability` in interface `Connection`
  Throws:
    `SQLException`

### getMetaData

    public DatabaseMetaData getMetaData()
                                 throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `getMetaData` in interface `Connection`
  Throws:
    `SQLException` - always thrown.

### getTransactionIsolation

    public int getTransactionIsolation()
                                throws SQLException

  Deprecated.
  Get the transaction isolation level used by the document provider.

  Specified by:
    `getTransactionIsolation` in interface `Connection`
  Throws:
    `SQLException` - thrown on an error.
  See Also:
    `DocumentProvider.getTransactionIsolation()`

### getTypeMap

    public Map getTypeMap()
                   throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `getTypeMap` in interface `Connection`
  Throws:
    `SQLException` - always thrown.

### getWarnings

    public SQLWarning getWarnings()

  Deprecated.
  Intentional empty implementation.

  Specified by:
    `getWarnings` in interface `Connection`

### isClosed

    public boolean isClosed()

  Deprecated.
  Tell if this connection/document provider has been closed.

  Specified by:
    `isClosed` in interface `Connection`
  Returns:
    true if it's already closed, false if not.

### isReadOnly

    public boolean isReadOnly()

  Deprecated.
  DocumentProvider's are read only.

  Specified by:
    `isReadOnly` in interface `Connection`
  Returns:
    true

### nativeSQL

    public String nativeSQL(String sql)
                     throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `nativeSQL` in interface `Connection`
  Throws:
    `SQLException` - always thrown

### prepareCall

    public CallableStatement prepareCall(String sql)
                                  throws SQLException

  Deprecated.
  Prepare a Callable statement for use.

  The prepareCall method understands the following query strings. The required input params and output params are also documented:

  - `findDocuments`: Param1 must be either a Search or a String (which is the query string). Output 1 will be a DocumentIterator of the DocumentDefs which match.
  - `findDocumentIds`: Param1 must be either a Search or a String (which is the query string). Output 1 will be a DocumentIterator of the String document ids which match.
  - `findDocumentMetadata`: Param1 must be either a Search or a String (which is the query string). Output1 will be a DocumentIterator of the DocumentMetadataDefs which match.
  - `getDocumentMetadata`: Param1 must be the String document id. Ouptut1 will be the DocumentMetadataDef of the document with the id, or null if unknown id.
  - `getDocumentModifiedDate`: Param1 must be the String document id. Output1 will be the Timestamp last modified time of the document, or null if unknown.
  - `getDocument`: Param1 must be the String document id. Ouptut1 will be the DocumentDef of the document with the id, or null if unknown id.
  - `getSchemaNames`: Output1 will be a DocumentIterator of the schema names (Strings).
  - `getSchema`: Param1 must be the String name of the schema. Output1 will be the DocumentSchemaDef or null.
  - `getSchemas`: Output1 will be the Map of schema name to DocumentSchemaDef.

  Specified by:
    `prepareCall` in interface `Connection`
  Parameters:
    `sql` - the function to execute.
  Returns:
    a CallableStatement which can be used to execute the query.
  Throws:
    `SQLException` - thrown on invalid sql.

### prepareCall

    public CallableStatement prepareCall(String sql,
                                         int resultSetType,
                                         int resultSetConcurrency)
                                  throws SQLException

  Deprecated.
  Specified by:
    `prepareCall` in interface `Connection`
  Parameters:
    `sql` - the sql statement.
    `resultSetType` - ignored.
    `resultSetConcurrency` - ignored.
  Returns:
    a CallableStatement
  Throws:
    `SQLException` - thrown on invalid sql.
  See Also:
    `prepareCall(java.lang.String)`

### prepareCall

    public CallableStatement prepareCall(String sql,
                                         int resultSetType,
                                         int resultSetConcurrency,
                                         int holdability)
                                  throws SQLException

  Deprecated.
  Specified by:
    `prepareCall` in interface `Connection`
  Parameters:
    `sql` - the sql statement.
    `resultSetType` - ignored.
    `resultSetConcurrency` - ignored.
    `holdability` - ignored.
  Returns:
    a CallableStatement
  Throws:
    `SQLException` - thrown on invalid sql.
  See Also:
    `prepareCall(java.lang.String)`

### prepareStatement

    public PreparedStatement prepareStatement(String sql)
                                       throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `prepareStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.

### prepareStatement

    public PreparedStatement prepareStatement(String sql,
                                              int autoGeneratedKeys)
                                       throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `prepareStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.
  See Also:
    `prepareStatement(java.lang.String)`

### prepareStatement

    public PreparedStatement prepareStatement(String sql,
                                              int[] columnIndexes)
                                       throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `prepareStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.
  See Also:
    `prepareStatement(java.lang.String)`

### prepareStatement

    public PreparedStatement prepareStatement(String sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
                                       throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `prepareStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.
  See Also:
    `prepareStatement(java.lang.String)`

### prepareStatement

    public PreparedStatement prepareStatement(String sql,
                                              int type,
                                              int concurrency,
                                              int holdability)
                                       throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `prepareStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.
  See Also:
    `prepareStatement(java.lang.String)`

### prepareStatement

    public PreparedStatement prepareStatement(String sql,
                                              String[] columnNames)
                                       throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `prepareStatement` in interface `Connection`
  Throws:
    `SQLException` - always thrown.
  See Also:
    `prepareStatement(java.lang.String)`

### releaseSavepoint

    public void releaseSavepoint(Savepoint savepoint)
                          throws SQLException

  Deprecated.
  Specified by:
    `releaseSavepoint` in interface `Connection`
  Throws:
    `SQLException`

### rollback

    public void rollback()
                  throws SQLException

  Deprecated.
  This will reset the DocumentProvider.

  Specified by:
    `rollback` in interface `Connection`
  Throws:
    `SQLException` - thrown on an error.
  See Also:
    `DocumentProvider.reset()`

### rollback

    public void rollback(Savepoint savepoint)
                  throws SQLException

  Deprecated.
  Specified by:
    `rollback` in interface `Connection`
  Throws:
    `SQLException`

### setAutoCommit

    public void setAutoCommit(boolean autoCommit)

  Deprecated.
  Ignored.

  Specified by:
    `setAutoCommit` in interface `Connection`

### setCatalog

    public void setCatalog(String catalog)
                    throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `setCatalog` in interface `Connection`
  Throws:
    `SQLException` - always thrown.

### setDocumentProvider

    protected void setDocumentProvider(DocumentProvider provider)

  Deprecated.
  Set the document provider to use.

### setHoldability

    public void setHoldability(int holdability)
                        throws SQLException

  Deprecated.
  Specified by:
    `setHoldability` in interface `Connection`
  Throws:
    `SQLException`

### setReadOnly

    public void setReadOnly(boolean readOnly)

  Deprecated.
  Ignored.

  Specified by:
    `setReadOnly` in interface `Connection`

### setSavepoint

    public Savepoint setSavepoint()
                           throws SQLException

  Deprecated.
  Specified by:
    `setSavepoint` in interface `Connection`
  Throws:
    `SQLException`

### setSavepoint

    public Savepoint setSavepoint(String name)
                           throws SQLException

  Deprecated.
  Specified by:
    `setSavepoint` in interface `Connection`
  Throws:
    `SQLException`

### setTransactionIsolation

    public void setTransactionIsolation(int level)
                                 throws SQLException

  Deprecated.
  Set the transaction isolation level on the document provider.

  Specified by:
    `setTransactionIsolation` in interface `Connection`
  Parameters:
    `level` - one of the TRANSACTION_* values.
  Throws:
    `SQLException` - throw on an error.
  See Also:
    `DocumentProvider.setTransactionIsolation(int)`

### setTypeMap

    public void setTypeMap(Map map)
                    throws SQLException

  Deprecated.
  Not supported.

  Specified by:
    `setTypeMap` in interface `Connection`
  Throws:
    `SQLException` - always thrown.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved