Package jason.bb

Class AgentJDBCPersistentBB

java.lang.Object
All Implemented Interfaces:
ToDOM, java.lang.Cloneable, java.lang.Iterable<Literal>

public class AgentJDBCPersistentBB
extends JDBCPersistentBB
Implementation of BB that stores some beliefs in a relational data base. For all created table, an additional column (called j_agent) is created and populated with the name of the agent that uses this customisation.
Author:
Neil Madden
  • Field Details

  • Constructor Details

    • AgentJDBCPersistentBB

      public AgentJDBCPersistentBB()
  • Method Details

    • getCreateTable

      protected java.lang.String getCreateTable​(java.lang.String table, int arity, Structure columns) throws java.sql.SQLException
      Description copied from class: JDBCPersistentBB
      returns the SQL command to create a new table
      Overrides:
      getCreateTable in class JDBCPersistentBB
      Throws:
      java.sql.SQLException
    • getAgWhere

      protected java.lang.String getAgWhere()
    • getDeleteAll

      protected java.lang.String getDeleteAll​(PredicateIndicator pi) throws java.sql.SQLException
      Description copied from class: JDBCPersistentBB
      returns a SQL command to delete all entries for a predicate
      Overrides:
      getDeleteAll in class JDBCPersistentBB
      Throws:
      java.sql.SQLException
    • getCountQuery

      protected java.lang.String getCountQuery​(PredicateIndicator pi) throws java.sql.SQLException
      Description copied from class: JDBCPersistentBB
      returns a SQL command to count the number of instances of a predicate
      Overrides:
      getCountQuery in class JDBCPersistentBB
      Throws:
      java.sql.SQLException
    • getSelectAll

      protected java.lang.String getSelectAll​(PredicateIndicator pi) throws java.sql.SQLException
      Description copied from class: JDBCPersistentBB
      returns the SQL command the selects all literals of type pi
      Overrides:
      getSelectAll in class JDBCPersistentBB
      Throws:
      java.sql.SQLException
    • getWhere

      protected java.lang.String getWhere​(Literal l) throws java.sql.SQLException
      Description copied from class: JDBCPersistentBB
      returns the where clausule for a select for literal l
      Overrides:
      getWhere in class JDBCPersistentBB
      Throws:
      java.sql.SQLException
    • getInsert

      protected java.lang.String getInsert​(Literal l) throws java.lang.Exception
      Description copied from class: JDBCPersistentBB
      returns the SQL command to insert l into the DB
      Overrides:
      getInsert in class JDBCPersistentBB
      Throws:
      java.lang.Exception