org.openanzo.server.repository.rdb.sql
Class StatementRdbWrapper

java.lang.Object
  extended by org.openanzo.server.repository.rdb.sql.StatementRdbWrapper

public class StatementRdbWrapper
extends java.lang.Object

StatementRdbWrapper 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 class StatementRdbWrapper.BatchDeleteStatement
          Batch operation for adding parameters to the DeleteStatement prepared statement
static class StatementRdbWrapper.BatchInsertStatement
          Batch operation for adding parameters to the InsertStatement prepared statement
static interface StatementRdbWrapper.DeleteStatementParams
          Interface for managing the parameters to the deleteStatement prepared statement.
static class StatementRdbWrapper.DeleteStatementParamsImpl
          Default implementation of DeleteStatementParams
static interface StatementRdbWrapper.GetTotalNumberOfStoredTriplesNoWithParams
          Interface for managing the parameters to the getTotalNumberOfStoredTriplesNoWith prepared statement.
static class StatementRdbWrapper.GetTotalNumberOfStoredTriplesNoWithParamsImpl
          Default implementation of GetTotalNumberOfStoredTriplesNoWithParams
static interface StatementRdbWrapper.InsertStatementParams
          Interface for managing the parameters to the insertStatement prepared statement.
static class StatementRdbWrapper.InsertStatementParamsImpl
          Default implementation of InsertStatementParams
static interface StatementRdbWrapper.SelectAllStatementsResult
          Interface for holding the results of the selectAllStatements prepared statement.
static class StatementRdbWrapper.SelectAllStatementsResultImpl
          Default implementation of SelectAllStatementsResult
static interface StatementRdbWrapper.SelectStatementIdParams
          Interface for managing the parameters to the selectStatementId prepared statement.
static class StatementRdbWrapper.SelectStatementIdParamsImpl
          Default implementation of SelectStatementIdParams
static interface StatementRdbWrapper.SelectStatementResult
          Interface for holding the results of the selectStatement prepared statement.
static class StatementRdbWrapper.SelectStatementResultImpl
          Default implementation of SelectStatementResult
static interface StatementRdbWrapper.SelectStatementsByTripleFromHistoryParams
          Interface for managing the parameters to the selectStatementsByTripleFromHistory prepared statement.
static class StatementRdbWrapper.SelectStatementsByTripleFromHistoryParamsImpl
          Default implementation of SelectStatementsByTripleFromHistoryParams
static interface StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult
          Interface for holding the results of the selectStatementsByTripleFromHistory prepared statement.
static class StatementRdbWrapper.SelectStatementsByTripleFromHistoryResultImpl
          Default implementation of SelectStatementsByTripleFromHistoryResult
static interface StatementRdbWrapper.SelectStatementsByTripleHistoryParams
          Interface for managing the parameters to the selectStatementsByTripleHistory prepared statement.
static class StatementRdbWrapper.SelectStatementsByTripleHistoryParamsImpl
          Default implementation of SelectStatementsByTripleHistoryParams
static interface StatementRdbWrapper.SelectStatementsByTripleHistoryResult
          Interface for holding the results of the selectStatementsByTripleHistory prepared statement.
static class StatementRdbWrapper.SelectStatementsByTripleHistoryResultImpl
          Default implementation of SelectStatementsByTripleHistoryResult
static interface StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryParams
          Interface for managing the parameters to the selectStatementsByTripleNoAuthHistory prepared statement.
static class StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryParamsImpl
          Default implementation of SelectStatementsByTripleNoAuthHistoryParams
static interface StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult
          Interface for holding the results of the selectStatementsByTripleNoAuthHistory prepared statement.
static class StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResultImpl
          Default implementation of SelectStatementsByTripleNoAuthHistoryResult
 
Field Summary
static java.lang.String deleteStatement
          Constant "deleteStatement" used to reference prepared statement Statement.deleteStatement UPDATE STATEMENTS SET HEND=? WHERE ID=?;
static java.lang.String getTotalNumberOfStoredTriples
          Constant "getTotalNumberOfStoredTriples" used to reference prepared statement Statement.getTotalNumberOfStoredTriples WITH LT (COMMITED) AS ( SELECT MAX(COMMITED) FROM TRANSACTIONTIMES ) SELECT COUNT(*) FROM STATEMENTS,LT WHERE STATEMENTS.HSTART <= LT.COMMITED AND (STATEMENTS.HEND IS NULL OR STATEMENTS.HEND > LT.COMMITED)
static java.lang.String getTotalNumberOfStoredTriplesNoWith
          Constant "getTotalNumberOfStoredTriplesNoWith" used to reference prepared statement Statement.getTotalNumberOfStoredTriplesNoWith SELECT COUNT(*) FROM STATEMENTS S WHERE S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ?) ;
static java.lang.String insertStatement
          Constant "insertStatement" used to reference prepared statement Statement.insertStatement INSERT INTO STATEMENTS( NAMEDGRAPHID, SUBJ, PROP, OBJ,HSTART) VALUES ( ?, ?, ?, ?, ?);
static java.lang.String selectAllStatements
          Constant "selectAllStatements" used to reference prepared statement Statement.selectAllStatements SELECT DISTINCT SUBJ, PROP, OBJ, HSTART, ID,NAMEDGRAPHID FROM ${a} WHERE HEND IS NULL;
static java.lang.String selectMaxId
          Constant "selectMaxId" used to reference prepared statement Statement.selectMaxId SELECT MAX(ID) FROM STATEMENTS;
static java.lang.String selectStatement
          Constant "selectStatement" used to reference prepared statement Statement.selectStatement SELECT DISTINCT NAMEDGRAPHID,SUBJ, PROP, OBJ, HSTART FROM STATEMENTS WHERE ID = ? AND HEND IS NULL;
static java.lang.String selectStatementId
          Constant "selectStatementId" used to reference prepared statement Statement.selectStatementId SELECT S.ID FROM STATEMENTS S WHERE S.NAMEDGRAPHID = ? AND SUBJ = ? AND PROP = ? AND OBJ = ? AND HEND IS NULL;
static java.lang.String selectStatementsByTripleFromHistory
          Constant "selectStatementsByTripleFromHistory" used to reference prepared statement Statement.selectStatementsByTripleFromHistory SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HEND IS NULL AND S.NAMEDGRAPHID = NG.ID AND NG.HEND IS NULL AND NG.ACLID = ACIS.ACLID AND ACIS.HEND IS NULL AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HEND IS NULL AND UR.USERID = ? ) AND ACIS.CANREAD = 1;
static java.lang.String selectStatementsByTripleHistory
          Constant "selectStatementsByTripleHistory" used to reference prepared statement Statement.selectStatementsByTripleHistory SELECT DISTINCT S.ID, S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ? ) AND S.NAMEDGRAPHID = NG.ID AND NG.HSTART <= ? AND (NG.HEND IS NULL OR NG.HEND > ?) AND NG.ACLID = ACIS.ACLID AND ACIS.HSTART <= ? AND (ACIS.HEND IS NULL OR ACIS.HEND >? ) AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HSTART <= ? AND (UR.HEND IS NULL OR UR.HEND > ?) AND UR.USERID = ? ) AND ACIS.CANREAD = 1;
static java.lang.String selectStatementsByTripleNoAuthHistory
          Constant "selectStatementsByTripleNoAuthHistory" used to reference prepared statement Statement.selectStatementsByTripleNoAuthHistory SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR S.SUBJ = ?) AND (0 = ? OR S.PROP = ?) AND (0 = ? OR S.OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND >? );
 
Constructor Summary
StatementRdbWrapper()
           
 
Method Summary
static void deleteStatement(PreparedStatementCache sqlCache, java.lang.Long hend, long id)
          Runs the deleteStatement prepared statement.
static void deleteStatement(PreparedStatementCache sqlCache, StatementRdbWrapper.DeleteStatementParams params)
          Runs the deleteStatement prepared statement.
static java.lang.Long getTotalNumberOfStoredTriples(PreparedStatementCache sqlCache)
          Runs the getTotalNumberOfStoredTriples prepared statement.
static java.lang.Long getTotalNumberOfStoredTriplesNoWith(PreparedStatementCache sqlCache, java.lang.Long now, java.lang.Long now2)
          Runs the getTotalNumberOfStoredTriplesNoWith prepared statement.
static java.lang.Long getTotalNumberOfStoredTriplesNoWith(PreparedStatementCache sqlCache, StatementRdbWrapper.GetTotalNumberOfStoredTriplesNoWithParams params)
          Runs the getTotalNumberOfStoredTriplesNoWith prepared statement.
static void insertStatement(PreparedStatementCache sqlCache, long namedGraphId, long subj, long prop, long obj, java.lang.Long hstart)
          Runs the insertStatement prepared statement.
static void insertStatement(PreparedStatementCache sqlCache, StatementRdbWrapper.InsertStatementParams params)
          Runs the insertStatement prepared statement.
static void prepareDeleteStatement(java.sql.PreparedStatement ps, java.lang.Long hend, long id)
          Sets the input parameters for the deleteStatement prepared statement.
static void prepareGetTotalNumberOfStoredTriples(java.sql.PreparedStatement ps)
          Sets the input parameters for the getTotalNumberOfStoredTriples prepared statement.
static void prepareGetTotalNumberOfStoredTriplesNoWith(java.sql.PreparedStatement ps, java.lang.Long now, java.lang.Long now2)
          Sets the input parameters for the getTotalNumberOfStoredTriplesNoWith prepared statement.
static void prepareInsertStatement(java.sql.PreparedStatement ps, long namedGraphId, long subj, long prop, long obj, java.lang.Long hstart)
          Sets the input parameters for the insertStatement prepared statement.
static void prepareSelectAllStatements(java.sql.PreparedStatement ps)
          Sets the input parameters for the selectAllStatements prepared statement.
static void prepareSelectMaxId(java.sql.PreparedStatement ps)
          Sets the input parameters for the selectMaxId prepared statement.
static void prepareSelectStatement(java.sql.PreparedStatement ps, long id)
          Sets the input parameters for the selectStatement prepared statement.
static void prepareSelectStatementId(java.sql.PreparedStatement ps, long namedGraph, long subj, long prop, long obj)
          Sets the input parameters for the selectStatementId prepared statement.
static void prepareSelectStatementsByTripleFromHistory(java.sql.PreparedStatement ps, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, long userId)
          Sets the input parameters for the selectStatementsByTripleFromHistory prepared statement.
static void prepareSelectStatementsByTripleHistory(java.sql.PreparedStatement ps, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, java.lang.Long lastTransactionTime1, java.lang.Long lastTransactionTime2, java.lang.Long lastTransactionTime3, java.lang.Long lastTransactionTime4, java.lang.Long lastTransactionTime5, java.lang.Long lastTransactionTime6, java.lang.Long lastTransactionTime7, java.lang.Long lastTransactionTime8, long userId)
          Sets the input parameters for the selectStatementsByTripleHistory prepared statement.
static void prepareSelectStatementsByTripleNoAuthHistory(java.sql.PreparedStatement ps, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, java.lang.Long lastTransactionTime1, java.lang.Long lastTransactionTime2)
          Sets the input parameters for the selectStatementsByTripleNoAuthHistory prepared statement.
static ClosableIterator<StatementRdbWrapper.SelectAllStatementsResult> selectAllStatements(PreparedStatementCache sqlCache, java.lang.String statementTable)
          Runs the selectAllStatements prepared statement with the default transformer.
static ClosableIterator<StatementRdbWrapper.SelectAllStatementsResult> selectAllStatements(PreparedStatementCache sqlCache, java.lang.String statementTable, Transformer<StatementRdbWrapper.SelectAllStatementsResult> transform)
          Runs the selectAllStatements prepared statement.
static java.lang.Long selectMaxId(PreparedStatementCache sqlCache)
          Runs the selectMaxId prepared statement.
static StatementRdbWrapper.SelectStatementResult selectStatement(PreparedStatementCache sqlCache, long id)
          Runs the selectStatement prepared statement.
static StatementRdbWrapper.SelectStatementResult selectStatement(PreparedStatementCache sqlCache, long id, StatementRdbWrapper.SelectStatementResult result)
          Runs the selectStatement prepared statement.
static java.lang.Long selectStatementId(PreparedStatementCache sqlCache, long namedGraph, long subj, long prop, long obj)
          Runs the selectStatementId prepared statement.
static java.lang.Long selectStatementId(PreparedStatementCache sqlCache, StatementRdbWrapper.SelectStatementIdParams params)
          Runs the selectStatementId prepared statement.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> selectStatementsByTripleFromHistory(PreparedStatementCache sqlCache, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, long userId, java.lang.String statementTable)
          Runs the selectStatementsByTripleFromHistory prepared statement with the default transformer.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> selectStatementsByTripleFromHistory(PreparedStatementCache sqlCache, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, long userId, java.lang.String statementTable, Transformer<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> transform)
          Runs the selectStatementsByTripleFromHistory prepared statement.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> selectStatementsByTripleFromHistory(PreparedStatementCache sqlCache, StatementRdbWrapper.SelectStatementsByTripleFromHistoryParams params, java.lang.String statementTable)
          Runs the selectStatementsByTripleFromHistory prepared statement.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> selectStatementsByTripleHistory(PreparedStatementCache sqlCache, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, java.lang.Long lastTransactionTime1, java.lang.Long lastTransactionTime2, java.lang.Long lastTransactionTime3, java.lang.Long lastTransactionTime4, java.lang.Long lastTransactionTime5, java.lang.Long lastTransactionTime6, java.lang.Long lastTransactionTime7, java.lang.Long lastTransactionTime8, long userId, java.lang.String statementTable)
          Runs the selectStatementsByTripleHistory prepared statement with the default transformer.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> selectStatementsByTripleHistory(PreparedStatementCache sqlCache, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, java.lang.Long lastTransactionTime1, java.lang.Long lastTransactionTime2, java.lang.Long lastTransactionTime3, java.lang.Long lastTransactionTime4, java.lang.Long lastTransactionTime5, java.lang.Long lastTransactionTime6, java.lang.Long lastTransactionTime7, java.lang.Long lastTransactionTime8, long userId, java.lang.String statementTable, Transformer<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> transform)
          Runs the selectStatementsByTripleHistory prepared statement.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> selectStatementsByTripleHistory(PreparedStatementCache sqlCache, StatementRdbWrapper.SelectStatementsByTripleHistoryParams params, java.lang.String statementTable)
          Runs the selectStatementsByTripleHistory prepared statement.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> selectStatementsByTripleNoAuthHistory(PreparedStatementCache sqlCache, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, java.lang.Long lastTransactionTime1, java.lang.Long lastTransactionTime2, java.lang.String statementTable)
          Runs the selectStatementsByTripleNoAuthHistory prepared statement with the default transformer.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> selectStatementsByTripleNoAuthHistory(PreparedStatementCache sqlCache, int namedGraphNull, long namedGraph, int subjNull, long subj, int propNull, long prop, int objNull, long obj, java.lang.Long lastTransactionTime1, java.lang.Long lastTransactionTime2, java.lang.String statementTable, Transformer<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> transform)
          Runs the selectStatementsByTripleNoAuthHistory prepared statement.
static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> selectStatementsByTripleNoAuthHistory(PreparedStatementCache sqlCache, StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryParams params, java.lang.String statementTable)
          Runs the selectStatementsByTripleNoAuthHistory prepared statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectMaxId

public static final java.lang.String selectMaxId
Constant "selectMaxId" used to reference prepared statement Statement.selectMaxId SELECT MAX(ID) FROM STATEMENTS;

See Also:
Constant Field Values

selectStatementId

public static final java.lang.String selectStatementId
Constant "selectStatementId" used to reference prepared statement Statement.selectStatementId SELECT S.ID FROM STATEMENTS S WHERE S.NAMEDGRAPHID = ? AND SUBJ = ? AND PROP = ? AND OBJ = ? AND HEND IS NULL;

See Also:
Constant Field Values

selectStatementsByTripleFromHistory

public static final java.lang.String selectStatementsByTripleFromHistory
Constant "selectStatementsByTripleFromHistory" used to reference prepared statement Statement.selectStatementsByTripleFromHistory SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HEND IS NULL AND S.NAMEDGRAPHID = NG.ID AND NG.HEND IS NULL AND NG.ACLID = ACIS.ACLID AND ACIS.HEND IS NULL AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HEND IS NULL AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

See Also:
Constant Field Values

selectStatementsByTripleHistory

public static final java.lang.String selectStatementsByTripleHistory
Constant "selectStatementsByTripleHistory" used to reference prepared statement Statement.selectStatementsByTripleHistory SELECT DISTINCT S.ID, S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ? ) AND S.NAMEDGRAPHID = NG.ID AND NG.HSTART <= ? AND (NG.HEND IS NULL OR NG.HEND > ?) AND NG.ACLID = ACIS.ACLID AND ACIS.HSTART <= ? AND (ACIS.HEND IS NULL OR ACIS.HEND >? ) AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HSTART <= ? AND (UR.HEND IS NULL OR UR.HEND > ?) AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

See Also:
Constant Field Values

selectStatementsByTripleNoAuthHistory

public static final java.lang.String selectStatementsByTripleNoAuthHistory
Constant "selectStatementsByTripleNoAuthHistory" used to reference prepared statement Statement.selectStatementsByTripleNoAuthHistory SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR S.SUBJ = ?) AND (0 = ? OR S.PROP = ?) AND (0 = ? OR S.OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND >? );

See Also:
Constant Field Values

selectStatement

public static final java.lang.String selectStatement
Constant "selectStatement" used to reference prepared statement Statement.selectStatement SELECT DISTINCT NAMEDGRAPHID,SUBJ, PROP, OBJ, HSTART FROM STATEMENTS WHERE ID = ? AND HEND IS NULL;

See Also:
Constant Field Values

selectAllStatements

public static final java.lang.String selectAllStatements
Constant "selectAllStatements" used to reference prepared statement Statement.selectAllStatements SELECT DISTINCT SUBJ, PROP, OBJ, HSTART, ID,NAMEDGRAPHID FROM ${a} WHERE HEND IS NULL;

See Also:
Constant Field Values

insertStatement

public static final java.lang.String insertStatement
Constant "insertStatement" used to reference prepared statement Statement.insertStatement INSERT INTO STATEMENTS( NAMEDGRAPHID, SUBJ, PROP, OBJ,HSTART) VALUES ( ?, ?, ?, ?, ?);

See Also:
Constant Field Values

deleteStatement

public static final java.lang.String deleteStatement
Constant "deleteStatement" used to reference prepared statement Statement.deleteStatement UPDATE STATEMENTS SET HEND=? WHERE ID=?;

See Also:
Constant Field Values

getTotalNumberOfStoredTriples

public static final java.lang.String getTotalNumberOfStoredTriples
Constant "getTotalNumberOfStoredTriples" used to reference prepared statement Statement.getTotalNumberOfStoredTriples WITH LT (COMMITED) AS ( SELECT MAX(COMMITED) FROM TRANSACTIONTIMES ) SELECT COUNT(*) FROM STATEMENTS,LT WHERE STATEMENTS.HSTART <= LT.COMMITED AND (STATEMENTS.HEND IS NULL OR STATEMENTS.HEND > LT.COMMITED)

See Also:
Constant Field Values

getTotalNumberOfStoredTriplesNoWith

public static final java.lang.String getTotalNumberOfStoredTriplesNoWith
Constant "getTotalNumberOfStoredTriplesNoWith" used to reference prepared statement Statement.getTotalNumberOfStoredTriplesNoWith SELECT COUNT(*) FROM STATEMENTS S WHERE S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ?) ;

See Also:
Constant Field Values
Constructor Detail

StatementRdbWrapper

public StatementRdbWrapper()
Method Detail

selectMaxId

public static java.lang.Long selectMaxId(PreparedStatementCache sqlCache)
                                  throws AnzoException,
                                         java.sql.SQLException
Runs the selectMaxId prepared statement. SELECT MAX(ID) FROM STATEMENTS;

Parameters:
sqlCache - factory and cache of PreparedStatments
Returns:
Long
Throws:
AnzoException
java.sql.SQLException

prepareSelectMaxId

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

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

selectStatementId

public static java.lang.Long selectStatementId(PreparedStatementCache sqlCache,
                                               StatementRdbWrapper.SelectStatementIdParams params)
                                        throws AnzoException,
                                               java.sql.SQLException
Runs the selectStatementId prepared statement. SELECT S.ID FROM STATEMENTS S WHERE S.NAMEDGRAPHID = ? AND SUBJ = ? AND PROP = ? AND OBJ = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - SelectStatementIdParams input Interface
Returns:
Long containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

selectStatementId

public static java.lang.Long selectStatementId(PreparedStatementCache sqlCache,
                                               long namedGraph,
                                               long subj,
                                               long prop,
                                               long obj)
                                        throws AnzoException,
                                               java.sql.SQLException
Runs the selectStatementId prepared statement. SELECT S.ID FROM STATEMENTS S WHERE S.NAMEDGRAPHID = ? AND SUBJ = ? AND PROP = ? AND OBJ = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraph - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
Returns:
Long
Throws:
AnzoException
java.sql.SQLException

prepareSelectStatementId

public static void prepareSelectStatementId(java.sql.PreparedStatement ps,
                                            long namedGraph,
                                            long subj,
                                            long prop,
                                            long obj)
                                     throws java.sql.SQLException
Sets the input parameters for the selectStatementId prepared statement.

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

selectStatementsByTripleFromHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> selectStatementsByTripleFromHistory(PreparedStatementCache sqlCache,
                                                                                                                                  StatementRdbWrapper.SelectStatementsByTripleFromHistoryParams params,
                                                                                                                                  java.lang.String statementTable)
                                                                                                                           throws AnzoException,
                                                                                                                                  java.sql.SQLException
Runs the selectStatementsByTripleFromHistory prepared statement. SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HEND IS NULL AND S.NAMEDGRAPHID = NG.ID AND NG.HEND IS NULL AND NG.ACLID = ACIS.ACLID AND ACIS.HEND IS NULL AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HEND IS NULL AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - SelectStatementsByTripleFromHistoryParams input Interface
statementTable - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

selectStatementsByTripleFromHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> selectStatementsByTripleFromHistory(PreparedStatementCache sqlCache,
                                                                                                                                  int namedGraphNull,
                                                                                                                                  long namedGraph,
                                                                                                                                  int subjNull,
                                                                                                                                  long subj,
                                                                                                                                  int propNull,
                                                                                                                                  long prop,
                                                                                                                                  int objNull,
                                                                                                                                  long obj,
                                                                                                                                  long userId,
                                                                                                                                  java.lang.String statementTable)
                                                                                                                           throws AnzoException,
                                                                                                                                  java.sql.SQLException
Runs the selectStatementsByTripleFromHistory prepared statement with the default transformer. SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HEND IS NULL AND S.NAMEDGRAPHID = NG.ID AND NG.HEND IS NULL AND NG.ACLID = ACIS.ACLID AND ACIS.HEND IS NULL AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HEND IS NULL AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
userId - template parameter
statementTable - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

selectStatementsByTripleFromHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> selectStatementsByTripleFromHistory(PreparedStatementCache sqlCache,
                                                                                                                                  int namedGraphNull,
                                                                                                                                  long namedGraph,
                                                                                                                                  int subjNull,
                                                                                                                                  long subj,
                                                                                                                                  int propNull,
                                                                                                                                  long prop,
                                                                                                                                  int objNull,
                                                                                                                                  long obj,
                                                                                                                                  long userId,
                                                                                                                                  java.lang.String statementTable,
                                                                                                                                  Transformer<StatementRdbWrapper.SelectStatementsByTripleFromHistoryResult> transform)
                                                                                                                           throws AnzoException,
                                                                                                                                  java.sql.SQLException
Runs the selectStatementsByTripleFromHistory prepared statement. SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HEND IS NULL AND S.NAMEDGRAPHID = NG.ID AND NG.HEND IS NULL AND NG.ACLID = ACIS.ACLID AND ACIS.HEND IS NULL AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HEND IS NULL AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
userId - template parameter
statementTable - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

prepareSelectStatementsByTripleFromHistory

public static void prepareSelectStatementsByTripleFromHistory(java.sql.PreparedStatement ps,
                                                              int namedGraphNull,
                                                              long namedGraph,
                                                              int subjNull,
                                                              long subj,
                                                              int propNull,
                                                              long prop,
                                                              int objNull,
                                                              long obj,
                                                              long userId)
                                                       throws java.sql.SQLException
Sets the input parameters for the selectStatementsByTripleFromHistory prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
userId - template parameter
Throws:
java.sql.SQLException

selectStatementsByTripleHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> selectStatementsByTripleHistory(PreparedStatementCache sqlCache,
                                                                                                                          StatementRdbWrapper.SelectStatementsByTripleHistoryParams params,
                                                                                                                          java.lang.String statementTable)
                                                                                                                   throws AnzoException,
                                                                                                                          java.sql.SQLException
Runs the selectStatementsByTripleHistory prepared statement. SELECT DISTINCT S.ID, S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ? ) AND S.NAMEDGRAPHID = NG.ID AND NG.HSTART <= ? AND (NG.HEND IS NULL OR NG.HEND > ?) AND NG.ACLID = ACIS.ACLID AND ACIS.HSTART <= ? AND (ACIS.HEND IS NULL OR ACIS.HEND >? ) AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HSTART <= ? AND (UR.HEND IS NULL OR UR.HEND > ?) AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - SelectStatementsByTripleHistoryParams input Interface
statementTable - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

selectStatementsByTripleHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> selectStatementsByTripleHistory(PreparedStatementCache sqlCache,
                                                                                                                          int namedGraphNull,
                                                                                                                          long namedGraph,
                                                                                                                          int subjNull,
                                                                                                                          long subj,
                                                                                                                          int propNull,
                                                                                                                          long prop,
                                                                                                                          int objNull,
                                                                                                                          long obj,
                                                                                                                          java.lang.Long lastTransactionTime1,
                                                                                                                          java.lang.Long lastTransactionTime2,
                                                                                                                          java.lang.Long lastTransactionTime3,
                                                                                                                          java.lang.Long lastTransactionTime4,
                                                                                                                          java.lang.Long lastTransactionTime5,
                                                                                                                          java.lang.Long lastTransactionTime6,
                                                                                                                          java.lang.Long lastTransactionTime7,
                                                                                                                          java.lang.Long lastTransactionTime8,
                                                                                                                          long userId,
                                                                                                                          java.lang.String statementTable)
                                                                                                                   throws AnzoException,
                                                                                                                          java.sql.SQLException
Runs the selectStatementsByTripleHistory prepared statement with the default transformer. SELECT DISTINCT S.ID, S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ? ) AND S.NAMEDGRAPHID = NG.ID AND NG.HSTART <= ? AND (NG.HEND IS NULL OR NG.HEND > ?) AND NG.ACLID = ACIS.ACLID AND ACIS.HSTART <= ? AND (ACIS.HEND IS NULL OR ACIS.HEND >? ) AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HSTART <= ? AND (UR.HEND IS NULL OR UR.HEND > ?) AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
lastTransactionTime1 - template parameter
lastTransactionTime2 - template parameter
lastTransactionTime3 - template parameter
lastTransactionTime4 - template parameter
lastTransactionTime5 - template parameter
lastTransactionTime6 - template parameter
lastTransactionTime7 - template parameter
lastTransactionTime8 - template parameter
userId - template parameter
statementTable - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

selectStatementsByTripleHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> selectStatementsByTripleHistory(PreparedStatementCache sqlCache,
                                                                                                                          int namedGraphNull,
                                                                                                                          long namedGraph,
                                                                                                                          int subjNull,
                                                                                                                          long subj,
                                                                                                                          int propNull,
                                                                                                                          long prop,
                                                                                                                          int objNull,
                                                                                                                          long obj,
                                                                                                                          java.lang.Long lastTransactionTime1,
                                                                                                                          java.lang.Long lastTransactionTime2,
                                                                                                                          java.lang.Long lastTransactionTime3,
                                                                                                                          java.lang.Long lastTransactionTime4,
                                                                                                                          java.lang.Long lastTransactionTime5,
                                                                                                                          java.lang.Long lastTransactionTime6,
                                                                                                                          java.lang.Long lastTransactionTime7,
                                                                                                                          java.lang.Long lastTransactionTime8,
                                                                                                                          long userId,
                                                                                                                          java.lang.String statementTable,
                                                                                                                          Transformer<StatementRdbWrapper.SelectStatementsByTripleHistoryResult> transform)
                                                                                                                   throws AnzoException,
                                                                                                                          java.sql.SQLException
Runs the selectStatementsByTripleHistory prepared statement. SELECT DISTINCT S.ID, S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S, ACIS ACIS, NAMEDGRAPHS NG WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR SUBJ = ?) AND (0 = ? OR PROP = ?) AND (0 = ? OR OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ? ) AND S.NAMEDGRAPHID = NG.ID AND NG.HSTART <= ? AND (NG.HEND IS NULL OR NG.HEND > ?) AND NG.ACLID = ACIS.ACLID AND ACIS.HSTART <= ? AND (ACIS.HEND IS NULL OR ACIS.HEND >? ) AND ACIS.ROLEID IN(SELECT UR.ROLEID FROM USERSROLES UR WHERE UR.HSTART <= ? AND (UR.HEND IS NULL OR UR.HEND > ?) AND UR.USERID = ? ) AND ACIS.CANREAD = 1;

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
lastTransactionTime1 - template parameter
lastTransactionTime2 - template parameter
lastTransactionTime3 - template parameter
lastTransactionTime4 - template parameter
lastTransactionTime5 - template parameter
lastTransactionTime6 - template parameter
lastTransactionTime7 - template parameter
lastTransactionTime8 - template parameter
userId - template parameter
statementTable - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

prepareSelectStatementsByTripleHistory

public static void prepareSelectStatementsByTripleHistory(java.sql.PreparedStatement ps,
                                                          int namedGraphNull,
                                                          long namedGraph,
                                                          int subjNull,
                                                          long subj,
                                                          int propNull,
                                                          long prop,
                                                          int objNull,
                                                          long obj,
                                                          java.lang.Long lastTransactionTime1,
                                                          java.lang.Long lastTransactionTime2,
                                                          java.lang.Long lastTransactionTime3,
                                                          java.lang.Long lastTransactionTime4,
                                                          java.lang.Long lastTransactionTime5,
                                                          java.lang.Long lastTransactionTime6,
                                                          java.lang.Long lastTransactionTime7,
                                                          java.lang.Long lastTransactionTime8,
                                                          long userId)
                                                   throws java.sql.SQLException
Sets the input parameters for the selectStatementsByTripleHistory prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
lastTransactionTime1 - template parameter
lastTransactionTime2 - template parameter
lastTransactionTime3 - template parameter
lastTransactionTime4 - template parameter
lastTransactionTime5 - template parameter
lastTransactionTime6 - template parameter
lastTransactionTime7 - template parameter
lastTransactionTime8 - template parameter
userId - template parameter
Throws:
java.sql.SQLException

selectStatementsByTripleNoAuthHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> selectStatementsByTripleNoAuthHistory(PreparedStatementCache sqlCache,
                                                                                                                                      StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryParams params,
                                                                                                                                      java.lang.String statementTable)
                                                                                                                               throws AnzoException,
                                                                                                                                      java.sql.SQLException
Runs the selectStatementsByTripleNoAuthHistory prepared statement. SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR S.SUBJ = ?) AND (0 = ? OR S.PROP = ?) AND (0 = ? OR S.OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND >? );

Parameters:
sqlCache - factory and cache of PreparedStatments
params - SelectStatementsByTripleNoAuthHistoryParams input Interface
statementTable - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

selectStatementsByTripleNoAuthHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> selectStatementsByTripleNoAuthHistory(PreparedStatementCache sqlCache,
                                                                                                                                      int namedGraphNull,
                                                                                                                                      long namedGraph,
                                                                                                                                      int subjNull,
                                                                                                                                      long subj,
                                                                                                                                      int propNull,
                                                                                                                                      long prop,
                                                                                                                                      int objNull,
                                                                                                                                      long obj,
                                                                                                                                      java.lang.Long lastTransactionTime1,
                                                                                                                                      java.lang.Long lastTransactionTime2,
                                                                                                                                      java.lang.String statementTable)
                                                                                                                               throws AnzoException,
                                                                                                                                      java.sql.SQLException
Runs the selectStatementsByTripleNoAuthHistory prepared statement with the default transformer. SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR S.SUBJ = ?) AND (0 = ? OR S.PROP = ?) AND (0 = ? OR S.OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND >? );

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
lastTransactionTime1 - template parameter
lastTransactionTime2 - template parameter
statementTable - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

selectStatementsByTripleNoAuthHistory

public static ClosableIterator<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> selectStatementsByTripleNoAuthHistory(PreparedStatementCache sqlCache,
                                                                                                                                      int namedGraphNull,
                                                                                                                                      long namedGraph,
                                                                                                                                      int subjNull,
                                                                                                                                      long subj,
                                                                                                                                      int propNull,
                                                                                                                                      long prop,
                                                                                                                                      int objNull,
                                                                                                                                      long obj,
                                                                                                                                      java.lang.Long lastTransactionTime1,
                                                                                                                                      java.lang.Long lastTransactionTime2,
                                                                                                                                      java.lang.String statementTable,
                                                                                                                                      Transformer<StatementRdbWrapper.SelectStatementsByTripleNoAuthHistoryResult> transform)
                                                                                                                               throws AnzoException,
                                                                                                                                      java.sql.SQLException
Runs the selectStatementsByTripleNoAuthHistory prepared statement. SELECT DISTINCT S.NAMEDGRAPHID,S.SUBJ, S.PROP, S.OBJ FROM ${a} S WHERE (0 = ? OR S.NAMEDGRAPHID = ?) AND (0 = ? OR S.SUBJ = ?) AND (0 = ? OR S.PROP = ?) AND (0 = ? OR S.OBJ = ?) AND S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND >? );

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
lastTransactionTime1 - template parameter
lastTransactionTime2 - template parameter
statementTable - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

prepareSelectStatementsByTripleNoAuthHistory

public static void prepareSelectStatementsByTripleNoAuthHistory(java.sql.PreparedStatement ps,
                                                                int namedGraphNull,
                                                                long namedGraph,
                                                                int subjNull,
                                                                long subj,
                                                                int propNull,
                                                                long prop,
                                                                int objNull,
                                                                long obj,
                                                                java.lang.Long lastTransactionTime1,
                                                                java.lang.Long lastTransactionTime2)
                                                         throws java.sql.SQLException
Sets the input parameters for the selectStatementsByTripleNoAuthHistory prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
namedGraphNull - template parameter
namedGraph - template parameter
subjNull - template parameter
subj - template parameter
propNull - template parameter
prop - template parameter
objNull - template parameter
obj - template parameter
lastTransactionTime1 - template parameter
lastTransactionTime2 - template parameter
Throws:
java.sql.SQLException

selectStatement

public static StatementRdbWrapper.SelectStatementResult selectStatement(PreparedStatementCache sqlCache,
                                                                        long id)
                                                                 throws AnzoException,
                                                                        java.sql.SQLException
Runs the selectStatement prepared statement. SELECT DISTINCT NAMEDGRAPHID,SUBJ, PROP, OBJ, HSTART FROM STATEMENTS WHERE ID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
Returns:
SelectStatementResult containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

selectStatement

public static StatementRdbWrapper.SelectStatementResult selectStatement(PreparedStatementCache sqlCache,
                                                                        long id,
                                                                        StatementRdbWrapper.SelectStatementResult result)
                                                                 throws AnzoException,
                                                                        java.sql.SQLException
Runs the selectStatement prepared statement. SELECT DISTINCT NAMEDGRAPHID,SUBJ, PROP, OBJ, HSTART FROM STATEMENTS WHERE ID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
result - SelectStatementResult result object
Returns:
SelectStatementResult
Throws:
AnzoException
java.sql.SQLException

prepareSelectStatement

public static void prepareSelectStatement(java.sql.PreparedStatement ps,
                                          long id)
                                   throws java.sql.SQLException
Sets the input parameters for the selectStatement prepared statement.

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

selectAllStatements

public static ClosableIterator<StatementRdbWrapper.SelectAllStatementsResult> selectAllStatements(PreparedStatementCache sqlCache,
                                                                                                  java.lang.String statementTable)
                                                                                           throws AnzoException,
                                                                                                  java.sql.SQLException
Runs the selectAllStatements prepared statement with the default transformer. SELECT DISTINCT SUBJ, PROP, OBJ, HSTART, ID,NAMEDGRAPHID FROM ${a} WHERE HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
statementTable - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

selectAllStatements

public static ClosableIterator<StatementRdbWrapper.SelectAllStatementsResult> selectAllStatements(PreparedStatementCache sqlCache,
                                                                                                  java.lang.String statementTable,
                                                                                                  Transformer<StatementRdbWrapper.SelectAllStatementsResult> transform)
                                                                                           throws AnzoException,
                                                                                                  java.sql.SQLException
Runs the selectAllStatements prepared statement. SELECT DISTINCT SUBJ, PROP, OBJ, HSTART, ID,NAMEDGRAPHID FROM ${a} WHERE HEND IS NULL;

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

prepareSelectAllStatements

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

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

insertStatement

public static void insertStatement(PreparedStatementCache sqlCache,
                                   StatementRdbWrapper.InsertStatementParams params)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the insertStatement prepared statement. INSERT INTO STATEMENTS( NAMEDGRAPHID, SUBJ, PROP, OBJ,HSTART) VALUES ( ?, ?, ?, ?, ?);

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertStatementParams input Interface
Throws:
AnzoException
java.sql.SQLException

insertStatement

public static void insertStatement(PreparedStatementCache sqlCache,
                                   long namedGraphId,
                                   long subj,
                                   long prop,
                                   long obj,
                                   java.lang.Long hstart)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the insertStatement prepared statement. INSERT INTO STATEMENTS( NAMEDGRAPHID, SUBJ, PROP, OBJ,HSTART) VALUES ( ?, ?, ?, ?, ?);

Parameters:
sqlCache - factory and cache of PreparedStatments
namedGraphId - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
hstart - template parameter
Throws:
AnzoException
java.sql.SQLException

prepareInsertStatement

public static void prepareInsertStatement(java.sql.PreparedStatement ps,
                                          long namedGraphId,
                                          long subj,
                                          long prop,
                                          long obj,
                                          java.lang.Long hstart)
                                   throws java.sql.SQLException
Sets the input parameters for the insertStatement prepared statement.

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

deleteStatement

public static void deleteStatement(PreparedStatementCache sqlCache,
                                   StatementRdbWrapper.DeleteStatementParams params)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the deleteStatement prepared statement. UPDATE STATEMENTS SET HEND=? WHERE ID=?;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - DeleteStatementParams input Interface
Throws:
AnzoException
java.sql.SQLException

deleteStatement

public static void deleteStatement(PreparedStatementCache sqlCache,
                                   java.lang.Long hend,
                                   long id)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the deleteStatement prepared statement. UPDATE STATEMENTS SET HEND=? WHERE ID=?;

Parameters:
sqlCache - factory and cache of PreparedStatments
hend - template parameter
id - template parameter
Throws:
AnzoException
java.sql.SQLException

prepareDeleteStatement

public static void prepareDeleteStatement(java.sql.PreparedStatement ps,
                                          java.lang.Long hend,
                                          long id)
                                   throws java.sql.SQLException
Sets the input parameters for the deleteStatement prepared statement.

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

getTotalNumberOfStoredTriples

public static java.lang.Long getTotalNumberOfStoredTriples(PreparedStatementCache sqlCache)
                                                    throws AnzoException,
                                                           java.sql.SQLException
Runs the getTotalNumberOfStoredTriples prepared statement. WITH LT (COMMITED) AS ( SELECT MAX(COMMITED) FROM TRANSACTIONTIMES ) SELECT COUNT(*) FROM STATEMENTS,LT WHERE STATEMENTS.HSTART <= LT.COMMITED AND (STATEMENTS.HEND IS NULL OR STATEMENTS.HEND > LT.COMMITED)

Parameters:
sqlCache - factory and cache of PreparedStatments
Returns:
Long
Throws:
AnzoException
java.sql.SQLException

prepareGetTotalNumberOfStoredTriples

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

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

getTotalNumberOfStoredTriplesNoWith

public static java.lang.Long getTotalNumberOfStoredTriplesNoWith(PreparedStatementCache sqlCache,
                                                                 StatementRdbWrapper.GetTotalNumberOfStoredTriplesNoWithParams params)
                                                          throws AnzoException,
                                                                 java.sql.SQLException
Runs the getTotalNumberOfStoredTriplesNoWith prepared statement. SELECT COUNT(*) FROM STATEMENTS S WHERE S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ?) ;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - GetTotalNumberOfStoredTriplesNoWithParams input Interface
Returns:
Long containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

getTotalNumberOfStoredTriplesNoWith

public static java.lang.Long getTotalNumberOfStoredTriplesNoWith(PreparedStatementCache sqlCache,
                                                                 java.lang.Long now,
                                                                 java.lang.Long now2)
                                                          throws AnzoException,
                                                                 java.sql.SQLException
Runs the getTotalNumberOfStoredTriplesNoWith prepared statement. SELECT COUNT(*) FROM STATEMENTS S WHERE S.HSTART <= ? AND (S.HEND IS NULL OR S.HEND > ?) ;

Parameters:
sqlCache - factory and cache of PreparedStatments
now - template parameter
now2 - template parameter
Returns:
Long
Throws:
AnzoException
java.sql.SQLException

prepareGetTotalNumberOfStoredTriplesNoWith

public static void prepareGetTotalNumberOfStoredTriplesNoWith(java.sql.PreparedStatement ps,
                                                              java.lang.Long now,
                                                              java.lang.Long now2)
                                                       throws java.sql.SQLException
Sets the input parameters for the getTotalNumberOfStoredTriplesNoWith prepared statement.

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


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