Package com.j256.ormlite.support

Examples of com.j256.ormlite.support.ConnectionSource.releaseConnection()


    foreignForeign.id = id;
    foreignForeign.stuff = stuff;
    expect(
        connection.queryForOne(isA(String.class), isA(Object[].class), isA(FieldType[].class),
            isA(GenericRowMapper.class))).andReturn(foreignForeign);
    connectionSource.releaseConnection(connection);
    DatabaseResults results = createMock(DatabaseResults.class);
    ForeignAutoRefresh foreign = new ForeignAutoRefresh();
    replay(results, connectionSource, connection);
    FieldType fieldType =
        FieldType.createFieldType(connectionSource, ForeignAutoRefresh.class.getSimpleName(), field,
View Full Code Here


    conn.commit(savePoint);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
    connectionSource.clearSpecialConnection(conn);
    connectionSource.releaseConnection(conn);
    replay(connectionSource, conn, savePoint);
    TransactionManager tm = new TransactionManager(connectionSource);
    tm.callInTransaction(new Callable<Void>() {
      public Void call() throws Exception {
        return null;
View Full Code Here

    conn.commit(null);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
    connectionSource.clearSpecialConnection(conn);
    connectionSource.releaseConnection(conn);
    replay(connectionSource, conn);
    TransactionManager tm = new TransactionManager(connectionSource);
    tm.callInTransaction(new Callable<Void>() {
      public Void call() throws Exception {
        return null;
View Full Code Here

    conn.rollback(savePoint);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
    connectionSource.clearSpecialConnection(conn);
    connectionSource.releaseConnection(conn);
    replay(connectionSource, conn, savePoint);
    TransactionManager tm = new TransactionManager(connectionSource);
    try {
      tm.callInTransaction(new Callable<Void>() {
        public Void call() throws Exception {
View Full Code Here

    conn.rollback(null);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
    connectionSource.clearSpecialConnection(conn);
    connectionSource.releaseConnection(conn);
    replay(connectionSource, conn);
    TransactionManager tm = new TransactionManager(connectionSource);
    try {
      tm.callInTransaction(new Callable<Void>() {
        public Void call() throws Exception {
View Full Code Here

    conn.rollback(savePoint);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
    connectionSource.clearSpecialConnection(conn);
    connectionSource.releaseConnection(conn);
    replay(connectionSource, conn, savePoint);
    TransactionManager tm = new TransactionManager(connectionSource);
    try {
      tm.callInTransaction(new Callable<Void>() {
        public Void call() throws Exception {
View Full Code Here

    conn.commit(savePoint);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
    connectionSource.clearSpecialConnection(conn);
    connectionSource.releaseConnection(conn);
    replay(connectionSource, conn, savePoint);
    TransactionManager tm = new TransactionManager(connectionSource);
    tm.callInTransaction(new Callable<Void>() {
      public Void call() throws Exception {
        return null;
View Full Code Here

    conn.setAutoCommit(true);
    expect(connectionSource.getDatabaseType()).andReturn(databaseType);
    expect(connectionSource.getReadWriteConnection()).andReturn(conn);
    expect(connectionSource.saveSpecialConnection(conn)).andReturn(true);
    connectionSource.clearSpecialConnection(conn);
    connectionSource.releaseConnection(conn);
    replay(connectionSource, conn, savePoint);
    TransactionManager tm = new TransactionManager(connectionSource);
    tm.callInTransaction(new Callable<Void>() {
      public Void call() throws Exception {
        return null;
View Full Code Here

            assertEquals(0, ((FieldType[]) args[2]).length);
            return stmt;
          }
        }).anyTimes();
    expect(stmt.runUpdate()).andReturn(0).anyTimes();
    connectionSource.releaseConnection(conn);
    expectLastCall().anyTimes();
    stmt.close();
    expectLastCall().anyTimes();
    replay(connectionSource, conn, stmt);
    TableUtils.createTable(connectionSource, Index.class);
View Full Code Here

            return stmt;
          }
        })
        .anyTimes();
    expect(stmt.runUpdate()).andReturn(0).anyTimes();
    connectionSource.releaseConnection(conn);
    expectLastCall().anyTimes();
    stmt.close();
    expectLastCall().anyTimes();
    replay(connectionSource, conn, stmt);
    TableUtils.createTable(connectionSource, ComboIndex.class);
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.