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, url
Fields inherited from class jason.bb.ChainBBAdapter
nextBB
Fields inherited from class jason.bb.BeliefBase
APercept, ASelf, TPercept, TSelf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
returns a SQL command to count the number of instances of a predicateprotected String
getCreateTable
(String table, int arity, Structure columns) returns the SQL command to create a new tableprotected String
returns a SQL command to delete all entries for a predicateprotected String
returns the SQL command to insert l into the DBprotected String
returns the SQL command the selects all literals of type piprotected String
returns 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, timestamp2structure
Methods inherited from class jason.bb.ChainBBAdapter
clone, getAsDOM, getCandidateBeliefs, getLastBB, getNameSpaces, getNextAdapter, getPercepts, setNext, toString
Methods inherited from class jason.bb.BeliefBase
abolish, getLock, getNameSpaceProp, getNameSpaceProps, setNameSpaceProp
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AgentJDBCPersistentBB
public AgentJDBCPersistentBB()
-
-
Method Details
-
getCreateTable
Description copied from class:JDBCPersistentBB
returns the SQL command to create a new table- Overrides:
getCreateTable
in classJDBCPersistentBB
- Throws:
SQLException
-
getAgWhere
-
getDeleteAll
Description copied from class:JDBCPersistentBB
returns a SQL command to delete all entries for a predicate- Overrides:
getDeleteAll
in classJDBCPersistentBB
- Throws:
SQLException
-
getCountQuery
Description copied from class:JDBCPersistentBB
returns a SQL command to count the number of instances of a predicate- Overrides:
getCountQuery
in classJDBCPersistentBB
- Throws:
SQLException
-
getSelectAll
Description copied from class:JDBCPersistentBB
returns the SQL command the selects all literals of type pi- Overrides:
getSelectAll
in classJDBCPersistentBB
- Throws:
SQLException
-
getWhere
Description copied from class:JDBCPersistentBB
returns the where clausule for a select for literal l- Overrides:
getWhere
in classJDBCPersistentBB
- Throws:
SQLException
-
getInsert
Description copied from class:JDBCPersistentBB
returns the SQL command to insert l into the DB- Overrides:
getInsert
in classJDBCPersistentBB
- Throws:
Exception
-