|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.rdb.sql.LastTransactionTime
public class LastTransactionTime
LastTransactionTime provides wrappers around SQL queries and transforms ResultSets into java objects
| Nested Class Summary | |
|---|---|
static class |
LastTransactionTime.BatchInsertFirstTransactionTime
Batch operation for adding parameters to the InsertFirstTransactionTime prepared statement |
static class |
LastTransactionTime.BatchInsertLastTransactionTime
Batch operation for adding parameters to the InsertLastTransactionTime prepared statement |
static class |
LastTransactionTime.BatchInsertTransactionTimes
Batch operation for adding parameters to the InsertTransactionTimes prepared statement |
static interface |
LastTransactionTime.GetLastTransactionResult
Interface for holding the results of the getLastTransaction prepared statement. |
static class |
LastTransactionTime.GetLastTransactionResultImpl
Default implementation of GetLastTransactionResult |
static interface |
LastTransactionTime.InsertFirstTransactionTimeParams
Interface for managing the parameters to the insertFirstTransactionTime prepared statement. |
static class |
LastTransactionTime.InsertFirstTransactionTimeParamsImpl
Default implementation of InsertFirstTransactionTimeParams |
static interface |
LastTransactionTime.InsertLastTransactionTimeParams
Interface for managing the parameters to the insertLastTransactionTime prepared statement. |
static class |
LastTransactionTime.InsertLastTransactionTimeParamsImpl
Default implementation of InsertLastTransactionTimeParams |
static interface |
LastTransactionTime.PrefetchPredicateUrisResult
Interface for holding the results of the prefetchPredicateUris prepared statement. |
static class |
LastTransactionTime.PrefetchPredicateUrisResultImpl
Default implementation of PrefetchPredicateUrisResult |
| Field Summary | |
|---|---|
static java.lang.String |
getLastTransaction
Constant "getLastTransaction" used to reference prepared statement LastTransaction.getLastTransaction
SELECT COMMITED,LASTID FROM LASTTRANSACTIONTIME WHERE ID=0
|
static java.lang.String |
getLastTransactionTime
Constant "getLastTransactionTime" used to reference prepared statement LastTransaction.getLastTransactionTime
SELECT MAX(COMMITED) FROM TRANSACTIONTIMES
|
static java.lang.String |
getTransactionId
Constant "getTransactionId" used to reference prepared statement LastTransaction.getTransactionId
SELECT LASTID FROM TRANSACTIONTIMES WHERE COMMITED=?
|
static java.lang.String |
insertFirstTransactionTime
Constant "insertFirstTransactionTime" used to reference prepared statement LastTransaction.insertFirstTransactionTime
INSERT INTO LASTTRANSACTIONTIME (ID,COMMITED,LASTID)VALUES(0,?,?)
|
static java.lang.String |
insertLastTransactionTime
Constant "insertLastTransactionTime" used to reference prepared statement LastTransaction.insertLastTransactionTime
UPDATE LASTTRANSACTIONTIME SET COMMITED=?,LASTID=? WHERE ID=0
|
static java.lang.String |
insertTransactionTimes
Constant "insertTransactionTimes" used to reference prepared statement LastTransaction.insertTransactionTimes
INSERT INTO TRANSACTIONTIMES (COMMITED,LASTID) SELECT COMMITED,LASTID FROM LASTTRANSACTIONTIME WHERE ID=0
|
static java.lang.String |
prefetchPredicateUris
Constant "prefetchPredicateUris" used to reference prepared statement LastTransaction.prefetchPredicateUris
SELECT B.ID,B.VALUE FROM (SELECT COUNT(*) AS CNT,PROP FROM STATEMENTS WHERE HEND IS NULL GROUP BY PROP HAVING COUNT(*) > 1000) A JOIN (SELECT ID,VALUE FROM ${a}_U) B ON A.PROP=B.ID
|
static java.lang.String |
selectCurrentTimestamp
Constant "selectCurrentTimestamp" used to reference prepared statement LastTransaction.selectCurrentTimestamp
NULL
|
| Constructor Summary | |
|---|---|
LastTransactionTime()
|
|
| Method Summary | |
|---|---|
static LastTransactionTime.GetLastTransactionResult |
getLastTransaction(PreparedStatementCache sqlCache)
Runs the getLastTransaction prepared statement. |
static LastTransactionTime.GetLastTransactionResult |
getLastTransaction(PreparedStatementCache sqlCache,
LastTransactionTime.GetLastTransactionResult result)
Runs the getLastTransaction prepared statement. |
static java.lang.Long |
getLastTransactionTime(PreparedStatementCache sqlCache)
Runs the getLastTransactionTime prepared statement. |
static java.lang.Long |
getTransactionId(PreparedStatementCache sqlCache,
java.lang.Long transactiontime)
Runs the getTransactionId prepared statement. |
static void |
insertFirstTransactionTime(PreparedStatementCache sqlCache,
LastTransactionTime.InsertFirstTransactionTimeParams params)
Runs the insertFirstTransactionTime prepared statement. |
static void |
insertFirstTransactionTime(PreparedStatementCache sqlCache,
java.lang.Long commited,
long id)
Runs the insertFirstTransactionTime prepared statement. |
static void |
insertLastTransactionTime(PreparedStatementCache sqlCache,
LastTransactionTime.InsertLastTransactionTimeParams params)
Runs the insertLastTransactionTime prepared statement. |
static void |
insertLastTransactionTime(PreparedStatementCache sqlCache,
java.lang.Long commited,
long id)
Runs the insertLastTransactionTime prepared statement. |
static void |
insertTransactionTimes(PreparedStatementCache sqlCache)
Runs the insertTransactionTimes prepared statement. |
static ClosableIterator<LastTransactionTime.PrefetchPredicateUrisResult> |
prefetchPredicateUris(PreparedStatementCache sqlCache,
java.lang.String tableNamePrefix)
Runs the prefetchPredicateUris prepared statement with the default transformer. |
static ClosableIterator<LastTransactionTime.PrefetchPredicateUrisResult> |
prefetchPredicateUris(PreparedStatementCache sqlCache,
java.lang.String tableNamePrefix,
Transformer<LastTransactionTime.PrefetchPredicateUrisResult> transform)
Runs the prefetchPredicateUris prepared statement. |
static void |
prepareGetLastTransaction(java.sql.PreparedStatement ps)
Sets the input parameters for the getLastTransaction prepared statement. |
static void |
prepareGetLastTransactionTime(java.sql.PreparedStatement ps)
Sets the input parameters for the getLastTransactionTime prepared statement. |
static void |
prepareGetTransactionId(java.sql.PreparedStatement ps,
java.lang.Long transactiontime)
Sets the input parameters for the getTransactionId prepared statement. |
static void |
prepareInsertFirstTransactionTime(java.sql.PreparedStatement ps,
java.lang.Long commited,
long id)
Sets the input parameters for the insertFirstTransactionTime prepared statement. |
static void |
prepareInsertLastTransactionTime(java.sql.PreparedStatement ps,
java.lang.Long commited,
long id)
Sets the input parameters for the insertLastTransactionTime prepared statement. |
static void |
prepareInsertTransactionTimes(java.sql.PreparedStatement ps)
Sets the input parameters for the insertTransactionTimes prepared statement. |
static void |
preparePrefetchPredicateUris(java.sql.PreparedStatement ps)
Sets the input parameters for the prefetchPredicateUris prepared statement. |
static void |
prepareSelectCurrentTimestamp(java.sql.PreparedStatement ps)
Sets the input parameters for the selectCurrentTimestamp prepared statement. |
static java.sql.Timestamp |
selectCurrentTimestamp(PreparedStatementCache sqlCache)
Runs the selectCurrentTimestamp prepared statement. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String getLastTransactionTime
SELECT MAX(COMMITED) FROM TRANSACTIONTIMES
public static final java.lang.String getLastTransaction
SELECT COMMITED,LASTID FROM LASTTRANSACTIONTIME WHERE ID=0
public static final java.lang.String getTransactionId
SELECT LASTID FROM TRANSACTIONTIMES WHERE COMMITED=?
public static final java.lang.String insertLastTransactionTime
UPDATE LASTTRANSACTIONTIME SET COMMITED=?,LASTID=? WHERE ID=0
public static final java.lang.String insertTransactionTimes
INSERT INTO TRANSACTIONTIMES (COMMITED,LASTID) SELECT COMMITED,LASTID FROM LASTTRANSACTIONTIME WHERE ID=0
public static final java.lang.String insertFirstTransactionTime
INSERT INTO LASTTRANSACTIONTIME (ID,COMMITED,LASTID)VALUES(0,?,?)
public static final java.lang.String prefetchPredicateUris
SELECT B.ID,B.VALUE FROM (SELECT COUNT(*) AS CNT,PROP FROM STATEMENTS WHERE HEND IS NULL GROUP BY PROP HAVING COUNT(*) > 1000) A JOIN (SELECT ID,VALUE FROM ${a}_U) B ON A.PROP=B.ID
public static final java.lang.String selectCurrentTimestamp
NULL
| Constructor Detail |
|---|
public LastTransactionTime()
| Method Detail |
|---|
public static java.lang.Long getLastTransactionTime(PreparedStatementCache sqlCache)
throws AnzoException,
java.sql.SQLException
SELECT MAX(COMMITED) FROM TRANSACTIONTIMES
sqlCache - factory and cache of PreparedStatments
AnzoException
java.sql.SQLException
public static void prepareGetLastTransactionTime(java.sql.PreparedStatement ps)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are set
java.sql.SQLException
public static LastTransactionTime.GetLastTransactionResult getLastTransaction(PreparedStatementCache sqlCache)
throws AnzoException,
java.sql.SQLException
SELECT COMMITED,LASTID FROM LASTTRANSACTIONTIME WHERE ID=0
sqlCache - factory and cache of PreparedStatments
AnzoException
java.sql.SQLException
public static LastTransactionTime.GetLastTransactionResult getLastTransaction(PreparedStatementCache sqlCache,
LastTransactionTime.GetLastTransactionResult result)
throws AnzoException,
java.sql.SQLException
SELECT COMMITED,LASTID FROM LASTTRANSACTIONTIME WHERE ID=0
sqlCache - factory and cache of PreparedStatmentsresult - GetLastTransactionResult result object
AnzoException
java.sql.SQLException
public static void prepareGetLastTransaction(java.sql.PreparedStatement ps)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are set
java.sql.SQLException
public static java.lang.Long getTransactionId(PreparedStatementCache sqlCache,
java.lang.Long transactiontime)
throws AnzoException,
java.sql.SQLException
SELECT LASTID FROM TRANSACTIONTIMES WHERE COMMITED=?
sqlCache - factory and cache of PreparedStatmentstransactiontime - template parameter
AnzoException
java.sql.SQLException
public static void prepareGetTransactionId(java.sql.PreparedStatement ps,
java.lang.Long transactiontime)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are settransactiontime - template parameter
java.sql.SQLException
public static void insertLastTransactionTime(PreparedStatementCache sqlCache,
LastTransactionTime.InsertLastTransactionTimeParams params)
throws AnzoException,
java.sql.SQLException
UPDATE LASTTRANSACTIONTIME SET COMMITED=?,LASTID=? WHERE ID=0
sqlCache - factory and cache of PreparedStatmentsparams - InsertLastTransactionTimeParams input Interface
AnzoException
java.sql.SQLException
public static void insertLastTransactionTime(PreparedStatementCache sqlCache,
java.lang.Long commited,
long id)
throws AnzoException,
java.sql.SQLException
UPDATE LASTTRANSACTIONTIME SET COMMITED=?,LASTID=? WHERE ID=0
sqlCache - factory and cache of PreparedStatmentscommited - template parameterid - template parameter
AnzoException
java.sql.SQLException
public static void prepareInsertLastTransactionTime(java.sql.PreparedStatement ps,
java.lang.Long commited,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setcommited - template parameterid - template parameter
java.sql.SQLException
public static void insertTransactionTimes(PreparedStatementCache sqlCache)
throws AnzoException,
java.sql.SQLException
INSERT INTO TRANSACTIONTIMES (COMMITED,LASTID) SELECT COMMITED,LASTID FROM LASTTRANSACTIONTIME WHERE ID=0
sqlCache - factory and cache of PreparedStatments
AnzoException
java.sql.SQLException
public static void prepareInsertTransactionTimes(java.sql.PreparedStatement ps)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are set
java.sql.SQLException
public static void insertFirstTransactionTime(PreparedStatementCache sqlCache,
LastTransactionTime.InsertFirstTransactionTimeParams params)
throws AnzoException,
java.sql.SQLException
INSERT INTO LASTTRANSACTIONTIME (ID,COMMITED,LASTID)VALUES(0,?,?)
sqlCache - factory and cache of PreparedStatmentsparams - InsertFirstTransactionTimeParams input Interface
AnzoException
java.sql.SQLException
public static void insertFirstTransactionTime(PreparedStatementCache sqlCache,
java.lang.Long commited,
long id)
throws AnzoException,
java.sql.SQLException
INSERT INTO LASTTRANSACTIONTIME (ID,COMMITED,LASTID)VALUES(0,?,?)
sqlCache - factory and cache of PreparedStatmentscommited - template parameterid - template parameter
AnzoException
java.sql.SQLException
public static void prepareInsertFirstTransactionTime(java.sql.PreparedStatement ps,
java.lang.Long commited,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setcommited - template parameterid - template parameter
java.sql.SQLException
public static ClosableIterator<LastTransactionTime.PrefetchPredicateUrisResult> prefetchPredicateUris(PreparedStatementCache sqlCache,
java.lang.String tableNamePrefix)
throws AnzoException,
java.sql.SQLException
SELECT B.ID,B.VALUE FROM (SELECT COUNT(*) AS CNT,PROP FROM STATEMENTS WHERE HEND IS NULL GROUP BY PROP HAVING COUNT(*) > 1000) A JOIN (SELECT ID,VALUE FROM ${a}_U) B ON A.PROP=B.ID
sqlCache - factory and cache of PreparedStatmentstableNamePrefix - template parameter
AnzoException
java.sql.SQLException
public static ClosableIterator<LastTransactionTime.PrefetchPredicateUrisResult> prefetchPredicateUris(PreparedStatementCache sqlCache,
java.lang.String tableNamePrefix,
Transformer<LastTransactionTime.PrefetchPredicateUrisResult> transform)
throws AnzoException,
java.sql.SQLException
SELECT B.ID,B.VALUE FROM (SELECT COUNT(*) AS CNT,PROP FROM STATEMENTS WHERE HEND IS NULL GROUP BY PROP HAVING COUNT(*) > 1000) A JOIN (SELECT ID,VALUE FROM ${a}_U) B ON A.PROP=B.ID
sqlCache - factory and cache of PreparedStatmentstableNamePrefix - template parametertransform - org.openanzo.jdbc.utils.TransformerAnzoException
java.sql.SQLException
public static void preparePrefetchPredicateUris(java.sql.PreparedStatement ps)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are set
java.sql.SQLException
public static java.sql.Timestamp selectCurrentTimestamp(PreparedStatementCache sqlCache)
throws AnzoException,
java.sql.SQLException
NULL
sqlCache - factory and cache of PreparedStatments
AnzoException
java.sql.SQLException
public static void prepareSelectCurrentTimestamp(java.sql.PreparedStatement ps)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are set
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||