oracle.toplink.xml
Interface XMLAccessor

All Superinterfaces:
oracle.toplink.internal.databaseaccess.Accessor, java.lang.Cloneable
All Known Implementing Classes:
XMLFileAccessor

public interface XMLAccessor
extends oracle.toplink.internal.databaseaccess.Accessor

This interface defines methods needed for Accessor in the XML context.

Since:
TOPLink/Java 3.0

Method Summary
TypeMethod
 DatabaseRow convert(DatabaseRow row, Session session)
          Everything in XML must be strings.
 void createStreamSource(java.lang.String rootElementName)
          Create a source for data streams for the XML documents with the specified root element name.
 java.lang.Integer deleteStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements)
          Delete the data for the specified root element and primary key.
 void dropStreamSource(java.lang.String rootElementName)
          Drop the source for data streams for the XML documents with the specified root element name.
 java.io.Reader getExistenceCheckStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements)
          If it exists, return a read stream on the data for the specified root element and primary key.
 java.io.Writer getExistingWriteStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements)
          Return a write stream that will overwrite the data for the specified root element and primary key.
 java.io.Writer getNewWriteStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements)
          Return a new write stream for the specified root element and primary key.
 java.io.Reader getReadStream(java.lang.String rootElementName, DatabaseRow row, java.util.Vector orderedPrimaryKeyElements)
          Return a read stream on the data for the specified root element and primary key.
 java.util.Enumeration getReadStreams(java.lang.String rootElementName)
          Return an enumeration on a collection of read streams, one for *every* document with the specified root element.
 java.util.Enumeration getReadStreams(java.lang.String rootElementName, java.util.Vector foreignKeys, java.util.Vector orderedForeignKeyElements)
          Return an enumeration on a collection of streams, one for every specified foreign key.
 XMLTranslator getXMLTranslator()
          Return the default XML translator for all data store calls.
 void setXMLTranslator(XMLTranslator translator)
          Set the default XML translator for all data store calls.
 
Methods inherited from interface oracle.toplink.internal.databaseaccess.Accessor
afterJTSTransactionCommit, afterJTSTransactionRollback, beginTransaction, clone, closeConnection, commitTransaction, connect, decrementCallCount, disconnect, executeCall, getCallCount, getColumnInfo, getConnection, getLocalPreallocatedSequences, getTableInfo, incrementCallCount, isConnected, reestablishConnection, rollbackTransaction, usesExternalTransactionController
 

Method Detail

convert

public DatabaseRow convert(DatabaseRow row,
                           Session session)
Everything in XML must be strings.

createStreamSource

public void createStreamSource(java.lang.String rootElementName)
                        throws XMLDataStoreException
Create a source for data streams for the XML documents with the specified root element name.

deleteStream

public java.lang.Integer deleteStream(java.lang.String rootElementName,
                                      DatabaseRow row,
                                      java.util.Vector orderedPrimaryKeyElements)
                               throws XMLDataStoreException
Delete the data for the specified root element and primary key. Return the stream count (1 or 0).

dropStreamSource

public void dropStreamSource(java.lang.String rootElementName)
                      throws XMLDataStoreException
Drop the source for data streams for the XML documents with the specified root element name.

getExistenceCheckStream

public java.io.Reader getExistenceCheckStream(java.lang.String rootElementName,
                                              DatabaseRow row,
                                              java.util.Vector orderedPrimaryKeyElements)
                                       throws XMLDataStoreException
If it exists, return a read stream on the data for the specified root element and primary key. If it does not exist, return null.

getExistingWriteStream

public java.io.Writer getExistingWriteStream(java.lang.String rootElementName,
                                             DatabaseRow row,
                                             java.util.Vector orderedPrimaryKeyElements)
                                      throws XMLDataStoreException
Return a write stream that will overwrite the data for the specified root element and primary key.

getNewWriteStream

public java.io.Writer getNewWriteStream(java.lang.String rootElementName,
                                        DatabaseRow row,
                                        java.util.Vector orderedPrimaryKeyElements)
                                 throws XMLDataStoreException
Return a new write stream for the specified root element and primary key.

getReadStream

public java.io.Reader getReadStream(java.lang.String rootElementName,
                                    DatabaseRow row,
                                    java.util.Vector orderedPrimaryKeyElements)
                             throws XMLDataStoreException
Return a read stream on the data for the specified root element and primary key. If the stream is not found return null.

getReadStreams

public java.util.Enumeration getReadStreams(java.lang.String rootElementName)
                                     throws XMLDataStoreException
Return an enumeration on a collection of read streams, one for *every* document with the specified root element.

getReadStreams

public java.util.Enumeration getReadStreams(java.lang.String rootElementName,
                                            java.util.Vector foreignKeys,
                                            java.util.Vector orderedForeignKeyElements)
                                     throws XMLDataStoreException
Return an enumeration on a collection of streams, one for every specified foreign key. If a particular stream is not found the enumeration will return null in its place.

getXMLTranslator

public XMLTranslator getXMLTranslator()
Return the default XML translator for all data store calls.

setXMLTranslator

public void setXMLTranslator(XMLTranslator translator)
Set the default XML translator for all data store calls.