Package java.sql

Examples of java.sql.Struct


    if (obj == null) {
      setLastValueNull(true);
      return null;
    }
    if (obj instanceof Struct) {
      Struct struct = (Struct) obj;
      Map map = getTypeMap();
      Class class1 = (Class) map.get(struct.getSQLTypeName());
      if (class1 != null) {
        SQLData sqldata = null;
        try {
          sqldata = (SQLData) class1.newInstance();
        } catch (InstantiationException instantiationexception) {
          throw new SQLException("Unable to instantiate: " + instantiationexception.getMessage());
        } catch (IllegalAccessException illegalaccessexception) {
          throw new SQLException("Unable to instantiate: " + illegalaccessexception.getMessage());
        }
        Object aobj[] = struct.getAttributes(map);
        SQLInputImpl sqlinputimpl = new SQLInputImpl(aobj, map);
        sqldata.readSQL(sqlinputimpl, struct.getSQLTypeName());
        return sqldata;
      }
    }
    return obj;
  }
View Full Code Here


    if (obj == null) {
      setLastValueNull(true);
      return null;
    }
    if (obj instanceof Struct) {
      Struct struct = (Struct) obj;
      Class class1 = (Class) map.get(struct.getSQLTypeName());
      if (class1 != null) {
        SQLData sqldata = null;
        try {
          sqldata = (SQLData) class1.newInstance();
        } catch (InstantiationException instantiationexception) {
          throw new SQLException("Unable to instantiate: " + instantiationexception.getMessage());
        } catch (IllegalAccessException illegalaccessexception) {
          throw new SQLException("Unable to instantiate: " + illegalaccessexception.getMessage());
        }
        Object aobj[] = struct.getAttributes(map);
        SQLInputImpl sqlinputimpl = new SQLInputImpl(aobj, map);
        sqldata.readSQL(sqlinputimpl, struct.getSQLTypeName());
        return sqldata;
      }
    }
    return obj;
  }
View Full Code Here

    }

    @Override
    public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
        FilterChainImpl chain = createChain();
        Struct value = chain.connection_createStruct(this, typeName, attributes);
        recycleFilterChain(chain);
        return value;
    }
View Full Code Here

    this.connection.setClientInfo(name, value);
  }

  public Struct createStruct(String typeName, Object[] attributes)
      throws SQLException {
    Struct result = null;
    checkClosed();
    try {
      result = this.connection.createStruct(typeName, attributes);
    } catch (SQLException e) {
      throw markPossiblyBroken(e);
View Full Code Here

TOP

Related Classes of java.sql.Struct

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.