Examples of OCCatalogManager


Examples of com.ipc.oce.objects.OCCatalogManager

   * @throws JIException
   */
  public OCCatalogManager getCatalogManager(String catalogName) throws JIException {
    OCCatalogCollection collection = getCatalogCollection();
    try {
      OCCatalogManager manager = collection.getCatalog(catalogName);
      return manager;
    } catch (JIException e) {
      getErrorListener().onError(this, e);
      throw e;
    }
View Full Code Here

Examples of com.ipc.oce.objects.OCCatalogManager

    return app;
  }

  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.OCCatalogManager

*/
public class CatalogParent extends BasicTest {

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

Examples of com.ipc.oce.objects.OCCatalogManager

          System.out.println("Object " + ocObject.toString() + " has error");
        }
       
      });
     
      OCCatalogManager catManager = app.getCatalogManager("Валюты1");
      catManager.emptyRef();
     
    } catch (JIException e) {
     
      e.printStackTrace();
    }
View Full Code Here

Examples of com.ipc.oce.objects.OCCatalogManager

    assertTrue(di instanceof String);
  }

  @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.OCCatalogManager

    OCCatalogRef ref = var.value(OCCatalogRef.class);
  }

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

Examples of com.ipc.oce.objects.OCCatalogManager

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

Examples of com.ipc.oce.objects.OCCatalogManager

  @Produces("text/xml")
  @Path("{catalogName}")
  public String getCatalog(@PathParam("catalogName") String catalogName) throws IOException, ConfigurationException, JIException {
    OCApp app = getApplication();
    System.out.println(catalogName);
    OCCatalogManager manager = null;
    try {
      manager = app.getCatalogManager(catalogName);
    } catch (JIException e) {
      // TODO тут нужно как-то обрабатывать
      throw e;
    }
    OCCatalogSelection selection = manager.select();
    StringBuffer sb = new StringBuffer(4096);
    OCXDTOSerializer serializer = app.getXDTOSerializer();
    while(selection.next()) {
      OCCatalogObject object = selection.getObject();
      sb.append(serializer.writeXML(object));
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.