java.lang.Object
simpleorm.dataset.SSessionI
simpleorm.sessionjdbc.SSessionJdbc
com.inductiveautomation.ignition.gateway.localdb.persistence.PersistenceSession
All Implemented Interfaces:
AutoCloseable

public class PersistenceSession extends SSessionJdbc implements AutoCloseable
  • Constructor Details

    • PersistenceSession

      public PersistenceSession()
  • Method Details

    • getThreadLocalSession

      public static PersistenceSession getThreadLocalSession()
    • initialize

      public void initialize(DataSource source, String connectionName, DBInterface dbi, SDriver driver)
    • getDBInterface

      public DBInterface getDBInterface()
    • setDBInterface

      protected void setDBInterface(DBInterface dbInterface)
    • queryOne

      public <T extends PersistentRecord> T queryOne(SQuery<T> query)
      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 interface AutoCloseable
      Overrides:
      close in class SSessionJdbc