Exemplo n.º 1
0
 /**
  * Constructs a <code>SerialRef</code> object from the given <code>Ref</code> object.
  *
  * @param ref a Ref object; cannot be <code>null</code>
  * @throws SQLException if a database access occurs; if <code>ref</code> is <code>null</code>; or
  *     if the <code>Ref</code> object returns a <code>null</code> value base type name.
  * @throws SerialException if an error occurs serializing the <code>Ref</code> object
  */
 public SerialRef(Ref ref) throws SerialException, SQLException {
   if (ref == null) {
     throw new SQLException("Cannot instantiate a SerialRef object " + "with a null Ref object");
   }
   reference = ref;
   object = ref;
   if (ref.getBaseTypeName() == null) {
     throw new SQLException(
         "Cannot instantiate a SerialRef object " + "that returns a null base type name");
   } else {
     baseTypeName = new String(ref.getBaseTypeName());
   }
 }