|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jason.bb.ChainBBAdapter jason.bb.JDBCPersistentBB jason.bb.AgentJDBCPersistentBB
public class 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 interface jason.bb.BeliefBase |
---|
APercept, ASelf, TPercept, TSelf |
Constructor Summary | |
---|---|
AgentJDBCPersistentBB()
|
Method Summary | |
---|---|
protected java.lang.String |
getAgWhere()
|
protected java.lang.String |
getCountQuery(PredicateIndicator pi)
returns a SQL command to count the number of instances of a predicate |
protected java.lang.String |
getCreateTable(java.lang.String table,
int arity,
Structure columns)
returns the SQL command to create a new table |
protected java.lang.String |
getDeleteAll(PredicateIndicator pi)
returns a SQL command to delete all entries for a predicate |
protected java.lang.String |
getInsert(Literal l)
returns the SQL command to insert l into the DB |
protected java.lang.String |
getSelectAll(PredicateIndicator pi)
returns the SQL command the selects all literals of type pi |
protected java.lang.String |
getWhere(Literal l)
returns the where clausule for a select for literal l |
Methods inherited from class jason.bb.JDBCPersistentBB |
---|
abolish, add, contains, getCandidateBeliefs, getSelect, getTableName, getTableName, init, isCreatedByJason, isDB, iterator, remove, resultSetToLiteral, size, stop, structure2timestamp, test, timestamp2structure |
Methods inherited from class jason.bb.ChainBBAdapter |
---|
add, clone, getAll, getAsDOM, getCandidateBeliefs, getLastBB, getNextAdapter, getPercepts, getRelevant, setNext, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AgentJDBCPersistentBB()
Method Detail |
---|
protected java.lang.String getCreateTable(java.lang.String table, int arity, Structure columns) throws java.sql.SQLException
JDBCPersistentBB
getCreateTable
in class JDBCPersistentBB
java.sql.SQLException
protected java.lang.String getAgWhere()
protected java.lang.String getDeleteAll(PredicateIndicator pi) throws java.sql.SQLException
JDBCPersistentBB
getDeleteAll
in class JDBCPersistentBB
java.sql.SQLException
protected java.lang.String getCountQuery(PredicateIndicator pi) throws java.sql.SQLException
JDBCPersistentBB
getCountQuery
in class JDBCPersistentBB
java.sql.SQLException
protected java.lang.String getSelectAll(PredicateIndicator pi) throws java.sql.SQLException
JDBCPersistentBB
getSelectAll
in class JDBCPersistentBB
java.sql.SQLException
protected java.lang.String getWhere(Literal l) throws java.sql.SQLException
JDBCPersistentBB
getWhere
in class JDBCPersistentBB
java.sql.SQLException
protected java.lang.String getInsert(Literal l) throws java.sql.SQLException
JDBCPersistentBB
getInsert
in class JDBCPersistentBB
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |