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

## net.sf.borg.model.db.jdbc
Class ApptJdbcDB

    java.lang.Object
      net.sf.borg.model.db.jdbc.JdbcDB
          net.sf.borg.model.db.jdbc.JdbcBeanDB<Appointment>
              net.sf.borg.model.db.jdbc.ApptJdbcDB

All Implemented Interfaces:
  AppointmentDB, EntityDB<Appointment>

    public class ApptJdbcDB

extends JdbcBeanDB<Appointment>
implements AppointmentDB

this is the JDBC layer for access to the appointment table.

Field Summary

Fields inherited from class net.sf.borg.model.db.jdbc.JdbcDB
`connection_`

Constructor Summary
`ApptJdbcDB()` Creates a new instance of AppJdbcDB.

Method Summary
`void` | `addObj(Appointment appt)` Adds a KeyedEntity to the database
`(package private) Appointment` | `createFrom(ResultSet r)` Fills in an entity from a result set
`void` | `delete(int key)` Delete a KeyedEntity from the database
`Collection<Integer>` | `getKeys()` Gets the keys.
`(package private) PreparedStatement` | `getPSAll()`
`(package private) PreparedStatement` | `getPSOne(int key)`
`Collection<Integer>` | `getRepeatKeys()` Gets the keys of all Appointments that are marked as repeating
`Collection<Integer>` | `getTodoKeys()` Gets the keys of all Appointments that are marked as Todo's.
`Appointment` | `newObj()` Return a new instance of the KeyedEntity
`int` | `nextkey()` get the next available key value for this entity type
`void` | `updateObj(Appointment appt)` Update a KeyedEntity in the database

Methods inherited from class net.sf.borg.model.db.jdbc.JdbcBeanDB
`delCache, emptyCache, readAll, readCache, readObj, sync, writeCache`

Methods inherited from class net.sf.borg.model.db.jdbc.JdbcDB
`beginTransaction, buildDbDir, close, commitTransaction, connect, execSQL, getConnection, getOption, getOptions, getUrl, rollbackTransaction, setOption, toInt, toInt, toStr, toVect`

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

Methods inherited from interface net.sf.borg.model.db.EntityDB
`readAll, readObj, sync`

Constructor Detail

### ApptJdbcDB

    public ApptJdbcDB()

  Creates a new instance of AppJdbcDB.

Method Detail

### addObj

    public void addObj(Appointment appt)
                throws Exception

  Description copied from interface: `EntityDB`
  Adds a KeyedEntity to the database

  Specified by:
    `addObj` in interface `EntityDB<Appointment>`
  Parameters:
    `appt` - the KeyedEntity
  Throws:
    `Exception`

### delete

    public void delete(int key)
                throws Exception

  Description copied from interface: `EntityDB`
  Delete a KeyedEntity from the database

  Specified by:
    `delete` in interface `EntityDB<Appointment>`
  Parameters:
    `key` - the key of the entity
  Throws:
    `Exception`

### getKeys

    public Collection<Integer> getKeys()
                                throws Exception

  Gets the keys.

  Returns:
    the keys
  Throws:
    `Exception` - the exception

### getTodoKeys

    public Collection<Integer> getTodoKeys()
                                    throws Exception

  Description copied from interface: `AppointmentDB`
  Gets the keys of all Appointments that are marked as Todo's.

  Specified by:
    `getTodoKeys` in interface `AppointmentDB`
  Returns:
    the todo keys
  Throws:
    `Exception` - the exception

### getRepeatKeys

    public Collection<Integer> getRepeatKeys()
                                      throws Exception

  Description copied from interface: `AppointmentDB`
  Gets the keys of all Appointments that are marked as repeating

  Specified by:
    `getRepeatKeys` in interface `AppointmentDB`
  Returns:
    the repeat keys
  Throws:
    `Exception` - the exception

### nextkey

    public int nextkey()
                throws Exception

  Description copied from interface: `EntityDB`
  get the next available key value for this entity type

  Specified by:
    `nextkey` in interface `EntityDB<Appointment>`
  Returns:
    the next available key
  Throws:
    `Exception`

### newObj

    public Appointment newObj()

  Description copied from interface: `EntityDB`
  Return a new instance of the KeyedEntity

  Specified by:
    `newObj` in interface `EntityDB<Appointment>`
  Returns:
    the new KeyedEntity

### getPSOne

    PreparedStatement getPSOne(int key)
                         throws SQLException

  Specified by:
    `getPSOne` in class `JdbcBeanDB<Appointment>`
  Returns:
    a PreparedStatement that reads one entity by key
  Throws:
    `SQLException`

### getPSAll

    PreparedStatement getPSAll()
                         throws SQLException

  Specified by:
    `getPSAll` in class `JdbcBeanDB<Appointment>`
  Returns:
    a PreparedStatement that reads all entities from a table
  Throws:
    `SQLException`

### createFrom

    Appointment createFrom(ResultSet r)
                     throws SQLException

  Description copied from class: `JdbcBeanDB`
  Fills in an entity from a result set

  Specified by:
    `createFrom` in class `JdbcBeanDB<Appointment>`
  Parameters:
    `r` - the result set
  Returns:
    the entity
  Throws:
    `SQLException`

### updateObj

    public void updateObj(Appointment appt)
                   throws Exception

  Description copied from interface: `EntityDB`
  Update a KeyedEntity in the database

  Specified by:
    `updateObj` in interface `EntityDB<Appointment>`
  Parameters:
    `appt` - the KeyedEntity
  Throws:
    `Exception`

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

Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic