dbXML API

## com.dbxml.db.enterprise.dbfiler
Class DBFiler

    java.lang.Object
      com.dbxml.util.SimpleConfigurable
          com.dbxml.db.enterprise.dbfiler.DBFiler

All Implemented Interfaces:
  Configurable, Filer

public final class DBFiler
extends SimpleConfigurable
implements Filer

DBFiler quickly maps relational data into XML documents by utilizing a single query with a set of outer joins. The Filer does the work of consolidating redunant data, thus eliminating the need for many SELECT statements.

Constructor Summary
`DBFiler()`

Method Summary
`boolean` `close()` close closes the Filer
`boolean` `create()` create creates a new Filer and any associated resources for the new Filer, such as disk files, etc.
`boolean` `deleteRecord(Transaction tx, Key key)` deleteRecord removes a Record from the Filer based on the specified Key.
`boolean` `drop()` drop instructs the Filerimplementation to remove itself from existence.
`boolean` `exists()` exists returns whether or not a physical representation of this Filer actually exists.
`void` `flush(Transaction tx)` flush forcefully flushes any unwritten buffers to disk.
`java.lang.String` `getName()` getName returns the name of this Filer.
`long` `getRecordCount(Transaction tx)` getRecordCount returns the number of Records in the Filer.
`RecordMetaData` `getRecordMetaData(Transaction tx, Key key)` getRecordMetaData returns metadata about the Record identified by the provided Key.
`RecordSet` `getRecordSet(Transaction tx)` getRecordSet returns a RecordSet object for the current Filer.
`TransactionLog` `getTransactionLog()` getTransactionLog returns the Transaction Log for this Filer.
`boolean` `isOpened()` isOpened returns whether or not the Filer is opened for business.
`boolean` `open()` open opens the Filer
`Record` `readRecord(Transaction tx, Key key)` readRecord returns a Record from the Filer based on the specified Key.
`void` `setCollection(Collection collection)` setCollection tells the Filer who its parent is.
`void` `setConfig(Configuration config)` setConfig sets the configuration information for the Configurable object instance.
`boolean` `writeRecord(Transaction tx, Key key, Value value)` writeRecord writes a Value to the Filer based on the specified Key.

Methods inherited from class com.dbxml.util.SimpleConfigurable
`getConfig`

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

Methods inherited from interface com.dbxml.util.Configurable
`getConfig`

Constructor Detail

### DBFiler

    public DBFiler()

Method Detail

### setConfig

    public void setConfig(Configuration config)
                   throws dbXMLException

  Description copied from interface: `Configurable`
  setConfig sets the configuration information for the Configurable object instance.

  Specified by:
    `setConfig` in interface `Configurable`
  Overrides:
    `setConfig` in class `SimpleConfigurable`
  Throws:
    `dbXMLException`

### getName

    public java.lang.String getName()

  Description copied from interface: `Filer`
  getName returns the name of this Filer.

  Specified by:
    `getName` in interface `Filer`
  Returns:
    the Filer name

### setCollection

    public void setCollection(Collection collection)

  Description copied from interface: `Filer`
  setCollection tells the Filer who its parent is.

  Specified by:
    `setCollection` in interface `Filer`
  Parameters:
    `collection` - The owner Collection

### flush

    public void flush(Transaction tx)

  Description copied from interface: `Filer`
  flush forcefully flushes any unwritten buffers to disk.

  Specified by:
    `flush` in interface `Filer`
  Parameters:
    `tx` - The controlling Transaction

### getRecordMetaData

    public RecordMetaData getRecordMetaData(Transaction tx,
                                            Key key)

  Description copied from interface: `Filer`
  getRecordMetaData returns metadata about the Record identified by the provided Key. This method should make every attempt to not read the actual record from its original location.

  Specified by:
    `getRecordMetaData` in interface `Filer`
  Parameters:
    `tx` - The controlling Transaction
    `key` - The Record's Key
  Returns:
    The Record's metadata

### readRecord

    public Record readRecord(Transaction tx,
                             Key key)

  Description copied from interface: `Filer`
  readRecord returns a Record from the Filer based on the specified Key.

  Specified by:
    `readRecord` in interface `Filer`
  Parameters:
    `tx` - The controlling Transaction
    `key` - The Record's Key
  Returns:
    The returned Record

### writeRecord

    public boolean writeRecord(Transaction tx,
                               Key key,
                               Value value)

  Description copied from interface: `Filer`
  writeRecord writes a Value to the Filer based on the specified Key.

  Specified by:
    `writeRecord` in interface `Filer`
  Parameters:
    `tx` - The controlling Transaction
    `key` - The Record's Key
    `value` - The Record's Value
  Returns:
    Whether or not the Record could be written

### deleteRecord

    public boolean deleteRecord(Transaction tx,
                                Key key)

  Description copied from interface: `Filer`
  deleteRecord removes a Record from the Filer based on the specified Key.

  Specified by:
    `deleteRecord` in interface `Filer`
  Parameters:
    `tx` - The controlling Transaction
    `key` - The Record's Key
  Returns:
    Whether or not the Record was deleted

### getRecordCount

    public long getRecordCount(Transaction tx)

  Description copied from interface: `Filer`
  getRecordCount returns the number of Records in the Filer.

  Specified by:
    `getRecordCount` in interface `Filer`
  Parameters:
    `tx` - The controlling Transaction
  Returns:
    The Record count

### getRecordSet

    public RecordSet getRecordSet(Transaction tx)

  Description copied from interface: `Filer`
  getRecordSet returns a RecordSet object for the current Filer.

  Specified by:
    `getRecordSet` in interface `Filer`
  Parameters:
    `tx` - The controlling Transaction
  Returns:
    The Filer Enumerator

### open

    public final boolean open()

  Description copied from interface: `Filer`
  open opens the Filer

  Specified by:
    `open` in interface `Filer`
  Returns:
    Whether or not the Filer was opened

### isOpened

    public boolean isOpened()

  Description copied from interface: `Filer`
  isOpened returns whether or not the Filer is opened for business.

  Specified by:
    `isOpened` in interface `Filer`
  Returns:
    The open status of the Filer

### exists

    public boolean exists()

  Description copied from interface: `Filer`
  exists returns whether or not a physical representation of this Filer actually exists. In the case of a BTreeFiler, this would check for the file, and in the case of an FTPFiler, it might perform a connection check.

  Specified by:
    `exists` in interface `Filer`
  Returns:
    Whether or not the physical resource exists

### close

    public boolean close()

  Description copied from interface: `Filer`
  close closes the Filer

  Specified by:
    `close` in interface `Filer`
  Returns:
    Whether or not the Filer was closed

### create

    public boolean create()

  Description copied from interface: `Filer`
  create creates a new Filer and any associated resources for the new Filer, such as disk files, etc.

  Specified by:
    `create` in interface `Filer`
  Returns:
    Whether or not the Filer was created

### drop

    public boolean drop()

  Description copied from interface: `Filer`
  drop instructs the Filerimplementation to remove itself from existence. The Filer's parent is responsible for removing any references to the Filer in its own context.

  Specified by:
    `drop` in interface `Filer`
  Returns:
    Whether or not the Filer was dropped

### getTransactionLog

    public TransactionLog getTransactionLog()

  Description copied from interface: `Filer`
  getTransactionLog returns the Transaction Log for this Filer. This result may be null if the Filer doesn't support transactional operations.

  Specified by:
    `getTransactionLog` in interface `Filer`
  Returns:
    The Filer's TransactionLog

dbXML API

Copyright (c) 2004 The dbXML Group