|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.p13n.content.document.jdbc.Connection
A connection to a DMS via an internally used DocumentProvider.
All the real functionality of this class is in the prepareCall() method.
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 |
public static final String DOCUMENT_PROVIDER_PROP
protected DocumentProvider provider
Constructor Detail |
protected Connection(DocumentProvider provider)
setDocumentProvider(com.bea.p13n.content.document.spi.DocumentProvider)
public Connection(String url, Properties props) throws DocumentException
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.
DocumentException
- thrown if the DocumentProvider cannot be
created or initialized.createDocumentProvider(java.util.Properties, java.lang.ClassLoader)
public Connection(String url, Properties props, ClassLoader classLoader) throws DocumentException
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.
DocumentException
- thrown if the DocumentProvider cannot be
created or initialized.createDocumentProvider(java.util.Properties, java.lang.ClassLoader)
Method Detail |
public void clearWarnings()
clearWarnings
in interface Connection
public void close() throws SQLException
close
in interface Connection
SQLException
- thrown on an error.DocumentProvider.close()
public void commit()
commit
in interface Connection
public DocumentProvider createDocumentProvider(Properties p) throws DocumentException
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.
p
- the properties.
DocumentException
- thrown on an errorcreateDocumentProvider(java.lang.String, java.util.Properties)
public DocumentProvider createDocumentProvider(Properties p, ClassLoader classLoader) throws DocumentException
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.
p
- the properties.
DocumentException
- thrown on an errorcreateDocumentProvider(java.lang.String, java.util.Properties)
public static DocumentProvider createDocumentProvider(String clName, Properties p) throws DocumentException
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.
clName
- the class name of the document provider.p
- the configuration properties to initialize the provider with.
DocumentException
- thrown on an error.public static DocumentProvider createDocumentProvider(String clName, Properties p, ClassLoader classLoader) throws DocumentException
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.
clName
- the class name of the document provider.p
- the configuration properties to initialize the provider with.
DocumentException
- thrown on an error.public Statement createStatement() throws SQLException
createStatement
in interface Connection
SQLException
- always thrown.public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement
in interface Connection
SQLException
- always thrown.createStatement()
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement
in interface Connection
SQLException
- always thrown.createStatement()
public boolean getAutoCommit()
getAutoCommit
in interface Connection
public String getCatalog() throws SQLException
getCatalog
in interface Connection
SQLException
- always thrown.protected DocumentProvider getDocumentProvider() throws DocumentException
DocumentException
- thrown if the provider is null (i.e.
closed or uninitialized).public int getHoldability() throws SQLException
getHoldability
in interface Connection
SQLException
public DatabaseMetaData getMetaData() throws SQLException
getMetaData
in interface Connection
SQLException
- always thrown.public int getTransactionIsolation() throws SQLException
getTransactionIsolation
in interface Connection
SQLException
- thrown on an error.DocumentProvider.getTransactionIsolation()
public Map getTypeMap() throws SQLException
getTypeMap
in interface Connection
SQLException
- always thrown.public SQLWarning getWarnings()
getWarnings
in interface Connection
public boolean isClosed()
isClosed
in interface Connection
public boolean isReadOnly()
isReadOnly
in interface Connection
public String nativeSQL(String sql) throws SQLException
nativeSQL
in interface Connection
SQLException
- always thrownpublic CallableStatement prepareCall(String sql) throws SQLException
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.
prepareCall
in interface Connection
sql
- the function to execute.
SQLException
- thrown on invalid sql.public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall
in interface Connection
sql
- the sql statement.resultSetType
- ignored.resultSetConcurrency
- ignored.
SQLException
- thrown on invalid sql.prepareCall(java.lang.String)
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int holdability) throws SQLException
prepareCall
in interface Connection
sql
- the sql statement.resultSetType
- ignored.resultSetConcurrency
- ignored.holdability
- ignored.
SQLException
- thrown on invalid sql.prepareCall(java.lang.String)
public PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement
in interface Connection
SQLException
- always thrown.public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement
in interface Connection
SQLException
- always thrown.prepareStatement(java.lang.String)
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement
in interface Connection
SQLException
- always thrown.prepareStatement(java.lang.String)
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement
in interface Connection
SQLException
- always thrown.prepareStatement(java.lang.String)
public PreparedStatement prepareStatement(String sql, int type, int concurrency, int holdability) throws SQLException
prepareStatement
in interface Connection
SQLException
- always thrown.prepareStatement(java.lang.String)
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement
in interface Connection
SQLException
- always thrown.prepareStatement(java.lang.String)
public void releaseSavepoint(Savepoint savepoint) throws SQLException
releaseSavepoint
in interface Connection
SQLException
public void rollback() throws SQLException
rollback
in interface Connection
SQLException
- thrown on an error.DocumentProvider.reset()
public void rollback(Savepoint savepoint) throws SQLException
rollback
in interface Connection
SQLException
public void setAutoCommit(boolean autoCommit)
setAutoCommit
in interface Connection
public void setCatalog(String catalog) throws SQLException
setCatalog
in interface Connection
SQLException
- always thrown.protected void setDocumentProvider(DocumentProvider provider)
public void setHoldability(int holdability) throws SQLException
setHoldability
in interface Connection
SQLException
public void setReadOnly(boolean readOnly)
setReadOnly
in interface Connection
public Savepoint setSavepoint() throws SQLException
setSavepoint
in interface Connection
SQLException
public Savepoint setSavepoint(String name) throws SQLException
setSavepoint
in interface Connection
SQLException
public void setTransactionIsolation(int level) throws SQLException
setTransactionIsolation
in interface Connection
level
- one of the TRANSACTION_* values.
SQLException
- throw on an error.DocumentProvider.setTransactionIsolation(int)
public void setTypeMap(Map map) throws SQLException
setTypeMap
in interface Connection
SQLException
- always thrown.
|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |