Package java.sql

Examples of java.sql.Ref


   */
  public synchronized Ref getRef(String parameterName) throws SQLException {
    ResultSetInternalMethods rs = getOutputParameters(0); // definitely not going to be
    // from ?=

    Ref retValue = rs.getRef(fixParameterName(parameterName));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
  }
View Full Code Here


    }

    @Override
    public Ref getRef(int columnIndex) throws SQLException {
        FilterChainImpl chain = createChain();
        Ref value = chain.resultSet_getRef(this, columnIndex);
        recycleFilterChain(chain);
        return value;
    }
View Full Code Here

    }

    @Override
    public Ref getRef(String columnLabel) throws SQLException {
        FilterChainImpl chain = createChain();
        Ref value = chain.resultSet_getRef(this, columnLabel);
        recycleFilterChain(chain);
        return value;
    }
View Full Code Here

        assertNull(rs.getRef(1));
        assertTrue(rs.wasNull());
        assertNull(rs.getRef("column"));
        assertTrue(rs.wasNull());
        // Set what gets returned to something other than the default
        Ref ref = new SqlNullCheckedResultSetMockRef();
        rs2.setNullRef(ref);
        assertNotNull(rs.getRef(1));
        assertEquals(ref, rs.getRef(1));
        assertNotNull(rs.getRef("column"));
        assertEquals(ref, rs.getRef("column"));
View Full Code Here

     * Tests the setNullRef implementation.
     */
    public void testSetNullRef() throws SQLException {
        assertNull(rs2.getNullRef());
        // Set what gets returned to something other than the default
        Ref ref = new SqlNullCheckedResultSetMockRef();
        rs2.setNullRef(ref);
        assertNotNull(rs.getRef(1));
        assertEquals(ref, rs.getRef(1));
        assertNotNull(rs.getRef("column"));
        assertEquals(ref, rs.getRef("column"));
View Full Code Here

   * @see java.sql.CallableStatement#getRef(int)
   */
  public synchronized Ref getRef(int parameterIndex) throws SQLException {
    ResultSetInternalMethods rs = getOutputParameters(parameterIndex);

    Ref retValue = rs
        .getRef(mapOutputParameterIndexToRsIndex(parameterIndex));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
View Full Code Here

   */
  public synchronized Ref getRef(String parameterName) throws SQLException {
    ResultSetInternalMethods rs = getOutputParameters(0); // definitely not going to be
    // from ?=

    Ref retValue = rs.getRef(fixParameterName(parameterName));

    this.outputParamWasNull = rs.wasNull();

    return retValue;
  }
View Full Code Here

        // nop
      }
    });


    logParams.put("6", new Ref() {

      public void setObject(Object value) throws SQLException {

      }
View Full Code Here

    expect(mockArray.getBaseTypeName()).andThrow(new SQLException());
    replay(mockArray);

    logParams.put("5", mockArray);

    Ref mockSerialRef = createNiceMock(Ref.class);
    expect(mockSerialRef.getBaseTypeName()).andThrow(new SQLException());
    replay(mockSerialRef);
    logParams.put("6", mockSerialRef);

    // test proper replacement/escaping
    assertEquals("ID='123' AND FOO='?' and LALA=\"BOO\" NULL (blob of unknown length) (cblob of unknown length) (array of unknown type) (ref of unknown type) ?", PoolUtil.fillLogParams("ID=? AND FOO='?' and LALA=\"BOO\" ? ? ? ? ? ?", logParams));
View Full Code Here

TOP

Related Classes of java.sql.Ref

Copyright © 2018 www.massapicom. 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.