Class PersistenceSession.PersistenceSessionDBInterface
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.localdb.AbstractDBInterface
-
- com.inductiveautomation.ignition.gateway.localdb.persistence.PersistenceSession.PersistenceSessionDBInterface
-
- All Implemented Interfaces:
DBInterface
- Enclosing class:
- PersistenceSession
protected class PersistenceSession.PersistenceSessionDBInterface extends AbstractDBInterface
This is a special wrapper that uses our Connection for operations. It also has to make sure the connection isn't closed, as the base class does, after operations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.gateway.localdb.DBInterface
DBInterface.Transaction
-
-
Constructor Summary
Constructors Constructor Description PersistenceSessionDBInterface(DBInterface gwDbi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connection
getConnection()
long
getSeq(java.lang.String seqName)
Gets the next value in a sequence.long
getSeq(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.protected boolean
shouldCloseConnection()
-
Methods inherited from class com.inductiveautomation.ignition.gateway.localdb.AbstractDBInterface
resultSetToListNatural, runPrepQuery, runPrepQuery, runPrepUpdate, runPrepUpdate, runQuery, runQuery, runScalarQuery, runTransaction, runUpdateQuery, runUpdateQuery
-
-
-
-
Constructor Detail
-
PersistenceSessionDBInterface
public PersistenceSessionDBInterface(DBInterface gwDbi)
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Specified by:
getConnection
in interfaceDBInterface
- Specified by:
getConnection
in classAbstractDBInterface
- Throws:
java.sql.SQLException
-
shouldCloseConnection
protected boolean shouldCloseConnection()
- Overrides:
shouldCloseConnection
in classAbstractDBInterface
-
getSeq
public long getSeq(java.lang.String seqName) throws java.sql.SQLException
Description copied from class:AbstractDBInterface
Gets the next value in a sequence.- Specified by:
getSeq
in interfaceDBInterface
- Overrides:
getSeq
in classAbstractDBInterface
- Throws:
java.sql.SQLException
-
getSeq
public long getSeq(java.lang.String seqName, java.sql.Connection connection) throws java.sql.SQLException
Description copied from interface:DBInterface
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.- Specified by:
getSeq
in interfaceDBInterface
- Overrides:
getSeq
in classAbstractDBInterface
- Throws:
java.sql.SQLException
-
-