|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.beasys.commerce.axiom.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 java.lang.String |
DOCUMENT_PROVIDER_PROP
The property name of the DocumentProvider class to use. |
protected DocumentProvider |
provider
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)
Constructor. |
|
Connection(java.lang.String url,
java.util.Properties props)
Constructor. |
| Method Summary | |
void |
clearWarnings()
Intentional empty implementation. |
void |
close()
This will close the DocumentProvider |
void |
commit()
Ignored. |
DocumentProvider |
createDocumentProvider(java.util.Properties p)
Create and initialize a DocumentProvider from the given properties. |
static DocumentProvider |
createDocumentProvider(java.lang.String clName,
java.util.Properties p)
Create and initialize a DocumentProvider. |
java.sql.Statement |
createStatement()
Not supported. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
Not supported. |
boolean |
getAutoCommit()
We're readonly anyways. |
java.lang.String |
getCatalog()
Not supported. |
protected DocumentProvider |
getDocumentProvider()
Get the document provider used. |
java.sql.DatabaseMetaData |
getMetaData()
Not supported. |
int |
getTransactionIsolation()
Get the transaction isolation level used by the document provider. |
java.util.Map |
getTypeMap()
Not supported. |
java.sql.SQLWarning |
getWarnings()
Intentional empty implementation. |
boolean |
isClosed()
Tell if this connection/document provider has been closed. |
boolean |
isReadOnly()
DocumentProvider's are read only. |
java.lang.String |
nativeSQL(java.lang.String sql)
Not supported. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
Prepare a Callable statement for use. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Not supported. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Not supported. |
void |
rollback()
This will reset the DocumentProvider. |
void |
setAutoCommit(boolean autoCommit)
Ignored. |
void |
setCatalog(java.lang.String catalog)
Not supported. |
protected void |
setDocumentProvider(DocumentProvider provider)
Set the document provider to use. |
void |
setReadOnly(boolean readOnly)
Ignored. |
void |
setTransactionIsolation(int level)
Set the transaction isolation level on the document provider. |
void |
setTypeMap(java.util.Map map)
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 java.lang.String DOCUMENT_PROVIDER_PROP
protected DocumentProvider provider
| Constructor Detail |
public Connection(java.lang.String url,
java.util.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.
url - the JDBC url.props - the connection properties.DocumentException - thrown if the DocumentProvider cannot be
created or initialized.createDocumentProvider(java.util.Properties)protected Connection(DocumentProvider provider)
provider - the document provider instance to use.setDocumentProvider(com.beasys.commerce.axiom.document.spi.DocumentProvider)| Method Detail |
public DocumentProvider createDocumentProvider(java.util.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 static DocumentProvider createDocumentProvider(java.lang.String clName,
java.util.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.
protected DocumentProvider getDocumentProvider()
throws DocumentException
DocumentException - thrown if the provider is null (i.e.
closed or uninitialized).protected void setDocumentProvider(DocumentProvider provider)
public java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException - always thrown.
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException - always thrown.
public java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.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 java.sql.Connectionsql - the function to execute.java.sql.SQLException - thrown on invalid sql.
public java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionjava.sql.SQLException - always thrownpublic void setAutoCommit(boolean autoCommit)
setAutoCommit in interface java.sql.Connectionpublic boolean getAutoCommit()
getAutoCommit in interface java.sql.Connectionpublic void commit()
commit in interface java.sql.Connection
public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException - thrown on an error.DocumentProvider.reset()
public void close()
throws java.sql.SQLException
close in interface java.sql.Connectionjava.sql.SQLException - thrown on an error.DocumentProvider.close()public boolean isClosed()
isClosed in interface java.sql.Connection
public java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLException - always thrown.public void setReadOnly(boolean readOnly)
setReadOnly in interface java.sql.Connectionpublic boolean isReadOnly()
isReadOnly in interface java.sql.Connection
public void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionjava.sql.SQLException - always thrown.
public java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.Connectionjava.sql.SQLException - always thrown.
public void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionlevel - one of the TRANSACTION_* values.java.sql.SQLException - throw on an error.DocumentProvider.setTransactionIsolation(int)
public int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException - thrown on an error.DocumentProvider.getTransactionIsolation()public java.sql.SQLWarning getWarnings()
getWarnings in interface java.sql.Connectionpublic void clearWarnings()
clearWarnings in interface java.sql.Connection
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException - always thrown.createStatement()
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException - always thrown.prepareStatement(java.lang.String)
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionsql - the sql statement.resultSetType - ignored.resultSetConcurrency - ignored.java.sql.SQLException - thrown on invalid sql.prepareCall(java.lang.String)
public java.util.Map getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLException - always thrown.
public void setTypeMap(java.util.Map map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionjava.sql.SQLException - always thrown.
|
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||