dbXML API

## org.dbxml.core.filer
Class FSFiler

    java.lang.Object
      |
      +--org.dbxml.server.SimpleConfigurable
            |
            +--org.dbxml.core.filer.FSFiler

All Implemented Interfaces:
  org.dbxml.server.Configurable, DBObject, Filer, org.dbxml.server.Named

public final class FSFiler
extends org.dbxml.server.SimpleConfigurable
implements Filer

FSFiler allows you to use existing file systems withing dbXML.

Constructor Summary
`FSFiler()`

Method Summary
`boolean` `close()` close closes the DBObject
`boolean` `create()` create creates a new DBObject and any associated resources for the new DBObject, such as disk files, etc.
`boolean` `deleteRecord(Key key)` deleteRecord removes a Record from the Filer based on the specified Key.
`boolean` `drop()` drop instructs the DBObjectimplementation to remove itself from existence.
`boolean` `exists()` exists returns whether or not a physical representation of this DBObject actually exists.
`java.lang.String` `getName()`
`long` `getRecordCount()` getRecordCount returns the number of Records in the Filer.
`RecordSet` `getRecordSet()` getRecordSet returns a RecordSet object for the current Filer.
`boolean` `isOpened()` isOpened returns whether or not the DBObject is opened for business.
`boolean` `open()` open opens the DBObject
`Record` `readRecord(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(org.dbxml.server.Configuration config)`
`boolean` `writeRecord(Key key, Value value)` writeRecord writes a Value to the Filer based on the specified Key.

Methods inherited from class org.dbxml.server.SimpleConfigurable
`getConfig`

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

Methods inherited from interface org.dbxml.server.Configurable
`getConfig`

Constructor Detail

### FSFiler

    public FSFiler()

Method Detail

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `org.dbxml.server.Named`

### 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`
  Following copied from interface: `org.dbxml.core.filer.Filer`
  Parameters:
    `collection` - The owner Collection

### setConfig

    public void setConfig(org.dbxml.server.Configuration config)
                   throws org.dbxml.server.dbXMLException

  Specified by:
    `setConfig` in interface `org.dbxml.server.Configurable`
  Overrides:
    `setConfig` in class `org.dbxml.server.SimpleConfigurable`

### close

    public boolean close()

  Description copied from interface: `DBObject`
  close closes the DBObject
  Specified by:
    `close` in interface `DBObject`
  Following copied from interface: `org.dbxml.core.DBObject`
  Returns:
    Whether or not the DBObject was closed

### open

    public boolean open()

  Description copied from interface: `DBObject`
  open opens the DBObject
  Specified by:
    `open` in interface `DBObject`
  Following copied from interface: `org.dbxml.core.DBObject`
  Returns:
    Whether or not the DBObject was opened

### drop

    public boolean drop()

  Description copied from interface: `DBObject`
  drop instructs the DBObjectimplementation to remove itself from existence. The DBObject's parent is responsible for removing any references to the DBObject in its own context.
  Specified by:
    `drop` in interface `DBObject`
  Following copied from interface: `org.dbxml.core.DBObject`
  Returns:
    Whether or not the DBObject was dropped

### isOpened

    public boolean isOpened()

  Description copied from interface: `DBObject`
  isOpened returns whether or not the DBObject is opened for business.
  Specified by:
    `isOpened` in interface `DBObject`
  Following copied from interface: `org.dbxml.core.DBObject`
  Returns:
    The open status of the DBObject

### exists

    public boolean exists()

  Description copied from interface: `DBObject`
  exists returns whether or not a physical representation of this DBObject actually exists. In the case of a HashFiler, this would check for the file, and in the case of an FTPFiler, it might perform a connection check.
  Specified by:
    `exists` in interface `DBObject`
  Following copied from interface: `org.dbxml.core.DBObject`
  Returns:
    Whether or not the physical resource exists

### create

    public boolean create()

  Description copied from interface: `DBObject`
  create creates a new DBObject and any associated resources for the new DBObject, such as disk files, etc.
  Specified by:
    `create` in interface `DBObject`
  Following copied from interface: `org.dbxml.core.DBObject`
  Returns:
    Whether or not the DBObject was created

### readRecord

    public Record readRecord(Key key)
                      throws DBException

  Description copied from interface: `Filer`
  readRecord returns a Record from the Filer based on the specified Key.
  Specified by:
    `readRecord` in interface `Filer`
  Following copied from interface: `org.dbxml.core.filer.Filer`
  Parameters:
    `key` - The Record's Key
  Returns:
    The returned Record

### writeRecord

    public boolean writeRecord(Key key,
                               Value value)
                        throws DBException

  Description copied from interface: `Filer`
  writeRecord writes a Value to the Filer based on the specified Key.
  Specified by:
    `writeRecord` in interface `Filer`
  Following copied from interface: `org.dbxml.core.filer.Filer`
  Parameters:
    `key` - The Record's Key
    `value` - The Record's Value
  Returns:
    Whether or not the Record could be written

### deleteRecord

    public boolean deleteRecord(Key key)
                         throws DBException

  deleteRecord removes a Record from the Filer based on the specified Key.
  Specified by:
    `deleteRecord` in interface `Filer`
  Parameters:
    `key` - The Record's Key
  Returns:
    Whether or not the Record was deleted

### getRecordCount

    public long getRecordCount()
                        throws DBException

  Description copied from interface: `Filer`
  getRecordCount returns the number of Records in the Filer.
  Specified by:
    `getRecordCount` in interface `Filer`
  Following copied from interface: `org.dbxml.core.filer.Filer`
  Returns:
    The Record count

### getRecordSet

    public RecordSet getRecordSet()
                           throws DBException

  Description copied from interface: `Filer`
  getRecordSet returns a RecordSet object for the current Filer.
  Specified by:
    `getRecordSet` in interface `Filer`
  Following copied from interface: `org.dbxml.core.filer.Filer`
  Returns:
    The Filer Enumerator

dbXML API

Copyright (c) 1999-2001 The dbXML Group, All rights reserved