DEPRECATED

# com.bea.p13n.content.document.ref
DefaultDocumentProvider Class

public abstract class DefaultDocumentProvider
extends `Object`
implements `com.bea.p13n.content.document.spi.DocumentProvider`

An abstract base implementation of a DocumentProvider.

This can be used by implementors as a starting point for writing a Doc Mgmt SPI implementation.

Hierarchy
  `Object`
  `DefaultDocumentProvider`

All Implemented Interfaces
  `com.bea.p13n.content.document.spi.DocumentProvider`

Direct Known Subclasses
  `com.bea.p13n.content.document.ref.RefDocumentProvider`

## Constructor Summary

DefaultDocumentProvider()

## Method Summary

`public `DocumentIterator`` | `findDocumentIds`(`Search` params) Return the set of document ids which match the given search parameters.
`public `DocumentIterator`` | `findDocumentMetadata`(`Search` params) Try to find the findDocumentMetadata(com.beasys.commerce.foundation.expression.Search) method and invoke it.
`public `DocumentIterator`` | `findDocuments`(`Search` params) Try to find the findDocuments(com.beasys.commerce.foundation.expression.Search) method and invoke it.
`public `DocumentDef`` | `getDocument`(`String` id) Return the Document with the given id.
`public `DocumentMetadataDef`` | `getDocumentMetadata`(`String` id) Return the DocumentMetadata with the given id.
`public `Timestamp`` | `getDocumentModifiedDate`(`String` id) Return the last modified date of the Document with the given id.
`public int` | `getTransactionIsolation`() Get the document provider's current transaction isolation level.
`public void` | `setTransactionIsolation`(int level) Set the document provider's transaction isolation level.

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

Methods from interface `com.bea.p13n.content.document.spi.`com.bea.p13n.content.document.spi.DocumentProvider``
``close`, `findDocumentIds`, `findDocumentMetadata`, `findDocuments`, `getDocument`, `getDocumentMetadata`, `getDocumentModifiedDate`, `getSchema`, `getSchemaNames`, `getSchemas`, `getTransactionIsolation`, `init`, `reset`, `setTransactionIsolation``

## Constructor Detail

### DefaultDocumentProvider

    public DefaultDocumentProvider()

## Method Detail

### findDocumentIds(Search) Method

    public DocumentIterator findDocumentIds(Search params)
         throws DocumentException

Return the set of document ids which match the given search parameters.

This will call `DefaultDocumentProvider.findDocumentMetadata(Search)``` and extract the ids from the metadata.

#### Parameters

params
  the search parameters.

#### Returns

the iterator of String document ids that match.

#### Exceptions

``DocumentException``

### findDocumentMetadata(Search) Method

DEPRECATED To be removed when old expressions are removed.

    public DocumentIterator findDocumentMetadata(Search params)
         throws DocumentException

Try to find the findDocumentMetadata(com.beasys.commerce.foundation.expression.Search) method and invoke it.

Override this method to implement search based on new expressions.

#### Parameters

params
  the search parameters.

#### Returns

the iterator of DocumentMetadataDefs that match the search.

#### Exceptions

``DocumentException``

### findDocuments(Search) Method

DEPRECATED To be removed when old expressions are removed.

    public DocumentIterator findDocuments(Search params)
         throws DocumentException

Try to find the findDocuments(com.beasys.commerce.foundation.expression.Search) method and invoke it.

Override this method to implement search based on new expressions.

#### Parameters

params
  the search parameters.

#### Returns

the iterator of DocumentDefs that match the search.

#### Exceptions

``DocumentException``

### getDocument(String) Method

    public DocumentDef getDocument(String id)
         throws DocumentException

Return the Document with the given id.

This uses `DefaultDocumentProvider.findDocuments(Search)``` to do it.

#### Parameters

id
  the document id.

#### Returns

the DocumentDef with the given id, or null on unknown document id.

#### Exceptions

``DocumentException``

### getDocumentMetadata(String) Method

    public DocumentMetadataDef getDocumentMetadata(String id)
         throws DocumentException

Return the DocumentMetadata with the given id.

This uses `DefaultDocumentProvider.findDocumentMetadata(Search)``` to do it.

#### Parameters

id
  the document id.

#### Returns

the DocumentMetadataDef of the document with the given id, or null on unknown document id.

#### Exceptions

``DocumentException``

### getDocumentModifiedDate(String) Method

    public Timestamp getDocumentModifiedDate(String id)
         throws DocumentException

Return the last modified date of the Document with the given id.

This uses `DefaultDocumentProvider.getDocumentMetadata(String)``` to do it.

#### Parameters

id
  the document id.

#### Returns

the timestamp when the doc was last modified, or null if unknown or doesn't exist.

#### Exceptions

``DocumentException``

### getTransactionIsolation() Method

    public int getTransactionIsolation()
         throws DocumentException

Get the document provider's current transaction isolation level.

#### Returns

TRANSACTION_NONE

#### Exceptions

``DocumentException``

### setTransactionIsolation(int) Method

    public void setTransactionIsolation(int level)
         throws DocumentException

Set the document provider's transaction isolation level.

This method does nothing.

#### Exceptions

``DocumentException``