Package it.highwaytech.broker

Examples of it.highwaytech.broker.XMLCommand


    if (xQuery != null) {
      qr = find(connection, theDb, xQuery, "", ServerCommand.find_SORT, adjacency, 0, null);
      docNumber = getNumDoc(connection, theDb, qr, 0);
    }
    if (docNumber != -1) {
      XMLCommand theCommandLoad = new XMLCommand(XMLCommand.LoadDocument, XMLCommand.LoadDocument_Lock, docNumber);
      String xDoc = XMLCommand(connection, theDb, theCommandLoad.toString());
      theLock = XMLCommand.getLockCode(xDoc);
    }

    XMLCommand theCommand = new XMLCommand(XMLCommand.SaveDocument, XMLCommand.SaveDocument_Save, docNumber, xmlToInsert, thePne, thePnce, theLock);
    String result = "";
    result = XMLCommand(connection, theDb, theCommand.toString());
    if (result.indexOf("dtl") == -1) {
      throw new XWException("An Error occurred while processing insert/update");
    }
  }
View Full Code Here


   */
  public int insert(String xmlToInsert) throws SQLException, XWException {
    QueryResult qr = null;
    int docNumber = -1;
    String theLock = "";
    XMLCommand theCommand = new XMLCommand(XMLCommand.SaveDocument, XMLCommand.SaveDocument_Save, docNumber, xmlToInsert, thePne, thePnce, theLock);
    String result = "";
    result = XMLCommand(connection, theDb, theCommand.toString());
    int newNrecord = Integer.parseInt(XMLCommand.getDval(result, "ndoc"));
    if (result.indexOf("dtl") == -1) {
      throw new XWException("An Error occurred while processing insert");
    }
    return newNrecord;
View Full Code Here

   * @see com.regesta.framework.xw.XMLEngine#executeUpdateByDocNumber(java.lang.String, int)
   */
  public void executeUpdateByDocNumber(String xmlToInsert, int docNumber) throws SQLException, XWException {
    String theLock = "";
    if (docNumber != -1) {
      XMLCommand theCommandLoad = new XMLCommand(XMLCommand.LoadDocument, XMLCommand.LoadDocument_Lock, docNumber);
      String xDoc = XMLCommand(connection, theDb, theCommandLoad.toString());
      theLock = XMLCommand.getLockCode(xDoc);
    }
    XMLCommand theCommand = new XMLCommand(XMLCommand.SaveDocument, XMLCommand.SaveDocument_Save, docNumber, xmlToInsert, thePne, thePnce, theLock);
    String result = "";
    result = XMLCommand(connection, theDb, theCommand.toString());
    if (result.indexOf("dtl") == -1) {
      throw new XWException("An Error occurred while processing insert/update");
    }
  }
View Full Code Here

  /**
   * @deprecated
   * */
  public String getXMLFromNumDoc(int numDoc) throws SQLException, XWException {

    XMLCommand theCommandLoad = new XMLCommand(XMLCommand.LoadDocument, XMLCommand.LoadDocument, numDoc);
    String xDoc = XMLCommand(connection, theDb, theCommandLoad.toString());
    return xDoc;
  }
View Full Code Here

TOP

Related Classes of it.highwaytech.broker.XMLCommand

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.