org.openanzo.common.rdb.sql
Class TransactionSQL

java.lang.Object
  extended by org.openanzo.common.rdb.sql.TransactionSQL

public class TransactionSQL
extends java.lang.Object

TransactionSQL provides wrappers around SQL queries and transforms ResultSets into java objects

Author:
Generated Source from org.openanzo.jdbc.utils.opgen.jet

Nested Class Summary
static interface TransactionSQL.DeleteChangesetParams
          Interface for managing the parameters to the deleteChangeset prepared statement.
static class TransactionSQL.DeleteChangesetParamsImpl
          Default implementation of DeleteChangesetParams
static interface TransactionSQL.DeleteCommandParams
          Interface for managing the parameters to the deleteCommand prepared statement.
static class TransactionSQL.DeleteCommandParamsImpl
          Default implementation of DeleteCommandParams
static interface TransactionSQL.InsertChangesetParams
          Interface for managing the parameters to the insertChangeset prepared statement.
static class TransactionSQL.InsertChangesetParamsImpl
          Default implementation of InsertChangesetParams
static interface TransactionSQL.InsertCommandParams
          Interface for managing the parameters to the insertCommand prepared statement.
static class TransactionSQL.InsertCommandParamsImpl
          Default implementation of InsertCommandParams
static interface TransactionSQL.InsertCommandStatementAddParams
          Interface for managing the parameters to the insertCommandStatementAdd prepared statement.
static class TransactionSQL.InsertCommandStatementAddParamsImpl
          Default implementation of InsertCommandStatementAddParams
static interface TransactionSQL.InsertCommandStatementDelParams
          Interface for managing the parameters to the insertCommandStatementDel prepared statement.
static class TransactionSQL.InsertCommandStatementDelParamsImpl
          Default implementation of InsertCommandStatementDelParams
static interface TransactionSQL.InsertNotificationStatementAddParams
          Interface for managing the parameters to the insertNotificationStatementAdd prepared statement.
static class TransactionSQL.InsertNotificationStatementAddParamsImpl
          Default implementation of InsertNotificationStatementAddParams
static interface TransactionSQL.InsertNotificationStatementDelParams
          Interface for managing the parameters to the insertNotificationStatementDel prepared statement.
static class TransactionSQL.InsertNotificationStatementDelParamsImpl
          Default implementation of InsertNotificationStatementDelParams
static interface TransactionSQL.PurgeCommitedStatementsParams
          Interface for managing the parameters to the purgeCommitedStatements prepared statement.
static class TransactionSQL.PurgeCommitedStatementsParamsImpl
          Default implementation of PurgeCommitedStatementsParams
static interface TransactionSQL.SelectAdditionsParams
          Interface for managing the parameters to the selectAdditions prepared statement.
static class TransactionSQL.SelectAdditionsParamsImpl
          Default implementation of SelectAdditionsParams
static interface TransactionSQL.SelectAdditionsResult
          Interface for holding the results of the selectAdditions prepared statement.
static class TransactionSQL.SelectAdditionsResultImpl
          Default implementation of SelectAdditionsResult
static interface TransactionSQL.SelectChangesetResult
          Interface for holding the results of the selectChangeset prepared statement.
static class TransactionSQL.SelectChangesetResultImpl
          Default implementation of SelectChangesetResult
static interface TransactionSQL.SelectCommandResult
          Interface for holding the results of the selectCommand prepared statement.
static class TransactionSQL.SelectCommandResultImpl
          Default implementation of SelectCommandResult
static interface TransactionSQL.SelectDeletionsParams
          Interface for managing the parameters to the selectDeletions prepared statement.
static class TransactionSQL.SelectDeletionsParamsImpl
          Default implementation of SelectDeletionsParams
static interface TransactionSQL.SelectDeletionsResult
          Interface for holding the results of the selectDeletions prepared statement.
static class TransactionSQL.SelectDeletionsResultImpl
          Default implementation of SelectDeletionsResult
static interface TransactionSQL.UdpateChangesetParams
          Interface for managing the parameters to the udpateChangeset prepared statement.
static class TransactionSQL.UdpateChangesetParamsImpl
          Default implementation of UdpateChangesetParams
static interface TransactionSQL.UpdateCommandParams
          Interface for managing the parameters to the updateCommand prepared statement.
static class TransactionSQL.UpdateCommandParamsImpl
          Default implementation of UpdateCommandParams
static interface TransactionSQL.UpdateNotificationStatementAddParams
          Interface for managing the parameters to the updateNotificationStatementAdd prepared statement.
static class TransactionSQL.UpdateNotificationStatementAddParamsImpl
          Default implementation of UpdateNotificationStatementAddParams
static interface TransactionSQL.UpdateNotificationStatementDelParams
          Interface for managing the parameters to the updateNotificationStatementDel prepared statement.
static class TransactionSQL.UpdateNotificationStatementDelParamsImpl
          Default implementation of UpdateNotificationStatementDelParams
static interface TransactionSQL.UpdateStatementAddParams
          Interface for managing the parameters to the updateStatementAdd prepared statement.
static class TransactionSQL.UpdateStatementAddParamsImpl
          Default implementation of UpdateStatementAddParams
static interface TransactionSQL.UpdateStatementDelParams
          Interface for managing the parameters to the updateStatementDel prepared statement.
static class TransactionSQL.UpdateStatementDelParamsImpl
          Default implementation of UpdateStatementDelParams
static interface TransactionSQL.UpdateTransactionStatementAddParams
          Interface for managing the parameters to the updateTransactionStatementAdd prepared statement.
static class TransactionSQL.UpdateTransactionStatementAddParamsImpl
          Default implementation of UpdateTransactionStatementAddParams
static interface TransactionSQL.UpdateTransactionStatementDelParams
          Interface for managing the parameters to the updateTransactionStatementDel prepared statement.
static class TransactionSQL.UpdateTransactionStatementDelParamsImpl
          Default implementation of UpdateTransactionStatementDelParams
 
Field Summary
static java.lang.String deleteChangeset
          Constant "deleteChangeset" used to reference prepared statement transaction.deleteChangeset DELETE FROM ${a} WHERE COMMANDID = ? AND ID = ?
static java.lang.String deleteCommand
          Constant "deleteCommand" used to reference prepared statement transaction.deleteCommand DELETE FROM ${a} WHERE TRANSACTIONID = ? AND ID = ?
static java.lang.String deleteTransaction
          Constant "deleteTransaction" used to reference prepared statement transaction.deleteTransaction DELETE FROM ${a} WHERE ID = ?
static java.lang.String insertChangeset
          Constant "insertChangeset" used to reference prepared statement transaction.insertChangeset INSERT INTO ${a} (commandId, addGraph,removeGraph,metaddgraph,metaremovegraph,namedGraphUri) VALUES (?, ?, ?, ?,?,?)
static java.lang.String insertCommand
          Constant "insertCommand" used to reference prepared statement transaction.insertCommand INSERT INTO ${a} (transactionId, commandType,context,prereq) VALUES (?, ?, ?, ?)
static java.lang.String insertCommandStatementAdd
          Constant "insertCommandStatementAdd" used to reference prepared statement transaction.insertCommandStatementAdd INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TS_ID,CS_ID) VALUES(?,?,?,?,?,?,?)
static java.lang.String insertCommandStatementDel
          Constant "insertCommandStatementDel" used to reference prepared statement transaction.insertCommandStatementDel INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TE_ID,CE_ID) VALUES(?,?,?,?,?,?,?)
static java.lang.String insertNotificationStatementAdd
          Constant "insertNotificationStatementAdd" used to reference prepared statement transaction.insertNotificationStatementAdd INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,1,0)
static java.lang.String insertNotificationStatementDel
          Constant "insertNotificationStatementDel" used to reference prepared statement transaction.insertNotificationStatementDel INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,0,1)
static java.lang.String insertTransaction
          Constant "insertTransaction" used to reference prepared statement transaction.insertTransaction INSERT INTO ${a} (CREATED) VALUES (?)
static java.lang.String maxId
          Constant "maxId" used to reference prepared statement transaction.maxId SELECT MAX(ID) FROM ${a}
static java.lang.String purgeCommitedStatements
          Constant "purgeCommitedStatements" used to reference prepared statement transaction.purgeCommitedStatements DELETE FROM ${a}_ST WHERE (TS_ID IS NOT NULL AND TS_ID=?) OR (TE_ID IS NOT NULL AND TE_ID=?)
static java.lang.String purgeNotificationStatements
          Constant "purgeNotificationStatements" used to reference prepared statement transaction.purgeNotificationStatements DELETE FROM ${a} WHERE TS_ID IS NULL AND TE_ID IS NULL AND (NS=1 OR NE=1)
static java.lang.String selectAdditions
          Constant "selectAdditions" used to reference prepared statement transaction.selectAdditions SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.ts_id =? AND ST.cs_id=?
static java.lang.String selectChangeset
          Constant "selectChangeset" used to reference prepared statement transaction.selectChangeset SELECT ID,ADDGRAPH,REMOVEGRAPH,METAADDGRAPH,METAREMOVEGRAPH,NAMEDGRAPHURI FROM ${a} WHERE COMMANDID = ? ORDER BY ID
static java.lang.String selectCommand
          Constant "selectCommand" used to reference prepared statement transaction.selectCommand SELECT ID,COMMANDTYPE,PREREQ,CONTEXT FROM ${a} WHERE TRANSACTIONID = ? ORDER BY ID
static java.lang.String selectDeletions
          Constant "selectDeletions" used to reference prepared statement transaction.selectDeletions SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.te_id =? AND ST.ce_id=?
static java.lang.String selectMaxChangesetId
          Constant "selectMaxChangesetId" used to reference prepared statement transaction.selectMaxChangesetId SELECT MAX(id) FROM ${a}
static java.lang.String selectTransactions
          Constant "selectTransactions" used to reference prepared statement transaction.selectTransactions SELECT ID FROM ${a} ORDER BY ID
static java.lang.String udpateChangeset
          Constant "udpateChangeset" used to reference prepared statement transaction.udpateChangeset UPDATE ${a} SET ADDGRAPH=?,REMOVEGRAPH=? ,METAADDGRAPH=?,METAREMOVEGRAPH=? WHERE ID=?
static java.lang.String updateCommand
          Constant "updateCommand" used to reference prepared statement transaction.updateCommand UPDATE ${a} set transactionId=?,commandType=?,context=?,preReq=? where id=?
static java.lang.String updateNotificationStatementAdd
          Constant "updateNotificationStatementAdd" used to reference prepared statement transaction.updateNotificationStatementAdd UPDATE ${a} SET NS=1,NE=0 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )
static java.lang.String updateNotificationStatementDel
          Constant "updateNotificationStatementDel" used to reference prepared statement transaction.updateNotificationStatementDel UPDATE ${a} SET NS=0,NE=1 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )
static java.lang.String updateStatementAdd
          Constant "updateStatementAdd" used to reference prepared statement transaction.updateStatementAdd UPDATE ${a} SET NS=0,NE=0,TS_ID=NULL,TE_ID=NULL,CS_ID=NULL,TE_ID=NULL WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID
static java.lang.String updateStatementDel
          Constant "updateStatementDel" used to reference prepared statement transaction.updateStatementDel DELETE FROM ${a} WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID
static java.lang.String updateTransactionStatementAdd
          Constant "updateTransactionStatementAdd" used to reference prepared statement transaction.updateTransactionStatementAdd UPDATE ${a} SET TS_ID=?,CS_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TS_ID IS NULL and TE_ID IS NULL AND CS_ID IS NULL AND CE_ID IS NULL
static java.lang.String updateTransactionStatementDel
          Constant "updateTransactionStatementDel" used to reference prepared statement transaction.updateTransactionStatementDel UPDATE ${a} SET TE_ID=?,CE_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TE_ID IS NULL
 
Constructor Summary
TransactionSQL()
           
 
Method Summary
static int deleteChangeset(PreparedStatementCache sqlCache, long cmdId, long csId, java.lang.String transactionTableName)
          Runs the deleteChangeset prepared statement.
static int deleteChangeset(PreparedStatementCache sqlCache, TransactionSQL.DeleteChangesetParams params, java.lang.String transactionTableName)
          Runs the deleteChangeset prepared statement.
static int deleteCommand(PreparedStatementCache sqlCache, long transactionId, long cmdId, java.lang.String transactionTableName)
          Runs the deleteCommand prepared statement.
static int deleteCommand(PreparedStatementCache sqlCache, TransactionSQL.DeleteCommandParams params, java.lang.String transactionTableName)
          Runs the deleteCommand prepared statement.
static int deleteTransaction(PreparedStatementCache sqlCache, long transactionId, java.lang.String transactionTableName)
          Runs the deleteTransaction prepared statement.
static int insertChangeset(PreparedStatementCache sqlCache, long commandId, java.sql.Clob addGraph, java.sql.Clob removeGraph, java.sql.Clob addMetaGraph, java.sql.Clob removeMetaGraph, java.lang.String uri, java.lang.String transactionTableName)
          Runs the insertChangeset prepared statement.
static int insertChangeset(PreparedStatementCache sqlCache, TransactionSQL.InsertChangesetParams params, java.lang.String transactionTableName)
          Runs the insertChangeset prepared statement.
static int insertCommand(PreparedStatementCache sqlCache, long transactionId, java.lang.String commandType, java.sql.Clob context, java.sql.Clob preReq, java.lang.String transactionTableName)
          Runs the insertCommand prepared statement.
static int insertCommand(PreparedStatementCache sqlCache, TransactionSQL.InsertCommandParams params, java.lang.String transactionTableName)
          Runs the insertCommand prepared statement.
static int insertCommandStatementAdd(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, long transId, long commandId, java.lang.String transactionTableName)
          Runs the insertCommandStatementAdd prepared statement.
static int insertCommandStatementAdd(PreparedStatementCache sqlCache, TransactionSQL.InsertCommandStatementAddParams params, java.lang.String transactionTableName)
          Runs the insertCommandStatementAdd prepared statement.
static int insertCommandStatementDel(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, long transId, long commandId, java.lang.String transactionTableName)
          Runs the insertCommandStatementDel prepared statement.
static int insertCommandStatementDel(PreparedStatementCache sqlCache, TransactionSQL.InsertCommandStatementDelParams params, java.lang.String transactionTableName)
          Runs the insertCommandStatementDel prepared statement.
static int insertNotificationStatementAdd(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, java.lang.String transactionTableName)
          Runs the insertNotificationStatementAdd prepared statement.
static int insertNotificationStatementAdd(PreparedStatementCache sqlCache, TransactionSQL.InsertNotificationStatementAddParams params, java.lang.String transactionTableName)
          Runs the insertNotificationStatementAdd prepared statement.
static int insertNotificationStatementDel(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, java.lang.String transactionTableName)
          Runs the insertNotificationStatementDel prepared statement.
static int insertNotificationStatementDel(PreparedStatementCache sqlCache, TransactionSQL.InsertNotificationStatementDelParams params, java.lang.String transactionTableName)
          Runs the insertNotificationStatementDel prepared statement.
static int insertTransaction(PreparedStatementCache sqlCache, java.sql.Timestamp created, java.lang.String transactionTableName)
          Runs the insertTransaction prepared statement.
static java.lang.Long maxId(PreparedStatementCache sqlCache, java.lang.String transactionTableName)
          Runs the maxId prepared statement.
static void prepareDeleteChangeset(java.sql.PreparedStatement ps, long cmdId, long csId)
          Sets the input parameters for the deleteChangeset prepared statement.
static void prepareDeleteCommand(java.sql.PreparedStatement ps, long transactionId, long cmdId)
          Sets the input parameters for the deleteCommand prepared statement.
static void prepareDeleteTransaction(java.sql.PreparedStatement ps, long transactionId)
          Sets the input parameters for the deleteTransaction prepared statement.
static void prepareInsertChangeset(java.sql.PreparedStatement ps, long commandId, java.sql.Clob addGraph, java.sql.Clob removeGraph, java.sql.Clob addMetaGraph, java.sql.Clob removeMetaGraph, java.lang.String uri)
          Sets the input parameters for the insertChangeset prepared statement.
static void prepareInsertCommand(java.sql.PreparedStatement ps, long transactionId, java.lang.String commandType, java.sql.Clob context, java.sql.Clob preReq)
          Sets the input parameters for the insertCommand prepared statement.
static void prepareInsertCommandStatementAdd(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj, long transId, long commandId)
          Sets the input parameters for the insertCommandStatementAdd prepared statement.
static void prepareInsertCommandStatementDel(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj, long transId, long commandId)
          Sets the input parameters for the insertCommandStatementDel prepared statement.
static void prepareInsertNotificationStatementAdd(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj)
          Sets the input parameters for the insertNotificationStatementAdd prepared statement.
static void prepareInsertNotificationStatementDel(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj)
          Sets the input parameters for the insertNotificationStatementDel prepared statement.
static void prepareInsertTransaction(java.sql.PreparedStatement ps, java.sql.Timestamp created)
          Sets the input parameters for the insertTransaction prepared statement.
static void prepareMaxId(java.sql.PreparedStatement ps)
          Sets the input parameters for the maxId prepared statement.
static void preparePurgeCommitedStatements(java.sql.PreparedStatement ps, long lastTransaction, long lastTransaction2)
          Sets the input parameters for the purgeCommitedStatements prepared statement.
static void preparePurgeNotificationStatements(java.sql.PreparedStatement ps)
          Sets the input parameters for the purgeNotificationStatements prepared statement.
static void prepareSelectAdditions(java.sql.PreparedStatement ps, long transactionId, long commandId2)
          Sets the input parameters for the selectAdditions prepared statement.
static void prepareSelectChangeset(java.sql.PreparedStatement ps, long cmdId)
          Sets the input parameters for the selectChangeset prepared statement.
static void prepareSelectCommand(java.sql.PreparedStatement ps, long transactionId)
          Sets the input parameters for the selectCommand prepared statement.
static void prepareSelectDeletions(java.sql.PreparedStatement ps, long transactionId, long commandId)
          Sets the input parameters for the selectDeletions prepared statement.
static void prepareSelectMaxChangesetId(java.sql.PreparedStatement ps)
          Sets the input parameters for the selectMaxChangesetId prepared statement.
static void prepareSelectTransactions(java.sql.PreparedStatement ps)
          Sets the input parameters for the selectTransactions prepared statement.
static void prepareUdpateChangeset(java.sql.PreparedStatement ps, java.sql.Clob addGraph, java.sql.Clob removeGraph, java.sql.Clob addMetaGraph, java.sql.Clob removeMetaGraph, long id)
          Sets the input parameters for the udpateChangeset prepared statement.
static void prepareUpdateCommand(java.sql.PreparedStatement ps, long transactionId, java.lang.String commandType, java.sql.Clob context, java.sql.Clob preReq, long id)
          Sets the input parameters for the updateCommand prepared statement.
static void prepareUpdateNotificationStatementAdd(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj)
          Sets the input parameters for the updateNotificationStatementAdd prepared statement.
static void prepareUpdateNotificationStatementDel(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj)
          Sets the input parameters for the updateNotificationStatementDel prepared statement.
static void prepareUpdateStatementAdd(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj, long lastTransaction, long lastTransaction2)
          Sets the input parameters for the updateStatementAdd prepared statement.
static void prepareUpdateStatementDel(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj, long lastTransaction, long lastTransaction2)
          Sets the input parameters for the updateStatementDel prepared statement.
static void prepareUpdateTransactionStatementAdd(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj, long transactionId, long commandId)
          Sets the input parameters for the updateTransactionStatementAdd prepared statement.
static void prepareUpdateTransactionStatementDel(java.sql.PreparedStatement ps, int metadata, long namedgraphid, long subj, long prop, long obj, long transactionId, long commandId)
          Sets the input parameters for the updateTransactionStatementDel prepared statement.
static int purgeCommitedStatements(PreparedStatementCache sqlCache, long lastTransaction, long lastTransaction2, java.lang.String transactionTableName)
          Runs the purgeCommitedStatements prepared statement.
static int purgeCommitedStatements(PreparedStatementCache sqlCache, TransactionSQL.PurgeCommitedStatementsParams params, java.lang.String transactionTableName)
          Runs the purgeCommitedStatements prepared statement.
static int purgeNotificationStatements(PreparedStatementCache sqlCache, java.lang.String transactionTableName)
          Runs the purgeNotificationStatements prepared statement.
static ClosableIterator<TransactionSQL.SelectAdditionsResult> selectAdditions(PreparedStatementCache sqlCache, long transactionId, long commandId2, java.lang.String containerName)
          Runs the selectAdditions prepared statement with the default transformer.
static ClosableIterator<TransactionSQL.SelectAdditionsResult> selectAdditions(PreparedStatementCache sqlCache, long transactionId, long commandId2, java.lang.String containerName, Transformer<TransactionSQL.SelectAdditionsResult> transform)
          Runs the selectAdditions prepared statement.
static ClosableIterator<TransactionSQL.SelectAdditionsResult> selectAdditions(PreparedStatementCache sqlCache, TransactionSQL.SelectAdditionsParams params, java.lang.String containerName)
          Runs the selectAdditions prepared statement.
static ClosableIterator<TransactionSQL.SelectChangesetResult> selectChangeset(PreparedStatementCache sqlCache, long cmdId, java.lang.String transactionTableName)
          Runs the selectChangeset prepared statement with the default transformer.
static ClosableIterator<TransactionSQL.SelectChangesetResult> selectChangeset(PreparedStatementCache sqlCache, long cmdId, java.lang.String transactionTableName, Transformer<TransactionSQL.SelectChangesetResult> transform)
          Runs the selectChangeset prepared statement.
static ClosableIterator<TransactionSQL.SelectCommandResult> selectCommand(PreparedStatementCache sqlCache, long transactionId, java.lang.String transactionTableName)
          Runs the selectCommand prepared statement with the default transformer.
static ClosableIterator<TransactionSQL.SelectCommandResult> selectCommand(PreparedStatementCache sqlCache, long transactionId, java.lang.String transactionTableName, Transformer<TransactionSQL.SelectCommandResult> transform)
          Runs the selectCommand prepared statement.
static ClosableIterator<TransactionSQL.SelectDeletionsResult> selectDeletions(PreparedStatementCache sqlCache, long transactionId, long commandId, java.lang.String containerName)
          Runs the selectDeletions prepared statement with the default transformer.
static ClosableIterator<TransactionSQL.SelectDeletionsResult> selectDeletions(PreparedStatementCache sqlCache, long transactionId, long commandId, java.lang.String containerName, Transformer<TransactionSQL.SelectDeletionsResult> transform)
          Runs the selectDeletions prepared statement.
static ClosableIterator<TransactionSQL.SelectDeletionsResult> selectDeletions(PreparedStatementCache sqlCache, TransactionSQL.SelectDeletionsParams params, java.lang.String containerName)
          Runs the selectDeletions prepared statement.
static java.lang.Long selectMaxChangesetId(PreparedStatementCache sqlCache, java.lang.String transactionTableName)
          Runs the selectMaxChangesetId prepared statement.
static ClosableIterator<java.lang.Long> selectTransactions(PreparedStatementCache sqlCache, java.lang.String transactionTableName)
          Runs the selectTransactions prepared statement with the default transformer.
static ClosableIterator<java.lang.Long> selectTransactions(PreparedStatementCache sqlCache, java.lang.String transactionTableName, Transformer<java.lang.Long> transform)
          Runs the selectTransactions prepared statement.
static int udpateChangeset(PreparedStatementCache sqlCache, java.sql.Clob addGraph, java.sql.Clob removeGraph, java.sql.Clob addMetaGraph, java.sql.Clob removeMetaGraph, long id, java.lang.String transactionTableName)
          Runs the udpateChangeset prepared statement.
static int udpateChangeset(PreparedStatementCache sqlCache, TransactionSQL.UdpateChangesetParams params, java.lang.String transactionTableName)
          Runs the udpateChangeset prepared statement.
static int updateCommand(PreparedStatementCache sqlCache, long transactionId, java.lang.String commandType, java.sql.Clob context, java.sql.Clob preReq, long id, java.lang.String transactionTableName)
          Runs the updateCommand prepared statement.
static int updateCommand(PreparedStatementCache sqlCache, TransactionSQL.UpdateCommandParams params, java.lang.String transactionTableName)
          Runs the updateCommand prepared statement.
static int updateNotificationStatementAdd(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, java.lang.String transactionTableName)
          Runs the updateNotificationStatementAdd prepared statement.
static int updateNotificationStatementAdd(PreparedStatementCache sqlCache, TransactionSQL.UpdateNotificationStatementAddParams params, java.lang.String transactionTableName)
          Runs the updateNotificationStatementAdd prepared statement.
static int updateNotificationStatementDel(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, java.lang.String transactionTableName)
          Runs the updateNotificationStatementDel prepared statement.
static int updateNotificationStatementDel(PreparedStatementCache sqlCache, TransactionSQL.UpdateNotificationStatementDelParams params, java.lang.String transactionTableName)
          Runs the updateNotificationStatementDel prepared statement.
static int updateStatementAdd(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, long lastTransaction, long lastTransaction2, java.lang.String transactionTableName)
          Runs the updateStatementAdd prepared statement.
static int updateStatementAdd(PreparedStatementCache sqlCache, TransactionSQL.UpdateStatementAddParams params, java.lang.String transactionTableName)
          Runs the updateStatementAdd prepared statement.
static int updateStatementDel(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, long lastTransaction, long lastTransaction2, java.lang.String transactionTableName)
          Runs the updateStatementDel prepared statement.
static int updateStatementDel(PreparedStatementCache sqlCache, TransactionSQL.UpdateStatementDelParams params, java.lang.String transactionTableName)
          Runs the updateStatementDel prepared statement.
static int updateTransactionStatementAdd(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, long transactionId, long commandId, java.lang.String transactionTableName)
          Runs the updateTransactionStatementAdd prepared statement.
static int updateTransactionStatementAdd(PreparedStatementCache sqlCache, TransactionSQL.UpdateTransactionStatementAddParams params, java.lang.String transactionTableName)
          Runs the updateTransactionStatementAdd prepared statement.
static int updateTransactionStatementDel(PreparedStatementCache sqlCache, int metadata, long namedgraphid, long subj, long prop, long obj, long transactionId, long commandId, java.lang.String transactionTableName)
          Runs the updateTransactionStatementDel prepared statement.
static int updateTransactionStatementDel(PreparedStatementCache sqlCache, TransactionSQL.UpdateTransactionStatementDelParams params, java.lang.String transactionTableName)
          Runs the updateTransactionStatementDel prepared statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

insertNotificationStatementAdd

public static final java.lang.String insertNotificationStatementAdd
Constant "insertNotificationStatementAdd" used to reference prepared statement transaction.insertNotificationStatementAdd INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,1,0)

See Also:
Constant Field Values

insertNotificationStatementDel

public static final java.lang.String insertNotificationStatementDel
Constant "insertNotificationStatementDel" used to reference prepared statement transaction.insertNotificationStatementDel INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,0,1)

See Also:
Constant Field Values

updateNotificationStatementAdd

public static final java.lang.String updateNotificationStatementAdd
Constant "updateNotificationStatementAdd" used to reference prepared statement transaction.updateNotificationStatementAdd UPDATE ${a} SET NS=1,NE=0 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )

See Also:
Constant Field Values

updateNotificationStatementDel

public static final java.lang.String updateNotificationStatementDel
Constant "updateNotificationStatementDel" used to reference prepared statement transaction.updateNotificationStatementDel UPDATE ${a} SET NS=0,NE=1 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )

See Also:
Constant Field Values

purgeCommitedStatements

public static final java.lang.String purgeCommitedStatements
Constant "purgeCommitedStatements" used to reference prepared statement transaction.purgeCommitedStatements DELETE FROM ${a}_ST WHERE (TS_ID IS NOT NULL AND TS_ID=?) OR (TE_ID IS NOT NULL AND TE_ID=?)

See Also:
Constant Field Values

purgeNotificationStatements

public static final java.lang.String purgeNotificationStatements
Constant "purgeNotificationStatements" used to reference prepared statement transaction.purgeNotificationStatements DELETE FROM ${a} WHERE TS_ID IS NULL AND TE_ID IS NULL AND (NS=1 OR NE=1)

See Also:
Constant Field Values

updateStatementAdd

public static final java.lang.String updateStatementAdd
Constant "updateStatementAdd" used to reference prepared statement transaction.updateStatementAdd UPDATE ${a} SET NS=0,NE=0,TS_ID=NULL,TE_ID=NULL,CS_ID=NULL,TE_ID=NULL WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID

See Also:
Constant Field Values

updateStatementDel

public static final java.lang.String updateStatementDel
Constant "updateStatementDel" used to reference prepared statement transaction.updateStatementDel DELETE FROM ${a} WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID

See Also:
Constant Field Values

insertCommandStatementAdd

public static final java.lang.String insertCommandStatementAdd
Constant "insertCommandStatementAdd" used to reference prepared statement transaction.insertCommandStatementAdd INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TS_ID,CS_ID) VALUES(?,?,?,?,?,?,?)

See Also:
Constant Field Values

insertCommandStatementDel

public static final java.lang.String insertCommandStatementDel
Constant "insertCommandStatementDel" used to reference prepared statement transaction.insertCommandStatementDel INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TE_ID,CE_ID) VALUES(?,?,?,?,?,?,?)

See Also:
Constant Field Values

updateTransactionStatementDel

public static final java.lang.String updateTransactionStatementDel
Constant "updateTransactionStatementDel" used to reference prepared statement transaction.updateTransactionStatementDel UPDATE ${a} SET TE_ID=?,CE_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TE_ID IS NULL

See Also:
Constant Field Values

updateTransactionStatementAdd

public static final java.lang.String updateTransactionStatementAdd
Constant "updateTransactionStatementAdd" used to reference prepared statement transaction.updateTransactionStatementAdd UPDATE ${a} SET TS_ID=?,CS_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TS_ID IS NULL and TE_ID IS NULL AND CS_ID IS NULL AND CE_ID IS NULL

See Also:
Constant Field Values

selectAdditions

public static final java.lang.String selectAdditions
Constant "selectAdditions" used to reference prepared statement transaction.selectAdditions SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.ts_id =? AND ST.cs_id=?

See Also:
Constant Field Values

selectDeletions

public static final java.lang.String selectDeletions
Constant "selectDeletions" used to reference prepared statement transaction.selectDeletions SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.te_id =? AND ST.ce_id=?

See Also:
Constant Field Values

udpateChangeset

public static final java.lang.String udpateChangeset
Constant "udpateChangeset" used to reference prepared statement transaction.udpateChangeset UPDATE ${a} SET ADDGRAPH=?,REMOVEGRAPH=? ,METAADDGRAPH=?,METAREMOVEGRAPH=? WHERE ID=?

See Also:
Constant Field Values

insertChangeset

public static final java.lang.String insertChangeset
Constant "insertChangeset" used to reference prepared statement transaction.insertChangeset INSERT INTO ${a} (commandId, addGraph,removeGraph,metaddgraph,metaremovegraph,namedGraphUri) VALUES (?, ?, ?, ?,?,?)

See Also:
Constant Field Values

selectMaxChangesetId

public static final java.lang.String selectMaxChangesetId
Constant "selectMaxChangesetId" used to reference prepared statement transaction.selectMaxChangesetId SELECT MAX(id) FROM ${a}

See Also:
Constant Field Values

deleteChangeset

public static final java.lang.String deleteChangeset
Constant "deleteChangeset" used to reference prepared statement transaction.deleteChangeset DELETE FROM ${a} WHERE COMMANDID = ? AND ID = ?

See Also:
Constant Field Values

selectChangeset

public static final java.lang.String selectChangeset
Constant "selectChangeset" used to reference prepared statement transaction.selectChangeset SELECT ID,ADDGRAPH,REMOVEGRAPH,METAADDGRAPH,METAREMOVEGRAPH,NAMEDGRAPHURI FROM ${a} WHERE COMMANDID = ? ORDER BY ID

See Also:
Constant Field Values

updateCommand

public static final java.lang.String updateCommand
Constant "updateCommand" used to reference prepared statement transaction.updateCommand UPDATE ${a} set transactionId=?,commandType=?,context=?,preReq=? where id=?

See Also:
Constant Field Values

insertCommand

public static final java.lang.String insertCommand
Constant "insertCommand" used to reference prepared statement transaction.insertCommand INSERT INTO ${a} (transactionId, commandType,context,prereq) VALUES (?, ?, ?, ?)

See Also:
Constant Field Values

deleteCommand

public static final java.lang.String deleteCommand
Constant "deleteCommand" used to reference prepared statement transaction.deleteCommand DELETE FROM ${a} WHERE TRANSACTIONID = ? AND ID = ?

See Also:
Constant Field Values

deleteTransaction

public static final java.lang.String deleteTransaction
Constant "deleteTransaction" used to reference prepared statement transaction.deleteTransaction DELETE FROM ${a} WHERE ID = ?

See Also:
Constant Field Values

selectCommand

public static final java.lang.String selectCommand
Constant "selectCommand" used to reference prepared statement transaction.selectCommand SELECT ID,COMMANDTYPE,PREREQ,CONTEXT FROM ${a} WHERE TRANSACTIONID = ? ORDER BY ID

See Also:
Constant Field Values

insertTransaction

public static final java.lang.String insertTransaction
Constant "insertTransaction" used to reference prepared statement transaction.insertTransaction INSERT INTO ${a} (CREATED) VALUES (?)

See Also:
Constant Field Values

maxId

public static final java.lang.String maxId
Constant "maxId" used to reference prepared statement transaction.maxId SELECT MAX(ID) FROM ${a}

See Also:
Constant Field Values

selectTransactions

public static final java.lang.String selectTransactions
Constant "selectTransactions" used to reference prepared statement transaction.selectTransactions SELECT ID FROM ${a} ORDER BY ID

See Also:
Constant Field Values
Constructor Detail

TransactionSQL

public TransactionSQL()
Method Detail

insertNotificationStatementAdd

public static int insertNotificationStatementAdd(PreparedStatementCache sqlCache,
                                                 TransactionSQL.InsertNotificationStatementAddParams params,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the insertNotificationStatementAdd prepared statement. INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,1,0)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertNotificationStatementAddParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

insertNotificationStatementAdd

public static int insertNotificationStatementAdd(PreparedStatementCache sqlCache,
                                                 int metadata,
                                                 long namedgraphid,
                                                 long subj,
                                                 long prop,
                                                 long obj,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the insertNotificationStatementAdd prepared statement. INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,1,0)

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareInsertNotificationStatementAdd

public static void prepareInsertNotificationStatementAdd(java.sql.PreparedStatement ps,
                                                         int metadata,
                                                         long namedgraphid,
                                                         long subj,
                                                         long prop,
                                                         long obj)
                                                  throws java.sql.SQLException
Sets the input parameters for the insertNotificationStatementAdd prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
Throws:
java.sql.SQLException

insertNotificationStatementDel

public static int insertNotificationStatementDel(PreparedStatementCache sqlCache,
                                                 TransactionSQL.InsertNotificationStatementDelParams params,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the insertNotificationStatementDel prepared statement. INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,0,1)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertNotificationStatementDelParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

insertNotificationStatementDel

public static int insertNotificationStatementDel(PreparedStatementCache sqlCache,
                                                 int metadata,
                                                 long namedgraphid,
                                                 long subj,
                                                 long prop,
                                                 long obj,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the insertNotificationStatementDel prepared statement. INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,NS,NE) VALUES(?,?,?,?,?,0,1)

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareInsertNotificationStatementDel

public static void prepareInsertNotificationStatementDel(java.sql.PreparedStatement ps,
                                                         int metadata,
                                                         long namedgraphid,
                                                         long subj,
                                                         long prop,
                                                         long obj)
                                                  throws java.sql.SQLException
Sets the input parameters for the insertNotificationStatementDel prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
Throws:
java.sql.SQLException

updateNotificationStatementAdd

public static int updateNotificationStatementAdd(PreparedStatementCache sqlCache,
                                                 TransactionSQL.UpdateNotificationStatementAddParams params,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the updateNotificationStatementAdd prepared statement. UPDATE ${a} SET NS=1,NE=0 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UpdateNotificationStatementAddParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

updateNotificationStatementAdd

public static int updateNotificationStatementAdd(PreparedStatementCache sqlCache,
                                                 int metadata,
                                                 long namedgraphid,
                                                 long subj,
                                                 long prop,
                                                 long obj,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the updateNotificationStatementAdd prepared statement. UPDATE ${a} SET NS=1,NE=0 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUpdateNotificationStatementAdd

public static void prepareUpdateNotificationStatementAdd(java.sql.PreparedStatement ps,
                                                         int metadata,
                                                         long namedgraphid,
                                                         long subj,
                                                         long prop,
                                                         long obj)
                                                  throws java.sql.SQLException
Sets the input parameters for the updateNotificationStatementAdd prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
Throws:
java.sql.SQLException

updateNotificationStatementDel

public static int updateNotificationStatementDel(PreparedStatementCache sqlCache,
                                                 TransactionSQL.UpdateNotificationStatementDelParams params,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the updateNotificationStatementDel prepared statement. UPDATE ${a} SET NS=0,NE=1 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UpdateNotificationStatementDelParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

updateNotificationStatementDel

public static int updateNotificationStatementDel(PreparedStatementCache sqlCache,
                                                 int metadata,
                                                 long namedgraphid,
                                                 long subj,
                                                 long prop,
                                                 long obj,
                                                 java.lang.String transactionTableName)
                                          throws RdbException
Runs the updateNotificationStatementDel prepared statement. UPDATE ${a} SET NS=0,NE=1 WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NOT NULL OR TE_ID IS NOT NULL )

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUpdateNotificationStatementDel

public static void prepareUpdateNotificationStatementDel(java.sql.PreparedStatement ps,
                                                         int metadata,
                                                         long namedgraphid,
                                                         long subj,
                                                         long prop,
                                                         long obj)
                                                  throws java.sql.SQLException
Sets the input parameters for the updateNotificationStatementDel prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
Throws:
java.sql.SQLException

purgeCommitedStatements

public static int purgeCommitedStatements(PreparedStatementCache sqlCache,
                                          TransactionSQL.PurgeCommitedStatementsParams params,
                                          java.lang.String transactionTableName)
                                   throws RdbException
Runs the purgeCommitedStatements prepared statement. DELETE FROM ${a}_ST WHERE (TS_ID IS NOT NULL AND TS_ID=?) OR (TE_ID IS NOT NULL AND TE_ID=?)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - PurgeCommitedStatementsParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

purgeCommitedStatements

public static int purgeCommitedStatements(PreparedStatementCache sqlCache,
                                          long lastTransaction,
                                          long lastTransaction2,
                                          java.lang.String transactionTableName)
                                   throws RdbException
Runs the purgeCommitedStatements prepared statement. DELETE FROM ${a}_ST WHERE (TS_ID IS NOT NULL AND TS_ID=?) OR (TE_ID IS NOT NULL AND TE_ID=?)

Parameters:
sqlCache - factory and cache of PreparedStatments
lastTransaction - template parameter
lastTransaction2 - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

preparePurgeCommitedStatements

public static void preparePurgeCommitedStatements(java.sql.PreparedStatement ps,
                                                  long lastTransaction,
                                                  long lastTransaction2)
                                           throws java.sql.SQLException
Sets the input parameters for the purgeCommitedStatements prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
lastTransaction - template parameter
lastTransaction2 - template parameter
Throws:
java.sql.SQLException

purgeNotificationStatements

public static int purgeNotificationStatements(PreparedStatementCache sqlCache,
                                              java.lang.String transactionTableName)
                                       throws RdbException
Runs the purgeNotificationStatements prepared statement. DELETE FROM ${a} WHERE TS_ID IS NULL AND TE_ID IS NULL AND (NS=1 OR NE=1)

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

preparePurgeNotificationStatements

public static void preparePurgeNotificationStatements(java.sql.PreparedStatement ps)
                                               throws java.sql.SQLException
Sets the input parameters for the purgeNotificationStatements prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

updateStatementAdd

public static int updateStatementAdd(PreparedStatementCache sqlCache,
                                     TransactionSQL.UpdateStatementAddParams params,
                                     java.lang.String transactionTableName)
                              throws RdbException
Runs the updateStatementAdd prepared statement. UPDATE ${a} SET NS=0,NE=0,TS_ID=NULL,TE_ID=NULL,CS_ID=NULL,TE_ID=NULL WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UpdateStatementAddParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

updateStatementAdd

public static int updateStatementAdd(PreparedStatementCache sqlCache,
                                     int metadata,
                                     long namedgraphid,
                                     long subj,
                                     long prop,
                                     long obj,
                                     long lastTransaction,
                                     long lastTransaction2,
                                     java.lang.String transactionTableName)
                              throws RdbException
Runs the updateStatementAdd prepared statement. UPDATE ${a} SET NS=0,NE=0,TS_ID=NULL,TE_ID=NULL,CS_ID=NULL,TE_ID=NULL WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
lastTransaction - template parameter
lastTransaction2 - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUpdateStatementAdd

public static void prepareUpdateStatementAdd(java.sql.PreparedStatement ps,
                                             int metadata,
                                             long namedgraphid,
                                             long subj,
                                             long prop,
                                             long obj,
                                             long lastTransaction,
                                             long lastTransaction2)
                                      throws java.sql.SQLException
Sets the input parameters for the updateStatementAdd prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
lastTransaction - template parameter
lastTransaction2 - template parameter
Throws:
java.sql.SQLException

updateStatementDel

public static int updateStatementDel(PreparedStatementCache sqlCache,
                                     TransactionSQL.UpdateStatementDelParams params,
                                     java.lang.String transactionTableName)
                              throws RdbException
Runs the updateStatementDel prepared statement. DELETE FROM ${a} WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UpdateStatementDelParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

updateStatementDel

public static int updateStatementDel(PreparedStatementCache sqlCache,
                                     int metadata,
                                     long namedgraphid,
                                     long subj,
                                     long prop,
                                     long obj,
                                     long lastTransaction,
                                     long lastTransaction2,
                                     java.lang.String transactionTableName)
                              throws RdbException
Runs the updateStatementDel prepared statement. DELETE FROM ${a} WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND (TS_ID IS NULL OR TS_ID

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
lastTransaction - template parameter
lastTransaction2 - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUpdateStatementDel

public static void prepareUpdateStatementDel(java.sql.PreparedStatement ps,
                                             int metadata,
                                             long namedgraphid,
                                             long subj,
                                             long prop,
                                             long obj,
                                             long lastTransaction,
                                             long lastTransaction2)
                                      throws java.sql.SQLException
Sets the input parameters for the updateStatementDel prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
lastTransaction - template parameter
lastTransaction2 - template parameter
Throws:
java.sql.SQLException

insertCommandStatementAdd

public static int insertCommandStatementAdd(PreparedStatementCache sqlCache,
                                            TransactionSQL.InsertCommandStatementAddParams params,
                                            java.lang.String transactionTableName)
                                     throws RdbException
Runs the insertCommandStatementAdd prepared statement. INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TS_ID,CS_ID) VALUES(?,?,?,?,?,?,?)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertCommandStatementAddParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

insertCommandStatementAdd

public static int insertCommandStatementAdd(PreparedStatementCache sqlCache,
                                            int metadata,
                                            long namedgraphid,
                                            long subj,
                                            long prop,
                                            long obj,
                                            long transId,
                                            long commandId,
                                            java.lang.String transactionTableName)
                                     throws RdbException
Runs the insertCommandStatementAdd prepared statement. INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TS_ID,CS_ID) VALUES(?,?,?,?,?,?,?)

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transId - template parameter
commandId - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareInsertCommandStatementAdd

public static void prepareInsertCommandStatementAdd(java.sql.PreparedStatement ps,
                                                    int metadata,
                                                    long namedgraphid,
                                                    long subj,
                                                    long prop,
                                                    long obj,
                                                    long transId,
                                                    long commandId)
                                             throws java.sql.SQLException
Sets the input parameters for the insertCommandStatementAdd prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transId - template parameter
commandId - template parameter
Throws:
java.sql.SQLException

insertCommandStatementDel

public static int insertCommandStatementDel(PreparedStatementCache sqlCache,
                                            TransactionSQL.InsertCommandStatementDelParams params,
                                            java.lang.String transactionTableName)
                                     throws RdbException
Runs the insertCommandStatementDel prepared statement. INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TE_ID,CE_ID) VALUES(?,?,?,?,?,?,?)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertCommandStatementDelParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

insertCommandStatementDel

public static int insertCommandStatementDel(PreparedStatementCache sqlCache,
                                            int metadata,
                                            long namedgraphid,
                                            long subj,
                                            long prop,
                                            long obj,
                                            long transId,
                                            long commandId,
                                            java.lang.String transactionTableName)
                                     throws RdbException
Runs the insertCommandStatementDel prepared statement. INSERT INTO ${a}_ST (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ,TE_ID,CE_ID) VALUES(?,?,?,?,?,?,?)

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transId - template parameter
commandId - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareInsertCommandStatementDel

public static void prepareInsertCommandStatementDel(java.sql.PreparedStatement ps,
                                                    int metadata,
                                                    long namedgraphid,
                                                    long subj,
                                                    long prop,
                                                    long obj,
                                                    long transId,
                                                    long commandId)
                                             throws java.sql.SQLException
Sets the input parameters for the insertCommandStatementDel prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transId - template parameter
commandId - template parameter
Throws:
java.sql.SQLException

updateTransactionStatementDel

public static int updateTransactionStatementDel(PreparedStatementCache sqlCache,
                                                TransactionSQL.UpdateTransactionStatementDelParams params,
                                                java.lang.String transactionTableName)
                                         throws RdbException
Runs the updateTransactionStatementDel prepared statement. UPDATE ${a} SET TE_ID=?,CE_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TE_ID IS NULL

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UpdateTransactionStatementDelParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

updateTransactionStatementDel

public static int updateTransactionStatementDel(PreparedStatementCache sqlCache,
                                                int metadata,
                                                long namedgraphid,
                                                long subj,
                                                long prop,
                                                long obj,
                                                long transactionId,
                                                long commandId,
                                                java.lang.String transactionTableName)
                                         throws RdbException
Runs the updateTransactionStatementDel prepared statement. UPDATE ${a} SET TE_ID=?,CE_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TE_ID IS NULL

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionId - template parameter
commandId - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUpdateTransactionStatementDel

public static void prepareUpdateTransactionStatementDel(java.sql.PreparedStatement ps,
                                                        int metadata,
                                                        long namedgraphid,
                                                        long subj,
                                                        long prop,
                                                        long obj,
                                                        long transactionId,
                                                        long commandId)
                                                 throws java.sql.SQLException
Sets the input parameters for the updateTransactionStatementDel prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionId - template parameter
commandId - template parameter
Throws:
java.sql.SQLException

updateTransactionStatementAdd

public static int updateTransactionStatementAdd(PreparedStatementCache sqlCache,
                                                TransactionSQL.UpdateTransactionStatementAddParams params,
                                                java.lang.String transactionTableName)
                                         throws RdbException
Runs the updateTransactionStatementAdd prepared statement. UPDATE ${a} SET TS_ID=?,CS_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TS_ID IS NULL and TE_ID IS NULL AND CS_ID IS NULL AND CE_ID IS NULL

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UpdateTransactionStatementAddParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

updateTransactionStatementAdd

public static int updateTransactionStatementAdd(PreparedStatementCache sqlCache,
                                                int metadata,
                                                long namedgraphid,
                                                long subj,
                                                long prop,
                                                long obj,
                                                long transactionId,
                                                long commandId,
                                                java.lang.String transactionTableName)
                                         throws RdbException
Runs the updateTransactionStatementAdd prepared statement. UPDATE ${a} SET TS_ID=?,CS_ID=? WHERE METADATA=? AND NAMEDGRAPHID=? AND SUBJ=? AND PROP=? AND OBJ=? AND TS_ID IS NULL and TE_ID IS NULL AND CS_ID IS NULL AND CE_ID IS NULL

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionId - template parameter
commandId - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUpdateTransactionStatementAdd

public static void prepareUpdateTransactionStatementAdd(java.sql.PreparedStatement ps,
                                                        int metadata,
                                                        long namedgraphid,
                                                        long subj,
                                                        long prop,
                                                        long obj,
                                                        long transactionId,
                                                        long commandId)
                                                 throws java.sql.SQLException
Sets the input parameters for the updateTransactionStatementAdd prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
metadata - template parameter
namedgraphid - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
transactionId - template parameter
commandId - template parameter
Throws:
java.sql.SQLException

selectAdditions

public static ClosableIterator<TransactionSQL.SelectAdditionsResult> selectAdditions(PreparedStatementCache sqlCache,
                                                                                     TransactionSQL.SelectAdditionsParams params,
                                                                                     java.lang.String containerName)
                                                                              throws RdbException
Runs the selectAdditions prepared statement. SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.ts_id =? AND ST.cs_id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - SelectAdditionsParams input Interface
containerName - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator containing the results of the SQL operation
Throws:
RdbException

selectAdditions

public static ClosableIterator<TransactionSQL.SelectAdditionsResult> selectAdditions(PreparedStatementCache sqlCache,
                                                                                     long transactionId,
                                                                                     long commandId2,
                                                                                     java.lang.String containerName)
                                                                              throws RdbException
Runs the selectAdditions prepared statement with the default transformer. SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.ts_id =? AND ST.cs_id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
commandId2 - template parameter
containerName - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

selectAdditions

public static ClosableIterator<TransactionSQL.SelectAdditionsResult> selectAdditions(PreparedStatementCache sqlCache,
                                                                                     long transactionId,
                                                                                     long commandId2,
                                                                                     java.lang.String containerName,
                                                                                     Transformer<TransactionSQL.SelectAdditionsResult> transform)
                                                                              throws RdbException
Runs the selectAdditions prepared statement. SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.ts_id =? AND ST.cs_id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
commandId2 - template parameter
containerName - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

prepareSelectAdditions

public static void prepareSelectAdditions(java.sql.PreparedStatement ps,
                                          long transactionId,
                                          long commandId2)
                                   throws java.sql.SQLException
Sets the input parameters for the selectAdditions prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
transactionId - template parameter
commandId2 - template parameter
Throws:
java.sql.SQLException

selectDeletions

public static ClosableIterator<TransactionSQL.SelectDeletionsResult> selectDeletions(PreparedStatementCache sqlCache,
                                                                                     TransactionSQL.SelectDeletionsParams params,
                                                                                     java.lang.String containerName)
                                                                              throws RdbException
Runs the selectDeletions prepared statement. SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.te_id =? AND ST.ce_id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - SelectDeletionsParams input Interface
containerName - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator containing the results of the SQL operation
Throws:
RdbException

selectDeletions

public static ClosableIterator<TransactionSQL.SelectDeletionsResult> selectDeletions(PreparedStatementCache sqlCache,
                                                                                     long transactionId,
                                                                                     long commandId,
                                                                                     java.lang.String containerName)
                                                                              throws RdbException
Runs the selectDeletions prepared statement with the default transformer. SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.te_id =? AND ST.ce_id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
commandId - template parameter
containerName - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

selectDeletions

public static ClosableIterator<TransactionSQL.SelectDeletionsResult> selectDeletions(PreparedStatementCache sqlCache,
                                                                                     long transactionId,
                                                                                     long commandId,
                                                                                     java.lang.String containerName,
                                                                                     Transformer<TransactionSQL.SelectDeletionsResult> transform)
                                                                              throws RdbException
Runs the selectDeletions prepared statement. SELECT ST.METADATA,ST.NAMEDGRAPHID,ST.subj,ST.prop,ST.obj FROM ${a}_ST ST where ST.te_id =? AND ST.ce_id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
commandId - template parameter
containerName - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

prepareSelectDeletions

public static void prepareSelectDeletions(java.sql.PreparedStatement ps,
                                          long transactionId,
                                          long commandId)
                                   throws java.sql.SQLException
Sets the input parameters for the selectDeletions prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
transactionId - template parameter
commandId - template parameter
Throws:
java.sql.SQLException

udpateChangeset

public static int udpateChangeset(PreparedStatementCache sqlCache,
                                  TransactionSQL.UdpateChangesetParams params,
                                  java.lang.String transactionTableName)
                           throws RdbException
Runs the udpateChangeset prepared statement. UPDATE ${a} SET ADDGRAPH=?,REMOVEGRAPH=? ,METAADDGRAPH=?,METAREMOVEGRAPH=? WHERE ID=?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UdpateChangesetParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

udpateChangeset

public static int udpateChangeset(PreparedStatementCache sqlCache,
                                  java.sql.Clob addGraph,
                                  java.sql.Clob removeGraph,
                                  java.sql.Clob addMetaGraph,
                                  java.sql.Clob removeMetaGraph,
                                  long id,
                                  java.lang.String transactionTableName)
                           throws RdbException
Runs the udpateChangeset prepared statement. UPDATE ${a} SET ADDGRAPH=?,REMOVEGRAPH=? ,METAADDGRAPH=?,METAREMOVEGRAPH=? WHERE ID=?

Parameters:
sqlCache - factory and cache of PreparedStatments
addGraph - template parameter
removeGraph - template parameter
addMetaGraph - template parameter
removeMetaGraph - template parameter
id - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUdpateChangeset

public static void prepareUdpateChangeset(java.sql.PreparedStatement ps,
                                          java.sql.Clob addGraph,
                                          java.sql.Clob removeGraph,
                                          java.sql.Clob addMetaGraph,
                                          java.sql.Clob removeMetaGraph,
                                          long id)
                                   throws java.sql.SQLException
Sets the input parameters for the udpateChangeset prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
addGraph - template parameter
removeGraph - template parameter
addMetaGraph - template parameter
removeMetaGraph - template parameter
id - template parameter
Throws:
java.sql.SQLException

insertChangeset

public static int insertChangeset(PreparedStatementCache sqlCache,
                                  TransactionSQL.InsertChangesetParams params,
                                  java.lang.String transactionTableName)
                           throws RdbException
Runs the insertChangeset prepared statement. INSERT INTO ${a} (commandId, addGraph,removeGraph,metaddgraph,metaremovegraph,namedGraphUri) VALUES (?, ?, ?, ?,?,?)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertChangesetParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

insertChangeset

public static int insertChangeset(PreparedStatementCache sqlCache,
                                  long commandId,
                                  java.sql.Clob addGraph,
                                  java.sql.Clob removeGraph,
                                  java.sql.Clob addMetaGraph,
                                  java.sql.Clob removeMetaGraph,
                                  java.lang.String uri,
                                  java.lang.String transactionTableName)
                           throws RdbException
Runs the insertChangeset prepared statement. INSERT INTO ${a} (commandId, addGraph,removeGraph,metaddgraph,metaremovegraph,namedGraphUri) VALUES (?, ?, ?, ?,?,?)

Parameters:
sqlCache - factory and cache of PreparedStatments
commandId - template parameter
addGraph - template parameter
removeGraph - template parameter
addMetaGraph - template parameter
removeMetaGraph - template parameter
uri - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareInsertChangeset

public static void prepareInsertChangeset(java.sql.PreparedStatement ps,
                                          long commandId,
                                          java.sql.Clob addGraph,
                                          java.sql.Clob removeGraph,
                                          java.sql.Clob addMetaGraph,
                                          java.sql.Clob removeMetaGraph,
                                          java.lang.String uri)
                                   throws java.sql.SQLException
Sets the input parameters for the insertChangeset prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
commandId - template parameter
addGraph - template parameter
removeGraph - template parameter
addMetaGraph - template parameter
removeMetaGraph - template parameter
uri - template parameter
Throws:
java.sql.SQLException

selectMaxChangesetId

public static java.lang.Long selectMaxChangesetId(PreparedStatementCache sqlCache,
                                                  java.lang.String transactionTableName)
                                           throws RdbException
Runs the selectMaxChangesetId prepared statement. SELECT MAX(id) FROM ${a}

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionTableName - template parameter
Returns:
Long
Throws:
RdbException

prepareSelectMaxChangesetId

public static void prepareSelectMaxChangesetId(java.sql.PreparedStatement ps)
                                        throws java.sql.SQLException
Sets the input parameters for the selectMaxChangesetId prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

deleteChangeset

public static int deleteChangeset(PreparedStatementCache sqlCache,
                                  TransactionSQL.DeleteChangesetParams params,
                                  java.lang.String transactionTableName)
                           throws RdbException
Runs the deleteChangeset prepared statement. DELETE FROM ${a} WHERE COMMANDID = ? AND ID = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - DeleteChangesetParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

deleteChangeset

public static int deleteChangeset(PreparedStatementCache sqlCache,
                                  long cmdId,
                                  long csId,
                                  java.lang.String transactionTableName)
                           throws RdbException
Runs the deleteChangeset prepared statement. DELETE FROM ${a} WHERE COMMANDID = ? AND ID = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
cmdId - template parameter
csId - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareDeleteChangeset

public static void prepareDeleteChangeset(java.sql.PreparedStatement ps,
                                          long cmdId,
                                          long csId)
                                   throws java.sql.SQLException
Sets the input parameters for the deleteChangeset prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
cmdId - template parameter
csId - template parameter
Throws:
java.sql.SQLException

selectChangeset

public static ClosableIterator<TransactionSQL.SelectChangesetResult> selectChangeset(PreparedStatementCache sqlCache,
                                                                                     long cmdId,
                                                                                     java.lang.String transactionTableName)
                                                                              throws RdbException
Runs the selectChangeset prepared statement with the default transformer. SELECT ID,ADDGRAPH,REMOVEGRAPH,METAADDGRAPH,METAREMOVEGRAPH,NAMEDGRAPHURI FROM ${a} WHERE COMMANDID = ? ORDER BY ID

Parameters:
sqlCache - factory and cache of PreparedStatments
cmdId - template parameter
transactionTableName - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

selectChangeset

public static ClosableIterator<TransactionSQL.SelectChangesetResult> selectChangeset(PreparedStatementCache sqlCache,
                                                                                     long cmdId,
                                                                                     java.lang.String transactionTableName,
                                                                                     Transformer<TransactionSQL.SelectChangesetResult> transform)
                                                                              throws RdbException
Runs the selectChangeset prepared statement. SELECT ID,ADDGRAPH,REMOVEGRAPH,METAADDGRAPH,METAREMOVEGRAPH,NAMEDGRAPHURI FROM ${a} WHERE COMMANDID = ? ORDER BY ID

Parameters:
sqlCache - factory and cache of PreparedStatments
cmdId - template parameter
transactionTableName - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

prepareSelectChangeset

public static void prepareSelectChangeset(java.sql.PreparedStatement ps,
                                          long cmdId)
                                   throws java.sql.SQLException
Sets the input parameters for the selectChangeset prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
cmdId - template parameter
Throws:
java.sql.SQLException

updateCommand

public static int updateCommand(PreparedStatementCache sqlCache,
                                TransactionSQL.UpdateCommandParams params,
                                java.lang.String transactionTableName)
                         throws RdbException
Runs the updateCommand prepared statement. UPDATE ${a} set transactionId=?,commandType=?,context=?,preReq=? where id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - UpdateCommandParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

updateCommand

public static int updateCommand(PreparedStatementCache sqlCache,
                                long transactionId,
                                java.lang.String commandType,
                                java.sql.Clob context,
                                java.sql.Clob preReq,
                                long id,
                                java.lang.String transactionTableName)
                         throws RdbException
Runs the updateCommand prepared statement. UPDATE ${a} set transactionId=?,commandType=?,context=?,preReq=? where id=?

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
commandType - template parameter
context - template parameter
preReq - template parameter
id - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareUpdateCommand

public static void prepareUpdateCommand(java.sql.PreparedStatement ps,
                                        long transactionId,
                                        java.lang.String commandType,
                                        java.sql.Clob context,
                                        java.sql.Clob preReq,
                                        long id)
                                 throws java.sql.SQLException
Sets the input parameters for the updateCommand prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
transactionId - template parameter
commandType - template parameter
context - template parameter
preReq - template parameter
id - template parameter
Throws:
java.sql.SQLException

insertCommand

public static int insertCommand(PreparedStatementCache sqlCache,
                                TransactionSQL.InsertCommandParams params,
                                java.lang.String transactionTableName)
                         throws RdbException
Runs the insertCommand prepared statement. INSERT INTO ${a} (transactionId, commandType,context,prereq) VALUES (?, ?, ?, ?)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertCommandParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

insertCommand

public static int insertCommand(PreparedStatementCache sqlCache,
                                long transactionId,
                                java.lang.String commandType,
                                java.sql.Clob context,
                                java.sql.Clob preReq,
                                java.lang.String transactionTableName)
                         throws RdbException
Runs the insertCommand prepared statement. INSERT INTO ${a} (transactionId, commandType,context,prereq) VALUES (?, ?, ?, ?)

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
commandType - template parameter
context - template parameter
preReq - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareInsertCommand

public static void prepareInsertCommand(java.sql.PreparedStatement ps,
                                        long transactionId,
                                        java.lang.String commandType,
                                        java.sql.Clob context,
                                        java.sql.Clob preReq)
                                 throws java.sql.SQLException
Sets the input parameters for the insertCommand prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
transactionId - template parameter
commandType - template parameter
context - template parameter
preReq - template parameter
Throws:
java.sql.SQLException

deleteCommand

public static int deleteCommand(PreparedStatementCache sqlCache,
                                TransactionSQL.DeleteCommandParams params,
                                java.lang.String transactionTableName)
                         throws RdbException
Runs the deleteCommand prepared statement. DELETE FROM ${a} WHERE TRANSACTIONID = ? AND ID = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - DeleteCommandParams input Interface
transactionTableName - template parameter
Returns:
int containing the results of the SQL operation
Throws:
RdbException

deleteCommand

public static int deleteCommand(PreparedStatementCache sqlCache,
                                long transactionId,
                                long cmdId,
                                java.lang.String transactionTableName)
                         throws RdbException
Runs the deleteCommand prepared statement. DELETE FROM ${a} WHERE TRANSACTIONID = ? AND ID = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
cmdId - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareDeleteCommand

public static void prepareDeleteCommand(java.sql.PreparedStatement ps,
                                        long transactionId,
                                        long cmdId)
                                 throws java.sql.SQLException
Sets the input parameters for the deleteCommand prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
transactionId - template parameter
cmdId - template parameter
Throws:
java.sql.SQLException

deleteTransaction

public static int deleteTransaction(PreparedStatementCache sqlCache,
                                    long transactionId,
                                    java.lang.String transactionTableName)
                             throws RdbException
Runs the deleteTransaction prepared statement. DELETE FROM ${a} WHERE ID = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareDeleteTransaction

public static void prepareDeleteTransaction(java.sql.PreparedStatement ps,
                                            long transactionId)
                                     throws java.sql.SQLException
Sets the input parameters for the deleteTransaction prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
transactionId - template parameter
Throws:
java.sql.SQLException

selectCommand

public static ClosableIterator<TransactionSQL.SelectCommandResult> selectCommand(PreparedStatementCache sqlCache,
                                                                                 long transactionId,
                                                                                 java.lang.String transactionTableName)
                                                                          throws RdbException
Runs the selectCommand prepared statement with the default transformer. SELECT ID,COMMANDTYPE,PREREQ,CONTEXT FROM ${a} WHERE TRANSACTIONID = ? ORDER BY ID

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
transactionTableName - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

selectCommand

public static ClosableIterator<TransactionSQL.SelectCommandResult> selectCommand(PreparedStatementCache sqlCache,
                                                                                 long transactionId,
                                                                                 java.lang.String transactionTableName,
                                                                                 Transformer<TransactionSQL.SelectCommandResult> transform)
                                                                          throws RdbException
Runs the selectCommand prepared statement. SELECT ID,COMMANDTYPE,PREREQ,CONTEXT FROM ${a} WHERE TRANSACTIONID = ? ORDER BY ID

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionId - template parameter
transactionTableName - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

prepareSelectCommand

public static void prepareSelectCommand(java.sql.PreparedStatement ps,
                                        long transactionId)
                                 throws java.sql.SQLException
Sets the input parameters for the selectCommand prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
transactionId - template parameter
Throws:
java.sql.SQLException

insertTransaction

public static int insertTransaction(PreparedStatementCache sqlCache,
                                    java.sql.Timestamp created,
                                    java.lang.String transactionTableName)
                             throws RdbException
Runs the insertTransaction prepared statement. INSERT INTO ${a} (CREATED) VALUES (?)

Parameters:
sqlCache - factory and cache of PreparedStatments
created - template parameter
transactionTableName - template parameter
Returns:
int
Throws:
RdbException

prepareInsertTransaction

public static void prepareInsertTransaction(java.sql.PreparedStatement ps,
                                            java.sql.Timestamp created)
                                     throws java.sql.SQLException
Sets the input parameters for the insertTransaction prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
created - template parameter
Throws:
java.sql.SQLException

maxId

public static java.lang.Long maxId(PreparedStatementCache sqlCache,
                                   java.lang.String transactionTableName)
                            throws RdbException
Runs the maxId prepared statement. SELECT MAX(ID) FROM ${a}

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionTableName - template parameter
Returns:
Long
Throws:
RdbException

prepareMaxId

public static void prepareMaxId(java.sql.PreparedStatement ps)
                         throws java.sql.SQLException
Sets the input parameters for the maxId prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

selectTransactions

public static ClosableIterator<java.lang.Long> selectTransactions(PreparedStatementCache sqlCache,
                                                                  java.lang.String transactionTableName)
                                                           throws RdbException
Runs the selectTransactions prepared statement with the default transformer. SELECT ID FROM ${a} ORDER BY ID

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionTableName - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

selectTransactions

public static ClosableIterator<java.lang.Long> selectTransactions(PreparedStatementCache sqlCache,
                                                                  java.lang.String transactionTableName,
                                                                  Transformer<java.lang.Long> transform)
                                                           throws RdbException
Runs the selectTransactions prepared statement. SELECT ID FROM ${a} ORDER BY ID

Parameters:
sqlCache - factory and cache of PreparedStatments
transactionTableName - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
RdbException

prepareSelectTransactions

public static void prepareSelectTransactions(java.sql.PreparedStatement ps)
                                      throws java.sql.SQLException
Sets the input parameters for the selectTransactions prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.