iiitAccessServer 1.0

de.iiit.access.server.util.db.cachedb
Class CacheTable

java.lang.Object
  |
  +--de.iiit.access.server.util.db.cachedb.CacheTable

public class CacheTable
extends Object

A cache table holds the complete result set of the expression or group it belongs to. Later on, when we want to know whether someone is member of the group described described by the expression, we are only interested in fact whether there is a record with the name of the user or not. We will never need the record itself.


Method Summary
static void createCacheTable(JdbcConnectionPool pool, String name)
          Creates a new empty cache table
static void dropCacheTable(JdbcConnectionPool pool, String name)
          Drops a cache table which is no longer needed.
static void dropLostTables(JdbcConnectionPool pool)
          Searches for cache tables not contained in the index table.
static void insertCacheTable(JdbcConnectionPool pool, String name, Set set, boolean toLower)
          Inserts a list of names into an already existing cache table.
static boolean searchCacheTable(JdbcConnectionPool pool, String name, String user)
          Searches a cache table for the name of an user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCacheTable

public static void createCacheTable(JdbcConnectionPool pool,
                                    String name)
                             throws JdbcException
Creates a new empty cache table

Parameters:
pool - The database handle to use
name - The name of the table to create.
Throws:
JdbcException - if a JDBC error occurs

dropCacheTable

public static void dropCacheTable(JdbcConnectionPool pool,
                                  String name)
                           throws JdbcException
Drops a cache table which is no longer needed.

Parameters:
pool - The database handle to use
name - The name of the table to drop.
Throws:
JdbcException - if a JDBC error occurs

insertCacheTable

public static void insertCacheTable(JdbcConnectionPool pool,
                                    String name,
                                    Set set,
                                    boolean toLower)
                             throws JdbcException
Inserts a list of names into an already existing cache table.

Parameters:
pool - The database handle to use
name - The name of the table to fill
set - the names to insert into the table
toLower - forces all data to be converted to lower case if its value is true
Throws:
JdbcException - if a JDBC error occurs

searchCacheTable

public static boolean searchCacheTable(JdbcConnectionPool pool,
                                       String name,
                                       String user)
                                throws JdbcException
Searches a cache table for the name of an user.

Parameters:
pool - The database handle to use
name - The name of the table to search in
user - The name of the user to search for
Returns:
true if the table contains the name, false if not.
Throws:
JdbcException - if a JDBC error occurs

dropLostTables

public static void dropLostTables(JdbcConnectionPool pool)
                           throws JdbcException
Searches for cache tables not contained in the index table. All found tables will be dropped.

Parameters:
pool - The database handle to use
Throws:
JdbcException - if a JDBC error occurs

iiitAccessServer 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement