Class PersistenceSession
- java.lang.Object
- 
- simpleorm.dataset.SSessionI
- 
- simpleorm.sessionjdbc.SSessionJdbc
- 
- com.inductiveautomation.ignition.gateway.localdb.persistence.PersistenceSession
 
 
 
- 
- All Implemented Interfaces:
- java.lang.AutoCloseable
 
 public class PersistenceSession extends SSessionJdbc implements java.lang.AutoCloseable 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classPersistenceSession.PersistenceSessionDBInterfaceThis is a special wrapper that uses our Connection for operations.
 - 
Constructor SummaryConstructors Constructor Description PersistenceSession()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Main method for closing a session.DBInterfacegetDBInterface()static PersistenceSessiongetThreadLocalSession()voidinitialize(javax.sql.DataSource source, java.lang.String connectionName, DBInterface dbi, SDriver driver)<T extends PersistentRecord>
 TqueryOne(SQuery<T> query)Returns the first result from the query, or null if there were no resultsprotected voidsetDBInterface(DBInterface dbInterface)- 
Methods inherited from class simpleorm.sessionjdbc.SSessionJdbcassociateWithThread, 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
 
- 
 
- 
- 
- 
Method Detail- 
getThreadLocalSessionpublic static PersistenceSession getThreadLocalSession() 
 - 
initializepublic void initialize(javax.sql.DataSource source, java.lang.String connectionName, DBInterface dbi, SDriver driver)
 - 
getDBInterfacepublic DBInterface getDBInterface() 
 - 
setDBInterfaceprotected void setDBInterface(DBInterface dbInterface) 
 - 
queryOnepublic <T extends PersistentRecord> T queryOne(SQuery<T> query) Returns the first result from the query, or null if there were no results
 - 
closepublic void close() Description copied from class:SSessionJdbcMain method for closing a session.Closes the JDBC connection and then calls detachWithoutClosingto 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:
- closein interface- java.lang.AutoCloseable
- Overrides:
- closein class- SSessionJdbc
 
 
- 
 
-