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.common.adapters
Class XMLSerializableAdapter

    java.lang.Object
      com.dbxml.db.core.adapter.SimpleAdapter
          com.dbxml.db.common.adapters.XMLSerializableAdapter

All Implemented Interfaces:
  Adapter

public final class XMLSerializableAdapter
extends SimpleAdapter

XMLSerializableAdapter adapts a dbXML Collection to support the management of dbXML XMLSerializable implementations.

Constructor Summary
`XMLSerializableAdapter(Collection col)`

Method Summary
`XMLSerializable` | `getObject(Transaction tx, java.lang.Object key)` getObject instantiates and returns an XMLSerializable object based on the provided Key.
`void` | `insertObject(Transaction tx, java.lang.Object key, XMLSerializable obj)` insertObject inserts an XMLSerializable object into the Collection based on the specified Key.
`Key` | `insertObject(Transaction tx, XMLSerializable obj)` insertObject inserts an XMLSerializable object into the Collection and returns a newly generated Key.
`void` | `setObject(Transaction tx, java.lang.Object key, XMLSerializable obj)` setObject sets an XMLSerializable object in the Collection based on the provided Key.

Methods inherited from class com.dbxml.db.core.adapter.SimpleAdapter
`getCanonicalName, getCollection, getKeyCount, getName, listKeys, queryCollection, queryDocument, remove`

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

Constructor Detail

### XMLSerializableAdapter

    public XMLSerializableAdapter(Collection col)

Method Detail

### setObject

    public void setObject(Transaction tx,
                          java.lang.Object key,
                          XMLSerializable obj)
                   throws DBException

  setObject sets an XMLSerializable object in the Collection based on the provided Key. dbXML takes care of associating the implementation class with the XMLSerializable object.

  Parameters:
    `tx` - The controlling Transaction
    `key` - The Key to use
    `obj` - The Object to set
  Throws:
    `DBException` - If a Database Exception occurs

### insertObject

    public Key insertObject(Transaction tx,
                            XMLSerializable obj)
                     throws DBException

  insertObject inserts an XMLSerializable object into the Collection and returns a newly generated Key. dbXML takes care of associating the implementation class with the XMLSerializable object.

  Parameters:
    `tx` - The controlling Transaction
    `obj` - The Object to insert
  Returns:
    The new Object Identifier
  Throws:
    `DBException` - If a Database Exception occurs

### insertObject

    public void insertObject(Transaction tx,
                             java.lang.Object key,
                             XMLSerializable obj)
                      throws DBException

  insertObject inserts an XMLSerializable object into the Collection based on the specified Key. dbXML takes care of associating the implementation class with the XMLSerializable object.

  Parameters:
    `tx` - The controlling Transaction
    `key` - The Key to use
    `obj` - The Object to insert
  Throws:
    `DBException` - If a Database Exception occurs

### getObject

    public XMLSerializable getObject(Transaction tx,
                                     java.lang.Object key)
                              throws DBException

  getObject instantiates and returns an XMLSerializable object based on the provided Key. dbXML takes care of instantiating the correct class, but only if a class was registered with the Document in the first place.

  Parameters:
    `tx` - The controlling Transaction
    `key` - The Document Key
  Returns:
    an Castable XMLSerializable Instance
  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