Tabnine Logo
DatabaseConnection.isClosed
Code IndexAdd Tabnine to your IDE (free)

How to use
isClosed
method
in
com.j256.ormlite.support.DatabaseConnection

Best Java code snippets using com.j256.ormlite.support.DatabaseConnection.isClosed (Showing top 3 results out of 315)

origin: com.j256.ormlite/ormlite-core

@Override
public boolean isClosed() throws SQLException {
  if (proxy == null) {
    return true;
  } else {
    return proxy.isClosed();
  }
}
origin: j256/ormlite-core

@Override
public boolean isClosed() throws SQLException {
  if (proxy == null) {
    return true;
  } else {
    return proxy.isClosed();
  }
}
origin: j256/ormlite-core

@Test
public void testIsClosed() throws Exception {
  DatabaseConnection conn = createMock(DatabaseConnection.class);
  boolean closed = true;
  expect(conn.isClosed()).andReturn(closed);
  conn.close();
  DatabaseConnectionProxy proxy = new DatabaseConnectionProxy(conn);
  replay(conn);
  assertEquals(closed, proxy.isClosed());
  proxy.close();
  verify(conn);
}
com.j256.ormlite.supportDatabaseConnectionisClosed

Javadoc

Return if the connection has been closed either through a call to #close() or because of a fatal error.

Popular methods of DatabaseConnection

  • executeStatement
    Execute a statement directly on the connection.
  • isAutoCommit
    Return if auto-commit is currently enabled.
  • setAutoCommit
    Set the auto-commit to be on (true) or off (false). Setting auto-commit to true may or may-not cause
  • commit
    Commit all changes since the savepoint was created. If savePoint is null then commit all outstanding
  • compileStatement
    Like compileStatement(String, StatementType, FieldType[]) except the caller can specify the result f
  • setSavePoint
    Start a save point with a certain name. It can be a noop if savepoints are not supported.
  • close
  • closeQuietly
    Close the connection to the database but swallow any exceptions.
  • insert
    Perform a SQL update while with the associated SQL statement, arguments, and types. This will possib
  • isAutoCommitSupported
    Return if auto-commit is supported.
  • queryForLong
    Perform a query whose result should be a single long-integer value.
  • rollback
    Roll back all changes since the savepoint was created. If savePoint is null then roll back all outst
  • queryForLong,
  • rollback,
  • delete,
  • isTableExists,
  • queryForOne,
  • update,
  • releaseSavePoint

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • Path (java.nio.file)
  • JButton (javax.swing)
  • JCheckBox (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Runner (org.openjdk.jmh.runner)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now