org.openanzo.common.rdb.sql
Class GraphSQL

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

public class GraphSQL
extends java.lang.Object

GraphSQL 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 GraphSQL.BatchClear
          Batch operation for adding parameters to the Clear prepared statement
static class GraphSQL.BatchDeleteStatement
          Batch operation for adding parameters to the DeleteStatement prepared statement
static class GraphSQL.BatchInsertStatement
          Batch operation for adding parameters to the InsertStatement prepared statement
static interface GraphSQL.DeleteStatementParams
          Interface for managing the parameters to the deleteStatement prepared statement.
static class GraphSQL.DeleteStatementParamsImpl
          Default implementation of DeleteStatementParams
static interface GraphSQL.InsertStatementParams
          Interface for managing the parameters to the insertStatement prepared statement.
static class GraphSQL.InsertStatementParamsImpl
          Default implementation of InsertStatementParams
static interface GraphSQL.ResolveStatementsResult
          Interface for holding the results of the resolveStatements prepared statement.
static class GraphSQL.ResolveStatementsResultImpl
          Default implementation of ResolveStatementsResult
static interface GraphSQL.StatementExistsParams
          Interface for managing the parameters to the statementExists prepared statement.
static class GraphSQL.StatementExistsParamsImpl
          Default implementation of StatementExistsParams
 
Field Summary
static java.lang.String clear
          Constant "clear" used to reference prepared statement graph.clear DELETE FROM ${a} WHERE NAMEDGRAPHID=?
static java.lang.String commitInsertStatements
          Constant "commitInsertStatements" used to reference prepared statement graph.commitInsertStatements INSERT INTO ${b} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ) SELECT ST.METADATA, ST.NAMEDGRAPHID, ST.SUBJ, ST.PROP, ST.OBJ FROM ${a} ST
static java.lang.String commitInsertStatementsNew
          Constant "commitInsertStatementsNew" used to reference prepared statement graph.commitInsertStatementsNew MERGE INTO ${b} USING ${a} ON ${b}.NAMEDGRAPHID = ${a}.NAMEDGRAPHID AND ${b}.SUBJ = ${a}.SUBJ AND ${b}.PROP = ${a}.PROP AND ${b}.OBJ = ${a}.OBJ WHEN NOT MATCHED THEN INSERT (NAMEDGRAPHID,SUBJ,PROP,OBJ) VALUES(${a}.NAMEDGRAPHID,${a}.SUBJ,${a}.PROP,${a}.OBJ) ELSE IGNORE
static java.lang.String deleteStatement
          Constant "deleteStatement" used to reference prepared statement graph.deleteStatement DELETE FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?
static java.lang.String insertStatement
          Constant "insertStatement" used to reference prepared statement graph.insertStatement INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ, PROP, OBJ) VALUES(?,?, ?, ?, ?)
static java.lang.String purge
          Constant "purge" used to reference prepared statement graph.purge DELETE FROM ${a}
static java.lang.String purgeInsertStatements
          Constant "purgeInsertStatements" used to reference prepared statement graph.purgeInsertStatements DELETE FROM ${a} ST WHERE EXISTS (SELECT S.NAMEDGRAPHID FROM ${c} S WHERE ST.METADATA=S.METADATA AND S.NAMEDGRAPHID=ST.NAMEDGRAPHID AND S.SUBJ=ST.SUBJ AND S.PROP=ST.PROP AND S.OBJ=ST.OBJ)
static java.lang.String resolveStatements
          Constant "resolveStatements" used to reference prepared statement graph.resolveStatements SELECT A.METADATA,A.NAMEDGRAPHID,A.SUBJ, A.PROP, A.OBJ FROM ${a} AS A WHERE EXISTS(SELECT B.NAMEDGRAPHID FROM ${b} AS B WHERE A.METADATA=B.METADATA AND A.NAMEDGRAPHID=B.NAMEDGRAPHID AND A.SUBJ = B.SUBJ AND A.PROP = B.PROP AND A.OBJ = B.OBJ )
static java.lang.String size
          Constant "size" used to reference prepared statement graph.size SELECT COUNT(NAMEDGRAPHID) FROM ${a} WHERE NAMEDGRAPHID=?
static java.lang.String statementExists
          Constant "statementExists" used to reference prepared statement graph.statementExists SELECT COUNT(*) FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?
 
Constructor Summary
GraphSQL()
           
 
Method Summary
static void clear(PreparedStatementCache sqlCache, long namedgraphId, java.lang.String graphTableName)
          Runs the clear prepared statement.
static int commitInsertStatements(PreparedStatementCache sqlCache, java.lang.String bulkResolutionTableName, java.lang.String statementTableName)
          Runs the commitInsertStatements prepared statement.
static int commitInsertStatementsNew(PreparedStatementCache sqlCache, java.lang.String bulkResolutionTableName, java.lang.String statementTableName)
          Runs the commitInsertStatementsNew prepared statement.
static void deleteStatement(PreparedStatementCache sqlCache, GraphSQL.DeleteStatementParams params, java.lang.String graphTableName)
          Runs the deleteStatement prepared statement.
static void deleteStatement(PreparedStatementCache sqlCache, long namedgraphId, long subj, long prop, long obj, java.lang.String graphTableName)
          Runs the deleteStatement prepared statement.
static void insertStatement(PreparedStatementCache sqlCache, GraphSQL.InsertStatementParams params, java.lang.String graphTableName)
          Runs the insertStatement prepared statement.
static void insertStatement(PreparedStatementCache sqlCache, int metadata, long namedgraphId, long subj, long prop, long obj, java.lang.String graphTableName)
          Runs the insertStatement prepared statement.
static void prepareClear(java.sql.PreparedStatement ps, long namedgraphId)
          Sets the input parameters for the clear prepared statement.
static void prepareCommitInsertStatements(java.sql.PreparedStatement ps)
          Sets the input parameters for the commitInsertStatements prepared statement.
static void prepareCommitInsertStatementsNew(java.sql.PreparedStatement ps)
          Sets the input parameters for the commitInsertStatementsNew prepared statement.
static void prepareDeleteStatement(java.sql.PreparedStatement ps, long namedgraphId, long subj, long prop, long obj)
          Sets the input parameters for the deleteStatement prepared statement.
static void prepareInsertStatement(java.sql.PreparedStatement ps, int metadata, long namedgraphId, long subj, long prop, long obj)
          Sets the input parameters for the insertStatement prepared statement.
static void preparePurge(java.sql.PreparedStatement ps)
          Sets the input parameters for the purge prepared statement.
static void preparePurgeInsertStatements(java.sql.PreparedStatement ps)
          Sets the input parameters for the purgeInsertStatements prepared statement.
static void prepareResolveStatements(java.sql.PreparedStatement ps)
          Sets the input parameters for the resolveStatements prepared statement.
static void prepareSize(java.sql.PreparedStatement ps, long namedgraphId)
          Sets the input parameters for the size prepared statement.
static void prepareStatementExists(java.sql.PreparedStatement ps, long namedgraphId, long subj, long prop, long obj)
          Sets the input parameters for the statementExists prepared statement.
static int purge(PreparedStatementCache sqlCache, java.lang.String graphTableName)
          Runs the purge prepared statement.
static int purgeInsertStatements(PreparedStatementCache sqlCache, java.lang.String bulkResolutionTableName, java.lang.String bulkResolutionTableName2, java.lang.String statementTableName)
          Runs the purgeInsertStatements prepared statement.
static ClosableIterator<GraphSQL.ResolveStatementsResult> resolveStatements(PreparedStatementCache sqlCache, java.lang.String bulkResolutionTableName, java.lang.String statementTableName)
          Runs the resolveStatements prepared statement with the default transformer.
static ClosableIterator<GraphSQL.ResolveStatementsResult> resolveStatements(PreparedStatementCache sqlCache, java.lang.String bulkResolutionTableName, java.lang.String statementTableName, Transformer<GraphSQL.ResolveStatementsResult> transform)
          Runs the resolveStatements prepared statement.
static java.lang.Integer size(PreparedStatementCache sqlCache, long namedgraphId, java.lang.String graphTableName)
          Runs the size prepared statement.
static java.lang.Integer statementExists(PreparedStatementCache sqlCache, GraphSQL.StatementExistsParams params, java.lang.String graphTableName)
          Runs the statementExists prepared statement.
static java.lang.Integer statementExists(PreparedStatementCache sqlCache, long namedgraphId, long subj, long prop, long obj, java.lang.String graphTableName)
          Runs the statementExists prepared statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

insertStatement

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

See Also:
Constant Field Values

statementExists

public static final java.lang.String statementExists
Constant "statementExists" used to reference prepared statement graph.statementExists SELECT COUNT(*) FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?

See Also:
Constant Field Values

size

public static final java.lang.String size
Constant "size" used to reference prepared statement graph.size SELECT COUNT(NAMEDGRAPHID) FROM ${a} WHERE NAMEDGRAPHID=?

See Also:
Constant Field Values

deleteStatement

public static final java.lang.String deleteStatement
Constant "deleteStatement" used to reference prepared statement graph.deleteStatement DELETE FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?

See Also:
Constant Field Values

resolveStatements

public static final java.lang.String resolveStatements
Constant "resolveStatements" used to reference prepared statement graph.resolveStatements SELECT A.METADATA,A.NAMEDGRAPHID,A.SUBJ, A.PROP, A.OBJ FROM ${a} AS A WHERE EXISTS(SELECT B.NAMEDGRAPHID FROM ${b} AS B WHERE A.METADATA=B.METADATA AND A.NAMEDGRAPHID=B.NAMEDGRAPHID AND A.SUBJ = B.SUBJ AND A.PROP = B.PROP AND A.OBJ = B.OBJ )

See Also:
Constant Field Values

purgeInsertStatements

public static final java.lang.String purgeInsertStatements
Constant "purgeInsertStatements" used to reference prepared statement graph.purgeInsertStatements DELETE FROM ${a} ST WHERE EXISTS (SELECT S.NAMEDGRAPHID FROM ${c} S WHERE ST.METADATA=S.METADATA AND S.NAMEDGRAPHID=ST.NAMEDGRAPHID AND S.SUBJ=ST.SUBJ AND S.PROP=ST.PROP AND S.OBJ=ST.OBJ)

See Also:
Constant Field Values

commitInsertStatements

public static final java.lang.String commitInsertStatements
Constant "commitInsertStatements" used to reference prepared statement graph.commitInsertStatements INSERT INTO ${b} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ) SELECT ST.METADATA, ST.NAMEDGRAPHID, ST.SUBJ, ST.PROP, ST.OBJ FROM ${a} ST

See Also:
Constant Field Values

commitInsertStatementsNew

public static final java.lang.String commitInsertStatementsNew
Constant "commitInsertStatementsNew" used to reference prepared statement graph.commitInsertStatementsNew MERGE INTO ${b} USING ${a} ON ${b}.NAMEDGRAPHID = ${a}.NAMEDGRAPHID AND ${b}.SUBJ = ${a}.SUBJ AND ${b}.PROP = ${a}.PROP AND ${b}.OBJ = ${a}.OBJ WHEN NOT MATCHED THEN INSERT (NAMEDGRAPHID,SUBJ,PROP,OBJ) VALUES(${a}.NAMEDGRAPHID,${a}.SUBJ,${a}.PROP,${a}.OBJ) ELSE IGNORE

See Also:
Constant Field Values

clear

public static final java.lang.String clear
Constant "clear" used to reference prepared statement graph.clear DELETE FROM ${a} WHERE NAMEDGRAPHID=?

See Also:
Constant Field Values

purge

public static final java.lang.String purge
Constant "purge" used to reference prepared statement graph.purge DELETE FROM ${a}

See Also:
Constant Field Values
Constructor Detail

GraphSQL

public GraphSQL()
Method Detail

insertStatement

public static void insertStatement(PreparedStatementCache sqlCache,
                                   GraphSQL.InsertStatementParams params,
                                   java.lang.String graphTableName)
                            throws RdbException
Runs the insertStatement prepared statement. INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ, PROP, OBJ) VALUES(?,?, ?, ?, ?)

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertStatementParams input Interface
graphTableName - template parameter
Throws:
RdbException

insertStatement

public static void insertStatement(PreparedStatementCache sqlCache,
                                   int metadata,
                                   long namedgraphId,
                                   long subj,
                                   long prop,
                                   long obj,
                                   java.lang.String graphTableName)
                            throws RdbException
Runs the insertStatement prepared statement. INSERT INTO ${a} (METADATA,NAMEDGRAPHID,SUBJ, PROP, OBJ) VALUES(?,?, ?, ?, ?)

Parameters:
sqlCache - factory and cache of PreparedStatments
metadata - template parameter
namedgraphId - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
graphTableName - template parameter
Throws:
RdbException

prepareInsertStatement

public static void prepareInsertStatement(java.sql.PreparedStatement ps,
                                          int metadata,
                                          long namedgraphId,
                                          long subj,
                                          long prop,
                                          long obj)
                                   throws java.sql.SQLException
Sets the input parameters for the insertStatement 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

statementExists

public static java.lang.Integer statementExists(PreparedStatementCache sqlCache,
                                                GraphSQL.StatementExistsParams params,
                                                java.lang.String graphTableName)
                                         throws RdbException
Runs the statementExists prepared statement. SELECT COUNT(*) FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - StatementExistsParams input Interface
graphTableName - template parameter
Returns:
Integer containing the results of the SQL operation
Throws:
RdbException

statementExists

public static java.lang.Integer statementExists(PreparedStatementCache sqlCache,
                                                long namedgraphId,
                                                long subj,
                                                long prop,
                                                long obj,
                                                java.lang.String graphTableName)
                                         throws RdbException
Runs the statementExists prepared statement. SELECT COUNT(*) FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
namedgraphId - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
graphTableName - template parameter
Returns:
Integer
Throws:
RdbException

prepareStatementExists

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

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

size

public static java.lang.Integer size(PreparedStatementCache sqlCache,
                                     long namedgraphId,
                                     java.lang.String graphTableName)
                              throws RdbException
Runs the size prepared statement. SELECT COUNT(NAMEDGRAPHID) FROM ${a} WHERE NAMEDGRAPHID=?

Parameters:
sqlCache - factory and cache of PreparedStatments
namedgraphId - template parameter
graphTableName - template parameter
Returns:
Integer
Throws:
RdbException

prepareSize

public static void prepareSize(java.sql.PreparedStatement ps,
                               long namedgraphId)
                        throws java.sql.SQLException
Sets the input parameters for the size prepared statement.

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

deleteStatement

public static void deleteStatement(PreparedStatementCache sqlCache,
                                   GraphSQL.DeleteStatementParams params,
                                   java.lang.String graphTableName)
                            throws RdbException
Runs the deleteStatement prepared statement. DELETE FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
params - DeleteStatementParams input Interface
graphTableName - template parameter
Throws:
RdbException

deleteStatement

public static void deleteStatement(PreparedStatementCache sqlCache,
                                   long namedgraphId,
                                   long subj,
                                   long prop,
                                   long obj,
                                   java.lang.String graphTableName)
                            throws RdbException
Runs the deleteStatement prepared statement. DELETE FROM ${a} WHERE NAMEDGRAPHID=? AND SUBJ = ? AND PROP = ? AND OBJ = ?

Parameters:
sqlCache - factory and cache of PreparedStatments
namedgraphId - template parameter
subj - template parameter
prop - template parameter
obj - template parameter
graphTableName - template parameter
Throws:
RdbException

prepareDeleteStatement

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

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

resolveStatements

public static ClosableIterator<GraphSQL.ResolveStatementsResult> resolveStatements(PreparedStatementCache sqlCache,
                                                                                   java.lang.String bulkResolutionTableName,
                                                                                   java.lang.String statementTableName)
                                                                            throws RdbException
Runs the resolveStatements prepared statement with the default transformer. SELECT A.METADATA,A.NAMEDGRAPHID,A.SUBJ, A.PROP, A.OBJ FROM ${a} AS A WHERE EXISTS(SELECT B.NAMEDGRAPHID FROM ${b} AS B WHERE A.METADATA=B.METADATA AND A.NAMEDGRAPHID=B.NAMEDGRAPHID AND A.SUBJ = B.SUBJ AND A.PROP = B.PROP AND A.OBJ = B.OBJ )

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

resolveStatements

public static ClosableIterator<GraphSQL.ResolveStatementsResult> resolveStatements(PreparedStatementCache sqlCache,
                                                                                   java.lang.String bulkResolutionTableName,
                                                                                   java.lang.String statementTableName,
                                                                                   Transformer<GraphSQL.ResolveStatementsResult> transform)
                                                                            throws RdbException
Runs the resolveStatements prepared statement. SELECT A.METADATA,A.NAMEDGRAPHID,A.SUBJ, A.PROP, A.OBJ FROM ${a} AS A WHERE EXISTS(SELECT B.NAMEDGRAPHID FROM ${b} AS B WHERE A.METADATA=B.METADATA AND A.NAMEDGRAPHID=B.NAMEDGRAPHID AND A.SUBJ = B.SUBJ AND A.PROP = B.PROP AND A.OBJ = B.OBJ )

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

prepareResolveStatements

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

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

purgeInsertStatements

public static int purgeInsertStatements(PreparedStatementCache sqlCache,
                                        java.lang.String bulkResolutionTableName,
                                        java.lang.String bulkResolutionTableName2,
                                        java.lang.String statementTableName)
                                 throws RdbException
Runs the purgeInsertStatements prepared statement. DELETE FROM ${a} ST WHERE EXISTS (SELECT S.NAMEDGRAPHID FROM ${c} S WHERE ST.METADATA=S.METADATA AND S.NAMEDGRAPHID=ST.NAMEDGRAPHID AND S.SUBJ=ST.SUBJ AND S.PROP=ST.PROP AND S.OBJ=ST.OBJ)

Parameters:
sqlCache - factory and cache of PreparedStatments
bulkResolutionTableName - template parameter
bulkResolutionTableName2 - template parameter
statementTableName - template parameter
Returns:
int
Throws:
RdbException

preparePurgeInsertStatements

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

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

commitInsertStatements

public static int commitInsertStatements(PreparedStatementCache sqlCache,
                                         java.lang.String bulkResolutionTableName,
                                         java.lang.String statementTableName)
                                  throws RdbException
Runs the commitInsertStatements prepared statement. INSERT INTO ${b} (METADATA,NAMEDGRAPHID,SUBJ,PROP,OBJ) SELECT ST.METADATA, ST.NAMEDGRAPHID, ST.SUBJ, ST.PROP, ST.OBJ FROM ${a} ST

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

prepareCommitInsertStatements

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

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

commitInsertStatementsNew

public static int commitInsertStatementsNew(PreparedStatementCache sqlCache,
                                            java.lang.String bulkResolutionTableName,
                                            java.lang.String statementTableName)
                                     throws RdbException
Runs the commitInsertStatementsNew prepared statement. MERGE INTO ${b} USING ${a} ON ${b}.NAMEDGRAPHID = ${a}.NAMEDGRAPHID AND ${b}.SUBJ = ${a}.SUBJ AND ${b}.PROP = ${a}.PROP AND ${b}.OBJ = ${a}.OBJ WHEN NOT MATCHED THEN INSERT (NAMEDGRAPHID,SUBJ,PROP,OBJ) VALUES(${a}.NAMEDGRAPHID,${a}.SUBJ,${a}.PROP,${a}.OBJ) ELSE IGNORE

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

prepareCommitInsertStatementsNew

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

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

clear

public static void clear(PreparedStatementCache sqlCache,
                         long namedgraphId,
                         java.lang.String graphTableName)
                  throws RdbException
Runs the clear prepared statement. DELETE FROM ${a} WHERE NAMEDGRAPHID=?

Parameters:
sqlCache - factory and cache of PreparedStatments
namedgraphId - template parameter
graphTableName - template parameter
Throws:
RdbException

prepareClear

public static void prepareClear(java.sql.PreparedStatement ps,
                                long namedgraphId)
                         throws java.sql.SQLException
Sets the input parameters for the clear prepared statement.

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

purge

public static int purge(PreparedStatementCache sqlCache,
                        java.lang.String graphTableName)
                 throws RdbException
Runs the purge prepared statement. DELETE FROM ${a}

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

preparePurge

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

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


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