Package com.esri.gpt.framework.sql

Examples of com.esri.gpt.framework.sql.IClobMutator


    if (docUuid.length() > 0) {
      String sSql = "SELECT XML FROM "+getResourceDataTableName()+" WHERE DOCUUID=?";
      logExpression(sSql);
      ManagedConnection mc = returnConnection();
      Connection con = mc.getJdbcConnection();
      IClobMutator cm = mc.getClobMutator();
      st = con.prepareStatement(sSql);
      st.setString(1,docUuid);
      ResultSet rs = st.executeQuery();
      if (rs.next()) {
        return Val.chkStr(cm.get(rs,1));
      }
    }
  } finally {
    closeStatement(st);
  }
View Full Code Here


    st.setString(1,uuid);
    rs = st.executeQuery();
    if (rs.next()) {
      try {if (rs != null) rs.close();} catch (Exception ef) {}
      try {if (st != null) st.close();} catch (Exception ef) {}
      IClobMutator cm = mc.getClobMutator();
      sql = "SELECT XML FROM "+metaTable+" WHERE DOCUUID=?";
      st = con.prepareStatement(sql);
      st.setString(1,uuid);
      rs = st.executeQuery();
      if (rs.next()) {
        return cm.get(rs,1);
      }
    }

  } finally {
    try {if (rs != null) rs.close();} catch (Exception ef) {}
View Full Code Here

    try {
      this.authorize(request, uuid);

      ManagedConnection mc = returnConnection();
      Connection con = mc.getJdbcConnection();
      IClobMutator cm = mc.getClobMutator();

      StringBuffer sql = new StringBuffer();
      sql.append("SELECT UPDATEDATE");
      sql.append(" FROM ").append(getResourceTableName()).append(" WHERE DOCUUID=?");
      logExpression(sql.toString());
      st = con.prepareStatement(sql.toString());
      st.setString(1, uuid);
      ResultSet rs = st.executeQuery();
      if (rs.next()) {
        request.setUpdateTimestamp(rs.getTimestamp(1));
        request.setActionStatus(ImsRequest.ACTION_STATUS_OK);

        closeStatement(st);

        sql = new StringBuffer();
        sql.append("SELECT XML");
        sql.append(" FROM ").append(getResourceDataTableName()).append(" WHERE DOCUUID=?");
        st = con.prepareStatement(sql.toString());
        st.setString(1, uuid);
        rs = st.executeQuery();

        if (rs.next()) {
          request.setXml(cm.get(rs, 1));
        }
      }

    } finally {
      closeStatement(st);
View Full Code Here

      sbSql.append("WHERE UPPER(UUID)=?");

      // establish the connection
      ManagedConnection mc = returnConnection();
      Connection con = mc.getJdbcConnection();
      IClobMutator cm = mc.getClobMutator();

      st = con.prepareStatement(sbSql.toString());
      int n = 1;
     
      // TODO: In rare cases setStream doesn't work correctly - looks like stream
      // is being cut and not flushed entirelly, thus making problems with reading
      // the report.
      // In this case old good 'set' is being used until further investigation
      //cm.setStream(st, n++, report, length);
      String sReport = "";
      try {
        sReport = convertReportIntoString(report);
      } catch (IOException ex) {
      } finally {
        try {
          report.close();
        } catch (IOException ex) {}
      }
     
      cm.set(st, n++, sReport);
     
      st.setString(n++, record.getUuid());

      st.executeUpdate();
     
View Full Code Here

      String sql = sb.toString();
      LOGGER.finest(sql);
     
      ManagedConnection mc = context.getConnectionBroker().returnConnection("");
      Connection con = mc.getJdbcConnection();
      IClobMutator mutator = mc.getClobMutator();
     
      st = con.prepareStatement(sql);
      ResultSet rs = st.executeQuery();
      if (Thread.interrupted()) return;
      while (rs.next()) {
View Full Code Here

      // execute the query
      logExpression(sbSql.toString());
      ResultSet rs = st.executeQuery();

      if (rs.next()) {
        IClobMutator cm = mc.getClobMutator();
        InputStream in = null;
        try {
          in = cm.getStream(rs, 1);
          template.transform(new StreamSource(in), new StreamResult(writer), mapParams);
        } finally {
          if (in!=null) {
            try {
              in.close();
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.sql.IClobMutator

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.