Package de.danet.an.util

Examples of de.danet.an.util.UniversalPrepStmt.executeUpdate()


            if (hasParameters()) {
                PreparedStatement ps
        = new UniversalPrepStmt (conn, sqlStatement);
                statement = ps;
                setParameters(ps);
                result = ps.executeUpdate();
            } else {
                statement = conn.createStatement();
                result = statement.executeUpdate(sqlStatement);
            }
            if (var != null) {
View Full Code Here


                    prepStmt = new UniversalPrepStmt
                        (ds, con, "INSERT INTO ActivityFinders (DBId, LocData) "
                         + "VALUES (?, ?)");
                    prepStmt.setLong(1, newIdx);
                    prepStmt.setBinary(2, finder);
                    prepStmt.executeUpdate();
                } finally {
                    JDBCUtil.closeAll (null, prepStmt, con);
                }
                finderByDBIdCache.put (new Long(newIdx), finder);
                dbIdByFinderCache.put (finder, new Long(newIdx));
View Full Code Here

       prepStmt.setLargeString(offset++, xpdl);
      prepStmt.setBinary(offset++, header);
      */
      prepStmt.setLargeString(offset++, null);
        prepStmt.setBinary(offset++, null);
      prepStmt.executeUpdate();
      //con.commit();
      // select
      offset = 1;
      prepStmt = new UniversalPrepStmt
    (con, "SELECT Header, Xpdl FROM ProcessDefinition "
View Full Code Here

      prepStmt.setString(offset++, "updatedunivPrepStmtTest");
      prepStmt.setLargeString(offset++, xpdl);
      prepStmt.setBinary(offset++, header);
      prepStmt.setLong (offset++, 1000000);
      //prepStmt.setString(offset++, "univPrepStmtPackage");
      prepStmt.executeUpdate();
      //con.commit();
      assertTrue(cleanup() == 1);
   } catch (SQLException sqle) {
      sqle.printStackTrace();
  } finally {
View Full Code Here

    private int cleanup() throws Exception {
  UniversalPrepStmt deletePrepStmt = new UniversalPrepStmt
      (con, "DELETE FROM ProcessDefinition WHERE"
       + " DBId = 1000000");
  return deletePrepStmt.executeUpdate();
    }

}
View Full Code Here

      prepStmt.setString(offset++, null); // PendingException
      prepStmt.setLong(offset++, null); // WaitOnProc
      prepStmt.setString(offset++, null); // WaitOnChan
      prepStmt.setInt(offset++, paFlags); // Flags
      // now execute
      prepStmt.executeUpdate();
      WfProcessEJB.updateDeadlines
    (ds, con, processPk, (Long)ctx.getPrimaryKey(),
     paDeadlines, false);
  } catch (IOException ioe) {
      logger.error (ioe.getMessage(), ioe);
View Full Code Here

                prepStmt.setString (offset++, paPendingException);
      }
      // for where statement
      prepStmt.setLong(offset++,
           ((Long)ctx.getPrimaryKey()).longValue());
      int rowCount = prepStmt.executeUpdate();
      if (rowCount == 0) {
    throw new NoSuchEntityException
        ("Storing row for DBId "
         + (Long)ctx.getPrimaryKey() + " failed.");
      }
View Full Code Here

      try {
    con = ds.getConnection();
    prepStmt = new UniversalPrepStmt
        (ds, con, "DELETE FROM SimpleAppl WHERE DBId = ?");
    prepStmt.setLong (1, instId);
    prepStmt.executeUpdate();
    if (logger.isDebugEnabled()) {
        logger.debug ("Removed application " + instId);
    }
      } finally {
    JDBCUtil.closeAll (null, prepStmt, con);
View Full Code Here

    prepStmt = new UniversalPrepStmt
        (ds, con,
         "UPDATE SimpleAppl SET InstData = ? WHERE DBId = ? ");
    prepStmt.setBinary (1, state);
    prepStmt.setLong (2, instId);
    if (prepStmt.executeUpdate() == 0) {
        throw new InvalidKeyException
      ("No application instance with key = " + instId);
    }
    if (logger.isDebugEnabled()) {
        logger.debug
View Full Code Here

                prepStmt = new UniversalPrepStmt
                    (ds, con,
                     "UPDATE SIMPLEAPPL SET RESOURCEKEY = ? WHERE DBID = ? ");
                prepStmt.setString (1, resourceKey);
                prepStmt.setLong (2, instId);
                if (prepStmt.executeUpdate() == 0) {
                    throw new InvalidKeyException
                        ("No application instance with key = " + instId);
                }
                if (logger.isDebugEnabled()) {
                    logger.debug
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.