Package java.sql

Examples of java.sql.Ref


            if (agent_.loggingEnabled()) {
                agent_.logWriter_.traceEntry(this, "getRef", column);
            }
            checkGetterPreconditions(column, "getRef");
            Ref result = isNull(column) ? null : cursor_.getRef(column);
            if (true) {
                throw new SqlException(agent_.logWriter_,
                    new ClientMessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED));
            }
            if (agent_.loggingEnabled()) {
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

        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

    }

    public void testSetRef() throws SQLException {
        BaseRowSetImpl brs = new BaseRowSetImpl();
        brs.initParams();
        Ref r = new MockRef();
        brs.setRef(1, r);
        Object[] params = brs.getParams();
        assertNotNull(params);
        assertEquals(1, params.length);
        assertTrue(r != params[0]);
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

      try {
        OCVariant variant = selection.getValue(paramInt);
        Object o = variant.value();
        if (o != null) {
          if (o instanceof _OCCommonRef) {
            Ref ref = new OCERef((_OCCommonRef) o);
            res = ref.toString();
          } else {
            res = o.toString();
          }
        }
      } catch (JIException e1) {
View Full Code Here

  }

 
  public Ref getRef(int paramInt) throws SQLException {
    paramInt--;
    Ref ref = null;
   
    try {
      Object o = selection.getValue(paramInt).value();
      if (o instanceof _OCCommonRef) {
        ref = new OCERef((_OCCommonRef) o);
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.