Examples of OCDocumentSelection


Examples of com.ipc.oce.objects.OCDocumentSelection

    app.exit();
  }
 
  public OCDocumentObject getRandomDocument(String docName) throws JIException {
    OCDocumentManager manager = app.getDocumentManager(docName);
    OCDocumentSelection selection = manager.select();
    selection.next();
    return selection.getObject();
  }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentSelection

 
  @Test
  public void select() throws JIException {
   
    OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentSelection selection = manager.select();
    int stopFactor = 5000;
    while (selection.next() && (stopFactor--) != 0) {
      selection.isDeletionMark();
      selection.isPosted();
      assertTrue(selection.getNumberAsString().equals(selection.getRef().getNumberAsString()));
    }
   
  }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentSelection

  @Test
  public void selectWithDate() throws JIException, ParseException {
    OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
    Date date = (new SimpleDateFormat("yyyy")).parse("2009");
    Date date2 = (new SimpleDateFormat("yyyy")).parse("2010");
    OCDocumentSelection selection = manager.select(date, date2); // select all docs in 2009
    Calendar cal = Calendar.getInstance();
    while (selection.next()) {
      Date selDate = selection.getDate();
      //System.out.println(selDate);
      cal.setTime(selDate);
      int year = cal.get(Calendar.YEAR);
      assertTrue(year == 2009);
    }
   
    selection = manager.select(date);
    while (selection.next()) {
      Date selDate = selection.getDate();
      //System.out.println(selDate);
      cal.setTime(selDate);
      int year = cal.get(Calendar.YEAR);
      assertTrue(year >= 2009);
    }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentSelection

 
  @Test
  public void belongToSequences() throws JIException, ParseException {
    System.out.println(" === belong ===");
    OCDocumentManager manager = app.getDocumentManager("ПриемНаРаботуВОрганизацию");
    OCDocumentSelection selection = manager.select();
    selection.next();
   
    OCSequenceRecordSetCollection collection = selection.getObject().getBelongingToSequences();
    System.out.println(collection + " size " + collection.size());
    for (OCSequenceRecordSet set : collection) {
      System.out.println("\t" + set + " size " + set.size());
      for (OCSequenceRecord record : set) {
        System.out.println("\t\t" + record);
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentSelection

  }
 
  @Test
  public void listAttrNames() throws JIException {
    OCDocumentManager manager = app.getDocumentManager("ПриемНаРаботуВОрганизацию");
    OCDocumentSelection selection = manager.select();
    selection.next();
    OCDocumentObject object = selection.getObject();
    System.out.println(object.getMetadata().getAttributesName());
    System.out.println(object.getMetadata().getTabularSectionsName());
  }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentSelection

public class GetSomeUUID extends BasicTest {

  @Test
  public void getDocumentUUID() throws JIException {
    OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentSelection selection = manager.select();
    selection.next();
    OCDocumentRef ref = selection.getRef();
    System.out.println(ref.getRefFullName() + " " + ref.getUUID().toString());
  }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentSelection

public class JUXDTO extends BasicTest {

  @Test
  public void object2xmlAndViceversa() throws JIException {
    OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentSelection sel = manager.select();
    sel.next();
    OCDocumentObject documentObject = sel.getRef().getObject();
    String originalDocNum = documentObject.getNumberAsString();
    boolean originalIsNew = documentObject.isNew();
   
    OCXDTOSerializer serializer = app.getXDTOSerializer();
    OCXMLWriter writer = app.newXMLWriter();
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentSelection

     * 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 "
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.