Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| dbXML API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.dbxml.db.core.adapter
Interface Adapter

All Known Implementing Classes:
  SimpleAdapter

public interface Adapter

Adapter defines an interface that allows adapter facades to be developed in order to allow dbXML to persist objects other than dbXML DocumentTable instances. These might include DOM Documents, JAXB-generated classes, or XMLSerializable instances.

Method Summary
`java.lang.String` | `getCanonicalName()` getCanonicalName returns the canonical name for the underlying Collection.
`Collection` | `getCollection()` getCollection returns a reference to the underlying Collection.
`long` | `getKeyCount(Transaction tx)` getKeyCount returns the count of objects being maintained by this Adapter.
`java.lang.String` | `getName()` getName returns the name for the underlying Collection.
`Key[]` | `listKeys(Transaction tx)` listKeys returns a list of object keys stored managed by the Adapter.
`ResultSet` | `queryCollection(Transaction tx, java.lang.String style, java.lang.String query, NamespaceMap nsMap)` queryCollection performs a query against the current collection using the specified style and query String.
`ResultSet` | `queryDocument(Transaction tx, java.lang.String style, java.lang.String query, NamespaceMap nsMap, java.lang.Object key)` queryDocument performs a query against a single Document using the specified style, query string, and Document ID.
`void` | `remove(Transaction tx, java.lang.Object key)` remove removes an object from the Adapter based on its Key.

Method Detail

### getCollection

    public Collection getCollection()

  getCollection returns a reference to the underlying Collection.

  Returns:
    The underlying Collection

### getName

    public java.lang.String getName()

  getName returns the name for the underlying Collection.
  ex: ocs

  Returns:
    The name

### getCanonicalName

    public java.lang.String getCanonicalName()

  getCanonicalName returns the canonical name for the underlying Collection.
  ex: /local/test/ocs

  Returns:
    The canonical name

### listKeys

    public Key[] listKeys(Transaction tx)
                   throws DBException

  listKeys returns a list of object keys stored managed by the Adapter.

  Parameters:
    `tx` - The controlling Transaction
  Returns:
    the list of object keys
  Throws:
    `DBException` - If a Database Exception occurs

### remove

    public void remove(Transaction tx,
                       java.lang.Object key)
                throws DBException

  remove removes an object from the Adapter based on its Key.

  Parameters:
    `tx` - The controlling Transaction
    `key` - The Object's Key
  Throws:
    `DBException` - If a Database Exception occurs

### getKeyCount

    public long getKeyCount(Transaction tx)
                     throws DBException

  getKeyCount returns the count of objects being maintained by this Adapter.

  Parameters:
    `tx` - The controlling Transaction
  Returns:
    The object count
  Throws:
    `DBException` - If a Database Exception occurs

### queryCollection

    public ResultSet queryCollection(Transaction tx,
                                     java.lang.String style,
                                     java.lang.String query,
                                     NamespaceMap nsMap)
                              throws DBException

  queryCollection performs a query against the current collection using the specified style and query String.

  Parameters:
    `tx` - The controlling Transaction
    `style` - The query style to use (ex: XPath)
    `query` - The query to execute
    `nsMap` - The namespace Map (if any)
  Returns:
    The resulting ResultSet
  Throws:
    `DBException` - If a Database Exception occurs

### queryDocument

    public ResultSet queryDocument(Transaction tx,
                                   java.lang.String style,
                                   java.lang.String query,
                                   NamespaceMap nsMap,
                                   java.lang.Object key)
                            throws DBException

  queryDocument performs a query against a single Document using the specified style, query string, and Document ID.

  Parameters:
    `tx` - The controlling Transaction
    `style` - The query style to use (ex: XPath)
    `query` - The query to execute
    `nsMap` - The namespace Map (if any)
    `key` - The Document to query
  Returns:
    The resulting ResultSet
  Throws:
    `DBException` - If a Database Exception occurs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| dbXML API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004 The dbXML Group