Examples of JdbcDatabaseConnection


Examples of com.j256.ormlite.jdbc.JdbcDatabaseConnection

    return new Dictionary();
  }

  public Dictionary getRandom() {
    try {
      JdbcDatabaseConnection c = (JdbcDatabaseConnection) DicConnection.getInstance().getReadOnlyConnection();
      Connection conn = c.getInternalConnection();
      Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
      ResultSet result = stmt.executeQuery("select * from v_randomdic");
      result.first();
      return new Dictionary(result.getString(1), result.getString(2), result.getString(3), result.getString(4));
    } catch (SQLException e) {
View Full Code Here

Examples of com.j256.ormlite.jdbc.JdbcDatabaseConnection

  }

  @Override
  public void refreshModel() {
    try {
      JdbcDatabaseConnection c = (JdbcDatabaseConnection) DicConnection.getInstance().getReadOnlyConnection();
      Connection conn = c.getInternalConnection();
      Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

      result = stmt.executeQuery("SELECT * FROM " + tableName);
      rsmd = result.getMetaData();
      result.last();
View Full Code Here

Examples of com.j256.ormlite.jdbc.JdbcDatabaseConnection

    super(cs);
  }

  @Override
  protected WrappedConnection wrapConnection(DatabaseConnection connection) {
    JdbcDatabaseConnection conn = (JdbcDatabaseConnection) connection;
    WrappedJdbcConnection wrapped = new WrappedJdbcConnection(connection, conn.getInternalConnection());
    conn.setInternalConnection(wrapped.getConnectionProxy());
    return wrapped;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.