Holger's Java API

## com.antelmann.calendar
Class FileCalendarDB

    java.lang.Object
      com.antelmann.calendar.FileCalendarDB

All Implemented Interfaces:
  CalendarDB, Closeable

    public class FileCalendarDB

extends Object
implements CalendarDB

Author:
  Holger Antelmann

Constructor Summary
`FileCalendarDB(File dbFile)`

Method Summary
`void` `close()` does nothing
`boolean` `containsEntry(CalendarEntry entry)` entry is there if the id corresponds to an entry in the database; the contained data may be different
`boolean` `deleteEntry(CalendarEntry entry)` the corresponding entry in regards to the id will be deleted
`Collection<Alert>` `getActiveAlerts()` returns all active non-acknowledged alerts
`Collection<Alert>` `getAlerts(Filter<Alert> filter)`
`Collection<CalendarEntry>` `getEntries(Filter<CalendarEntry> filter)`
`void` `insertAlert(Alert alert)`
`CalendarEntry` `insertEntry(CalendarEntry entry)` the id of the given entry is ignored; the returned entry will reflect the actual database object
`void` `updateAlert(Alert alert)`
`void` `updateEntry(CalendarEntry entry)`

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

Constructor Detail

### FileCalendarDB

    public FileCalendarDB(File dbFile)
                   throws IOException,
                          ClassNotFoundException,
                          ClassCastException

Throws:
  `IOException`
  `ClassNotFoundException`
  `ClassCastException`

Method Detail

### containsEntry

    public boolean containsEntry(CalendarEntry entry)

  Description copied from interface: `CalendarDB`
  entry is there if the id corresponds to an entry in the database; the contained data may be different

  Specified by:
    `containsEntry` in interface `CalendarDB`

### deleteEntry

    public boolean deleteEntry(CalendarEntry entry)
                        throws DatabaseException

  Description copied from interface: `CalendarDB`
  the corresponding entry in regards to the id will be deleted

  Specified by:
    `deleteEntry` in interface `CalendarDB`
  Throws:
    `DatabaseException`

### updateEntry

    public void updateEntry(CalendarEntry entry)
                     throws CalendarException

  Specified by:
    `updateEntry` in interface `CalendarDB`
  Throws:
    `CalendarException`

### insertEntry

    public CalendarEntry insertEntry(CalendarEntry entry)
                              throws DatabaseException

  Description copied from interface: `CalendarDB`
  the id of the given entry is ignored; the returned entry will reflect the actual database object

  Specified by:
    `insertEntry` in interface `CalendarDB`
  Throws:
    `DatabaseException`

### getEntries

    public Collection<CalendarEntry> getEntries(Filter<CalendarEntry> filter)
                                         throws DatabaseException

  Specified by:
    `getEntries` in interface `CalendarDB`
  Throws:
    `DatabaseException`

### getActiveAlerts

    public Collection<Alert> getActiveAlerts()
                                      throws DatabaseException

  Description copied from interface: `CalendarDB`
  returns all active non-acknowledged alerts

  Specified by:
    `getActiveAlerts` in interface `CalendarDB`
  Throws:
    `DatabaseException`

### getAlerts

    public Collection<Alert> getAlerts(Filter<Alert> filter)
                                throws DatabaseException

  Specified by:
    `getAlerts` in interface `CalendarDB`
  Throws:
    `DatabaseException`

### insertAlert

    public void insertAlert(Alert alert)
                     throws DatabaseException,
                            CalendarException

  Specified by:
    `insertAlert` in interface `CalendarDB`
  Throws:
    `DatabaseException`
    `CalendarException`

### updateAlert

    public void updateAlert(Alert alert)
                     throws DatabaseException,
                            CalendarException

  Specified by:
    `updateAlert` in interface `CalendarDB`
  Throws:
    `DatabaseException`
    `CalendarException`

### close

    public void close()

  does nothing

  Specified by:
    `close` in interface `CalendarDB`
  Specified by:
    `close` in interface `Closeable`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads