Exemplo n.º 1
0
  /**
   * Returns an <code>Object</code> representing the SQL structured type to which this <code>
   * SerialRef</code> object refers.
   *
   * @return an object instance resolved from the Ref reference
   * @throws SerialException if an error is encountered in the reference resolution
   */
  public Object getObject() throws SerialException {

    if (reference != null) {
      try {
        return reference.getObject();
      } catch (SQLException e) {
        throw new SerialException("SQLException: " + e.getMessage());
      }
    }

    if (object != null) {
      return object;
    }

    throw new SerialException("The object is not set");
  }