Class PersistenceSession
java.lang.Object
simpleorm.dataset.SSessionI
simpleorm.sessionjdbc.SSessionJdbc
com.inductiveautomation.ignition.gateway.localdb.persistence.PersistenceSession
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
This is a special wrapper that uses our Connection for operations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Main method for closing a session.static PersistenceSession
void
initialize
(DataSource source, String connectionName, DBInterface dbi, SDriver driver) <T extends PersistentRecord>
TReturns the first result from the query, or null if there were no resultsprotected void
setDBInterface
(DBInterface dbInterface) Methods inherited from class simpleorm.sessionjdbc.SSessionJdbc
associateWithThread, attachToThread, begin, begin, commit, commitAndDetachDataSet, create, createWithGeneratedKey, detachFromThread, dirtyPurge, dissassociateFromThread, find, find, findOrCreate, findOrCreate, findOrCreate, findOrCreate, findOrCreate, flush, flush, flushAndPurge, flushAndPurge, getDataSet, getDataSource, getDriver, getJdbcConnection, getLogger, getStatistics, hasBegun, innerOpen, mustFind, mustFind, open, open, query, queryNoFlush, queryOnlyRecord, rawQueryMap, rawQueryMaps, rawQueryOneMap, rawQuerySingle, rawUpdateDB, rawUpdateDBNoFlush, rollback, setTransactionIsolation, toString
-
Constructor Details
-
PersistenceSession
public PersistenceSession()
-
-
Method Details
-
getThreadLocalSession
-
initialize
-
getDBInterface
-
setDBInterface
-
queryOne
Returns the first result from the query, or null if there were no results -
close
public void close()Description copied from class:SSessionJdbc
Main method for closing a session.Closes the JDBC connection and then calls
detachWithoutClosing
to detach the SimpleORM connection from the current thread. Should usually be put in a finally clause. No error if already detached or closed so safe in finally clauses.- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classSSessionJdbc
-