Interface DBInterface
- 
- All Known Subinterfaces:
- ConfigurationInterface
 - All Known Implementing Classes:
- AbstractDBInterface,- PersistenceSession.PersistenceSessionDBInterface
 
 public interface DBInterface
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceDBInterface.TransactionA transaction represents a sequence of commands that need to be executed as a group, or not at all.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.sql.ConnectiongetConnection()longgetSeq(java.lang.String seqName)Gets the next value in a named integer sequence.longgetSeq(java.lang.String seqName, java.sql.Connection connection)Like the other getSeq, but operates against a particular local db connection, which may be necessary if the sequence generation is part of a transaction.java.util.List<java.util.List<java.lang.Object>>runPrepQuery(java.lang.String query, java.lang.Object... args)Runs the given SELECT query as a prepared statement, after setting the arguments in the varargs list.intrunPrepUpdate(java.lang.String query, java.io.Serializable... args)Runs the given UPDATE/INSERT/DELETE query as a prepared statement, after setting the arguments in the varargs list.java.util.List<java.util.List<java.lang.Object>>runQuery(java.lang.String query)Runs the given SELECT query, and returns the results in a List of Lists of Objects.java.lang.ObjectrunScalarQuery(java.lang.String query)Runs the given SELECT query, returns the value in the first row of the first column, as its natural type.java.lang.ObjectrunTransaction(DBInterface.Transaction tx)Creates a connection, and runs the given transaction.intrunUpdateQuery(java.lang.String query)Runs the given UPDATE/INSERT/DELETE query, and returns the number of rows affected.
 
- 
- 
- 
Method Detail- 
getConnectionjava.sql.Connection getConnection() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
runScalarQuery@Nullable java.lang.Object runScalarQuery(java.lang.String query) throws java.sql.SQLExceptionRuns the given SELECT query, returns the value in the first row of the first column, as its natural type. If no rows are returned, null is returned.- Throws:
- java.sql.SQLException
 
 - 
runQueryjava.util.List<java.util.List<java.lang.Object>> runQuery(java.lang.String query) throws java.sql.SQLExceptionRuns the given SELECT query, and returns the results in a List of Lists of Objects.- Throws:
- java.sql.SQLException
 
 - 
runPrepQueryjava.util.List<java.util.List<java.lang.Object>> runPrepQuery(java.lang.String query, java.lang.Object... args) throws java.sql.SQLExceptionRuns the given SELECT query as a prepared statement, after setting the arguments in the varargs list. Returns the results in a List of Lists of Objects.- Throws:
- java.sql.SQLException
 
 - 
runUpdateQueryint runUpdateQuery(java.lang.String query) throws java.sql.SQLExceptionRuns the given UPDATE/INSERT/DELETE query, and returns the number of rows affected.- Throws:
- java.sql.SQLException
 
 - 
runPrepUpdateint runPrepUpdate(java.lang.String query, java.io.Serializable... args) throws java.sql.SQLExceptionRuns the given UPDATE/INSERT/DELETE query as a prepared statement, after setting the arguments in the varargs list. Returns the number of rows affected.- Throws:
- java.sql.SQLException
 
 - 
getSeqlong getSeq(java.lang.String seqName) throws java.sql.SQLExceptionGets the next value in a named integer sequence.- Throws:
- java.sql.SQLException
 
 - 
getSeqlong getSeq(java.lang.String seqName, java.sql.Connection connection) throws java.sql.SQLExceptionLike the other getSeq, but operates against a particular local db connection, which may be necessary if the sequence generation is part of a transaction.- Throws:
- java.sql.SQLException
 
 - 
runTransactionjava.lang.Object runTransaction(DBInterface.Transaction tx) throws java.sql.SQLException Creates a connection, and runs the given transaction. Transactions need to be serializable.- Throws:
- java.sql.SQLException
 
 
- 
 
-