Package com.ipc.oce

Examples of com.ipc.oce.OCApp


   * @param docDate (дата документа). ВНИМАНИЕ: Используется точное сравнение (=)
   * @return Ссылка на документ с заданным домером и у конкретной датой
   * @throws JIException
   */
  public OCDocumentRef findByNumber2(String number, Date docDate) throws JIException {
    OCApp instance = OCApp.getInstance(getAssociatedSessionID());
   
    // prepare query
    OCQuery query = instance.newQuery(
        "SELECT Doc.Ref FROM Document."
        + managerName
        + " AS Doc WHERE Doc.Number = &NUM_A AND Doc.Date = &DATE_A");
   
    // set parameters
View Full Code Here


   * @param number номер документа
   * @return Массив ссылок на документы. (С одним номером может быть несколько документов в различных периодах)
   * @throws JIException
   */
  public OCDocumentRef[] findByNumber2(String number) throws JIException {
    OCApp instance = OCApp.getInstance(getAssociatedSessionID());
    OCQuery query = instance.newQuery("SELECT Doc.Ref FROM Document." + managerName + " AS Doc WHERE Doc.Number = &NUM_A");
   
    query.setParameter("NUM_A", new OCVariant(number));
   
    OCQueryResult result = query.execute();
    OCQueryResultSelection selection = result.choose();
View Full Code Here

    super(aDispatch);
  }

  public String getInnerString() throws JIException {
    if (innerString == null) {
      OCApp app = OCApp.getInstance(getAssociatedSessionID());
      innerString = app.valueToStringInternal(this);
    }
    return innerString;
  }
View Full Code Here

    super(aDispatch);
    setupSynonymParser();
  }
 
  private void setupSynonymParser() {
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
    synonymParser = app.getTypeSynonymParser();
  }
View Full Code Here

   * @return
   * @throws JIException
   */
  public String getXMLType() throws JIException {
    if (xmlTypeName == null) {
      OCApp app = OCApp.getInstance(getAssociatedSessionID());
      xmlTypeName = app.getXMLType(this).getTypeName();
    }
    return xmlTypeName;
  }
View Full Code Here

   * @param encoding установка кодировки в заголовке вывода xml
   * @return строковое представление xsd
   * @throws JIException
   */
  public String getSchemaAsString(String encoding) throws JIException{
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
   
    OCDOMDocument document = getDOMDocument();
   
    OCXMLWriter xmlWriter = app.newXMLWriter();
    xmlWriter.setString(encoding);
   
    OCDOMWriter domWriter = app.newDOMWriter();
    domWriter.write(document, xmlWriter);
   
    String res = xmlWriter.close();
   
    return res;
View Full Code Here

   * @param object объект для сериализации
   * @return строковое представление XML.
   * @throws JIException
   */
  public String writeXML(OCObject object) throws JIException {
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
    OCXMLWriter writer = app.newXMLWriter();
    writer.setString("UTF-8");
    writeXML(writer, object);
    return writer.close();
  }
View Full Code Here

   * @param xml - строка XML.
   * @return OCObject
   * @throws JIException
   */
  public OCObject readXML(String xml) throws JIException {
    OCApp app = OCApp.getInstance(getAssociatedSessionID());
    OCXMLReader reader = app.newXMLReader();
    reader.setString(xml);
    return readXML(reader);
  }
View Full Code Here

    ApplicationDriver driver = ApplicationDriver
        .loadDriver((String) configuration
            .get(PropertiesReader.OCE_CFG_DRIVER));
   
    // step 3 create OCApp instance and set driver
    OCApp app = OCApp.getNewInstance();
    app.setApplicationDriver(driver);
   
    try{
      app.connect(configuration);
      // do some useful things
      //...
      System.out.println("Computer name: "+app.getComputerName());
    }catch(Exception e){
     
    }finally{
      try {
        app.exit();
      } catch (JIException e) {
       
      }
    }
View Full Code Here

    PropertiesReader pr = new PropertiesReader(new File("C:\\Developer\\Projects\\hel_default\\OCExportWeb\\WebContent\\WEB-INF\\oce.properties"));
    Properties configuration = pr.getPropertiesForInstance("inst01");
    ApplicationDriver driver = ApplicationDriver
        .loadDriver((String) configuration
            .get(PropertiesReader.OCE_CFG_DRIVER));
    OCApp app = OCApp.getNewInstance();
    app.setApplicationDriver(driver);
    app.connect(configuration);
    return app;
  }
View Full Code Here

TOP

Related Classes of com.ipc.oce.OCApp

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.