QueryCacheSQLAdapter
Keywords: uk.ac.ic.doc.automed.util.db.QueryCacheSQLAdapter class

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

## uk.ac.ic.doc.automed.util.db
Class QueryCacheSQLAdapter

    java.lang.Object
      uk.ac.ic.doc.automed.util.db.DBAccess
          uk.ac.ic.doc.automed.util.db.DBEmbedded
              uk.ac.ic.doc.automed.util.db.QueryCacheSQLAdapter

All Implemented Interfaces:
  PersistentHandler

    public class QueryCacheSQLAdapter

extends DBEmbedded
implements PersistentHandler

QueryCacheSQLAdapter.java Bridges between `PersistentHandler` and `DBEmbedded`

Author:
  Duc M Le dmle@doc.ic.ac.uk

Field Summary

Fields inherited from class uk.ac.ic.doc.automed.util.db.DBAccess
`connections, dbFQPath, password, props, user`

Constructor Summary
`protected` | `QueryCacheSQLAdapter(java.lang.String dbFQPath, java.lang.String user, java.lang.String password, java.util.Properties props)` Creates a new instance of DBAccessAdapter

Method Summary
`void` | `close()` Close the database
`java.lang.Object` | `get(PersistentKey pkey)` Get the first (or unique) data entry found for key
`java.util.Iterator` | `iterator()` Return an iterator of the entry set
`void` | `put(PersistentKey pkey, java.lang.Object value)` Place a data object into db
`void` | `remove(PersistentKey pkey)` Remove a single record identified by a common key from the database
`void` | `removeAll()` Clear database content

Methods inherited from class uk.ac.ic.doc.automed.util.db.DBEmbedded
`commit, executeCommand, executeQuery, executeStatement, getConnection, getDBInstance, isTableExist, newConnection, printResultSet, setAutoCommit, shutdown`

Methods inherited from class uk.ac.ic.doc.automed.util.db.DBAccess
`closeConnection, getCurrentRow`

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

Constructor Detail

### QueryCacheSQLAdapter

    protected QueryCacheSQLAdapter(java.lang.String dbFQPath,
                                   java.lang.String user,
                                   java.lang.String password,
                                   java.util.Properties props)
                            throws DBInstanceException

  Creates a new instance of DBAccessAdapter

  Throws:
    `DBInstanceException`

Method Detail

### put

    public void put(PersistentKey pkey,
                    java.lang.Object value)

  Place a data object into db

  Specified by:
    `put` in interface `PersistentHandler`

### get

    public java.lang.Object get(PersistentKey pkey)

  Get the first (or unique) data entry found for key

  Specified by:
    `get` in interface `PersistentHandler`

### remove

    public void remove(PersistentKey pkey)

  Remove a single record identified by a common key from the database

  Specified by:
    `remove` in interface `PersistentHandler`

### iterator

    public java.util.Iterator iterator()

  Return an iterator of the entry set

  Specified by:
    `iterator` in interface `PersistentHandler`

### removeAll

    public void removeAll()

  Clear database content

  Specified by:
    `removeAll` in interface `PersistentHandler`

### close

    public void close()

  Close the database

  Specified by:
    `close` in interface `PersistentHandler`

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