Package jason.bb
Class AgentJDBCPersistentBB
java.lang.Object
jason.bb.BeliefBase
jason.bb.ChainBBAdapter
jason.bb.JDBCPersistentBB
jason.bb.AgentJDBCPersistentBB
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.
-
Field Summary
Fields inherited from class jason.bb.JDBCPersistentBB
agentName, belsDB, conn, extraCols, timestampFunctor, urlFields inherited from class jason.bb.ChainBBAdapter
nextBBFields inherited from class jason.bb.BeliefBase
APercept, ASelf, TPercept, TSelf -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected Stringreturns a SQL command to count the number of instances of a predicateprotected StringgetCreateTable(String table, int arity, Structure columns) returns the SQL command to create a new tableprotected Stringreturns a SQL command to delete all entries for a predicateprotected Stringreturns the SQL command to insert l into the DBprotected Stringreturns the SQL command the selects all literals of type piprotected Stringreturns the where clausule for a select for literal lMethods inherited from class jason.bb.JDBCPersistentBB
abolish, add, add, clear, contains, getCandidateBeliefs, getSelect, getTableName, getTableName, init, isCreatedByJason, isDB, iterator, remove, resultSetToLiteral, size, stop, structure2timestamp, test, timestamp2structureMethods inherited from class jason.bb.ChainBBAdapter
clone, getAsDOM, getCandidateBeliefs, getLastBB, getNameSpaces, getNextAdapter, getPercepts, setNext, toStringMethods inherited from class jason.bb.BeliefBase
abolish, getLock, getNameSpaceProp, getNameSpaceProps, setNameSpacePropMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AgentJDBCPersistentBB
public AgentJDBCPersistentBB()
-
-
Method Details
-
getCreateTable
Description copied from class:JDBCPersistentBBreturns the SQL command to create a new table- Overrides:
getCreateTablein classJDBCPersistentBB- Throws:
SQLException
-
getAgWhere
-
getDeleteAll
Description copied from class:JDBCPersistentBBreturns a SQL command to delete all entries for a predicate- Overrides:
getDeleteAllin classJDBCPersistentBB- Throws:
SQLException
-
getCountQuery
Description copied from class:JDBCPersistentBBreturns a SQL command to count the number of instances of a predicate- Overrides:
getCountQueryin classJDBCPersistentBB- Throws:
SQLException
-
getSelectAll
Description copied from class:JDBCPersistentBBreturns the SQL command the selects all literals of type pi- Overrides:
getSelectAllin classJDBCPersistentBB- Throws:
SQLException
-
getWhere
Description copied from class:JDBCPersistentBBreturns the where clausule for a select for literal l- Overrides:
getWherein classJDBCPersistentBB- Throws:
SQLException
-
getInsert
Description copied from class:JDBCPersistentBBreturns the SQL command to insert l into the DB- Overrides:
getInsertin classJDBCPersistentBB- Throws:
Exception
-