Examples of OCVariant


Examples of com.ipc.oce.OCVariant

  public void ocobject2int() throws JIException {
    OCCatalogManager manager = app.getCatalogManager("Валюты");
    OCCatalogSelection selection = manager.select();
    selection.next();
    OCCatalogRef ref = selection.getRef();
    OCVariant var = new OCVariant(ref);

    Integer ocObj = var.value(Integer.class);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

    Integer ocObj = var.value(Integer.class);
  }

  @Test(expected = IllegalStateException.class)
  public void int2ocobject() throws JIException {
    OCVariant var = new OCVariant(new Integer(10));
    OCCatalogRef ref = var.value(OCCatalogRef.class);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

  public void ocobject2ocrefAndViceversa() throws JIException {
    OCCatalogManager manager = app.getCatalogManager("Валюты");
    OCCatalogSelection selection = manager.select();
    selection.next();
    OCCatalogRef ref = selection.getRef();
    OCVariant var = new OCVariant(ref);
    OCCatalogObject ocObj = var.value(OCCatalogObject.class);
    assertTrue(ocObj instanceof OCCatalogObject);

    OCVariant var2 = new OCVariant(ocObj);
    assertTrue(var2.value(OCCatalogRef.class) instanceof OCCatalogRef);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

  + "       СГРУППИРОВАТЬ ПО "
  + "         Расходы.Период) КАК РасходыСвернуто "
  + "       ПО ДоходыСвернуто.Период = РасходыСвернуто.Период) КАК ВложенныйЗапрос";
    query.setText(queryText);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    query.setParameter("НачалоПериода", new OCVariant(sdf.parse("2009-01-01")));
    query.setParameter("КонецПериода", new OCVariant(sdf.parse("2010-01-01")));
   
    OCCatalogManager catMan = app.getCatalogManager("Организации");
    OCCatalogSelection catSel = catMan.select();
    catSel.next();
    OCCatalogRef orgRef = catSel.getRef();
   
    query.setParameter("Организация", new OCVariant(orgRef));
   
    OCQueryResult result = query.execute();
    OCValueTable table = result.unload();
    System.out.println(table.listColumns());
   
View Full Code Here

Examples of com.ipc.oce.OCVariant

    assertTrue(eDWM.toString().equals(o1.toString()));
  }

  @Test
  public void typeComparision() throws JIException {
    OCVariant variant = null;
    Object o = null;
    /*
     * OCArray vList = app.newArray(); variant = new OCVariant(vList); o =
     * variant.value(); assertTrue("OCArray instance error", o instanceof
     * OCArray);
     *
     * OCStructure structure = app.newStructure(); variant = new
     * OCVariant(structure); o = variant.value(); assertTrue(o instanceof
     * OCStructure);
     */

    OCDocumentManager manager1 = app
        .getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentSelection selection1 = manager1.select();
    selection1.next();
    OCDocumentRef ref1 = selection1.getRef();
    OCDocumentObject obj1 = ref1.getObject();
    variant = new OCVariant(obj1);
    o = variant.value();

    assertTrue("Not " + OCDocumentObject.class.getName() + " it is "
        + o.getClass().getName(), o instanceof OCDocumentObject);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * @param attributeName
   * @return
   * @throws JIException
   */
  public OCVariant getAttributeValue(String attributeName) throws JIException {
    return new OCVariant(get(attributeName));
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * @param name - имя параметра.
   * @return OCVariant, Произвольный
   * @throws JIException
   */
  public OCVariant getParameter(String name) throws JIException {
    return new OCVariant(get(name));
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * @param index - Индекс параметра.
   * @return OCVariant, Произвольный
   * @throws JIException
   */
  public OCVariant getParameter(int index) throws JIException {
    return new OCVariant(callMethodA("Get", new JIVariant(index))[0]);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * Значение параметра макета.
   * @return
   * @throws JIException
   */
  public OCVariant getValue() throws JIException {
    return new OCVariant(get("Value"));
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * Имя параметра макета.
   * @return
   * @throws JIException
   */
  public OCVariant getName() throws JIException {
    return new OCVariant(get("Name"));
  }
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.