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.ConnectiongetConnection()longgetSeq(java.lang.String seqName)Gets the next value in a 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.protected booleanshouldCloseConnection()-
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:
getConnectionin interfaceDBInterface- Specified by:
getConnectionin classAbstractDBInterface- Throws:
java.sql.SQLException
-
shouldCloseConnection
protected boolean shouldCloseConnection()
- Overrides:
shouldCloseConnectionin classAbstractDBInterface
-
getSeq
public long getSeq(java.lang.String seqName) throws java.sql.SQLExceptionDescription copied from class:AbstractDBInterfaceGets the next value in a sequence.- Specified by:
getSeqin interfaceDBInterface- Overrides:
getSeqin classAbstractDBInterface- Throws:
java.sql.SQLException
-
getSeq
public long getSeq(java.lang.String seqName, java.sql.Connection connection) throws java.sql.SQLExceptionDescription copied from interface:DBInterfaceLike 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:
getSeqin interfaceDBInterface- Overrides:
getSeqin classAbstractDBInterface- Throws:
java.sql.SQLException
-
-