Examples of OCCatalogRef


Examples of com.ipc.oce.objects.OCCatalogRef

      case OCType.OCT_REF_DOCUMENT: {
        res = new OCDocumentRef(object);
        break;
      }
      case OCType.OCT_REF_CATALOG: {
        res = new OCCatalogRef(object);
        break;
      }
      case OCType.OCT_REF_CHART_OF_ACCOUNT: {
        res = new OCChartOfAccountsRef(object);
        break;
View Full Code Here

Examples of com.ipc.oce.objects.OCCatalogRef

  }

  public static void main(String[] args) throws IOException, ConfigurationException, JIException {
    OCApp app = getConnection();
    OCCatalogManager manager = app.getCatalogManager("Банки");
    OCCatalogRef ref = manager.findByDescription("Г МОСКВА");
    OCCatalogSelection selection = manager.selectHierarchically(ref);
    while (selection.next()) {
      int level = selection.getLevelInSelection();
      if (level==0) {
        System.out.println(selection.getCode()+" "+selection.getDescription());
View Full Code Here

Examples of com.ipc.oce.objects.OCCatalogRef

  @Test
  public void getCatalogSuperParent() throws JIException {
    OCCatalogManager manager = app.getCatalogManager("Валюты");
    OCCatalogSelection selection = manager.select();
    selection.next();
    OCCatalogRef ref = selection.getRef();
   
    assertTrue(!ref.isEmpty());
   
    OCCatalogRef parRef = ref.getParent();
    assertTrue(parRef.isEmpty());
  }
View Full Code Here

Examples of com.ipc.oce.objects.OCCatalogRef

  @Test(expected = IllegalStateException.class)
  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.objects.OCCatalogRef

  }

  @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.objects.OCCatalogRef

  @Test
  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);
View Full Code Here

Examples of com.ipc.oce.objects.OCCatalogRef

    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();
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.