Package com.esri.gpt.framework.sql

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


    PreparedStatement st = null;

    if (record != null && UuidUtil.isUuid(record.getUuid())) {
      try {
        // establish the connection
        ManagedConnection mc = returnConnection();
        Connection con = mc.getJdbcConnection();

        StringBuilder sbSql = new StringBuilder();
        sbSql.append("UPDATE ").append(getHarvestingTableName()).append(" SET ");
        sbSql.append("LASTSYNCDATE=? ");
        sbSql.append("where DOCUUID=?");
View Full Code Here


  PreparedStatement st = null;
  ResultSet rs = null;
  try {
    String adminTable = this.getRequestContext().getCatalogConfiguration().getResourceTableName();
    String metaTable = this.getRequestContext().getCatalogConfiguration().getResourceDataTableName();
    ManagedConnection mc = this.getRequestContext().getConnectionBroker().returnConnection("");
    Connection con = mc.getJdbcConnection();

    String sql = "SELECT DOCUUID FROM "+adminTable+" WHERE DOCUUID=?";
    st = con.prepareStatement(sql);
    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()) {
View Full Code Here

*/
private String readStatus(String uuid) throws SQLException {
  PreparedStatement st = null;
  try {
    String adminTable = this.getRequestContext().getCatalogConfiguration().getResourceTableName();
    ManagedConnection mc = this.getRequestContext().getConnectionBroker().returnConnection("");
    Connection con = mc.getJdbcConnection();
    String sql = "SELECT APPROVALSTATUS FROM "+adminTable+" WHERE DOCUUID=?";
    st = con.prepareStatement(sql);
    st.setString(1,uuid);
    ResultSet rs = st.executeQuery();
    if (rs.next()) {
View Full Code Here

      }
      sbSql.append(" ORDER BY ");
      sbSql.append(sOrderByColumn).append(" ").append(sOrderByDir);

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

      // prepare the statements
      int n = 0;
      st = con.prepareStatement(sbSql.toString());
      stCount = con.prepareStatement(sbCount.toString());
View Full Code Here

      return "";
    }
  }

  private String findRecordOwner(String recordUuid) throws SQLException {
    ManagedConnection managedConnection = requestContext.getConnectionBroker().returnConnection("");
    Connection connection = null;
    PreparedStatement st = null;
    ResultSet rs = null;
   
    try {
      connection = managedConnection.getJdbcConnection();
     
      st = connection.prepareStatement("select OWNER from GPT_RESOURCE where DOCUUID=?");
      st.setString(1, recordUuid);
     
      rs = st.executeQuery();
View Full Code Here

      sbStmt.append(" WHERE HARVEST_ID=? AND JOB_STATUS='").append(JobStatus.Canceled.name().toUpperCase()).append("'");
    }


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

    // prepare statement
    st = con.prepareStatement(sbStmt.toString());

    int n = 1;
View Full Code Here

    sbStmt.append(" JOB_TYPE,CRITERIA,HARVEST_ID,SERVICE_ID) ");
    sbStmt.append(" VALUES (?,?,?,?,?,?,?,?)");


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

    // prepare statement
    st = con.prepareStatement(sbStmt.toString());

    // init statement
View Full Code Here

      sbSql.append("')");
      sbSql.append(") A");
      sbSql.append(")");

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

      // prepare statement
      stSelect = con.prepareStatement(sbSql.toString());

      // execute the query
View Full Code Here

* @throws SQLException if accessing database failed
*/
public void execute() throws SQLException {

  // establish the connection
  ManagedConnection mc = returnConnection();
  Connection con = mc.getJdbcConnection();
 
  // intitalize
  HjRecords records = getQueryResult().getRecords();
 
  HjRecord record = null;
View Full Code Here

  // intitalize
  PreparedStatement st = null;
  try {

    // establish the connection
    ManagedConnection mc = returnConnection();
    con = mc.getJdbcConnection();

    StringBuilder sbStmt = new StringBuilder();

    String serviceId = getActionCriteria().getHostAddress();
View Full Code Here

TOP

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

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.