jade.domain
Class DFHSQLKB

java.lang.Object
  extended by jade.domain.KBManagement.KB
      extended by jade.domain.KBManagement.DBKB
          extended by jade.domain.DFDBKB
              extended by jade.domain.DFHSQLKB

public class DFHSQLKB
extends DFDBKB

DFHSQLKB realizes a knowledge base used by the DF which stores its content in an HSQL database, running in the same VM. The SQL commands are optimized for the HSQL database.

Author:
Roland Mungenast - Profactor

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.domain.KBManagement.DBKB
jade.domain.KBManagement.DBKB.ConnectionWrapper, jade.domain.KBManagement.DBKB.EmptyKBIterator
 
Field Summary
protected static java.lang.String CACHE_SCALE
           
protected static java.lang.String CACHE_SIZE_SCALE
           
protected static java.lang.String GC_INTERVAL
           
 
Fields inherited from class jade.domain.DFDBKB
DEFAULT_LONGVARCHAR_TYPE
 
Fields inherited from class jade.domain.KBManagement.DBKB
cleanTables, driver
 
Fields inherited from class jade.domain.KBManagement.KB
lm, logger, sr
 
Constructor Summary
DFHSQLKB(int maxResultLimit, boolean cleanTables)
          Constructor
 
Method Summary
protected  java.sql.Connection createDBConnection(java.lang.String url, java.lang.String user, java.lang.String passwd)
           
protected  void createTable(java.sql.Statement stmt, java.lang.String name, java.lang.String[] entries)
           
protected  java.lang.String getLongVarCharType()
          Returns the name of the SQL type used in the database to represent very long strings.
 
Methods inherited from class jade.domain.DFDBKB
createDFTables, createIndices, createTable, dropDFTables, dropTable, getGUID, getHashValue, getSubscriptions, initConnectionWrapper, insertSingle, iteratorSingle, prepDBStr, removeSingle, replace, searchSingle, setup, subscribeSingle, tableExists, unsubscribeSingle
 
Methods inherited from class jade.domain.KBManagement.DBKB
getConnectionWrapper, insert, iterator, remove, search, subscribe, unsubscribe
 
Methods inherited from class jade.domain.KBManagement.KB
deregister, register, search, setLeaseManager, setSubscriptionResponder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_SCALE

protected static final java.lang.String CACHE_SCALE
See Also:
Constant Field Values

CACHE_SIZE_SCALE

protected static final java.lang.String CACHE_SIZE_SCALE
See Also:
Constant Field Values

GC_INTERVAL

protected static final java.lang.String GC_INTERVAL
See Also:
Constant Field Values
Constructor Detail

DFHSQLKB

public DFHSQLKB(int maxResultLimit,
                boolean cleanTables)
         throws java.sql.SQLException
Constructor

Parameters:
maxResultLimit - JADE internal limit for the number of maximum search results.
cleanTables - specifies whether the KB should delete all existing tables for the DF at startup
Throws:
java.sql.SQLException - if a database access error occurs
Method Detail

createDBConnection

protected java.sql.Connection createDBConnection(java.lang.String url,
                                                 java.lang.String user,
                                                 java.lang.String passwd)
                                          throws java.sql.SQLException
Overrides:
createDBConnection in class jade.domain.KBManagement.DBKB
Throws:
java.sql.SQLException

getLongVarCharType

protected java.lang.String getLongVarCharType()
Description copied from class: DFDBKB
Returns the name of the SQL type used in the database to represent very long strings.

Overrides:
getLongVarCharType in class DFDBKB

createTable

protected void createTable(java.sql.Statement stmt,
                           java.lang.String name,
                           java.lang.String[] entries)
                    throws java.sql.SQLException
Throws:
java.sql.SQLException