|
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.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.createDocumentProvider(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.protected DocumentProvider getDocumentProvider() throws DocumentException
protected void setDocumentProvider(DocumentProvider provider)
public java.sql.Statement createStatement() throws java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
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.
sql
- the function to execute.public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
public void setAutoCommit(boolean autoCommit)
public boolean getAutoCommit()
public void commit()
public void rollback() throws java.sql.SQLException
DocumentProvider.reset()
public void close() throws java.sql.SQLException
DocumentProvider.close()
public boolean isClosed()
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
public void setReadOnly(boolean readOnly)
public boolean isReadOnly()
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
public void setTransactionIsolation(int level) throws java.sql.SQLException
level
- one of the TRANSACTION_* values.DocumentProvider.setTransactionIsolation(int)
public int getTransactionIsolation() throws java.sql.SQLException
DocumentProvider.getTransactionIsolation()
public java.sql.SQLWarning getWarnings()
public void clearWarnings()
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
createStatement()
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
prepareStatement(java.lang.String)
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
sql
- the sql statement.resultSetType
- ignored.resultSetConcurrency
- ignored.prepareCall(java.lang.String)
public java.util.Map getTypeMap() throws java.sql.SQLException
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |