Package nexj.core.meta

Examples of nexj.core.meta.Metaclass.invoke()


        
         // Create it
         assertNull(context.beginTransaction());
        
         Metaclass testFPA = metadata.getMetaclass("TestFPA");
         Instance a = (Instance)testFPA.invoke("new");
        
         a.setValue("data", new Binary("Creation data.".getBytes("utf-8")));
        
         commit(context);
       
View Full Code Here


         commit(context);

         // Create it (test that the read operation doesn't add the not-found instance to the invocation context)
         assertNull(context.beginTransaction());

         a = (Instance)testFPA.invoke("new");
         a.setOID(oidA);
         a.setValue("data", new Binary("Creation data #2.".getBytes("utf-8")));

         commit(context);
      }
View Full Code Here

        
         // Create it
         assertNull(context.beginTransaction());
        
         Metaclass testFPA = metadata.getMetaclass("TestFPA");
         Instance a = (Instance)testFPA.invoke("new");
        
         a.setValue("data", new Binary("Creation data for 'a'.".getBytes("utf-8")));
        
         Instance b = (Instance)testFPA.invoke("new");
        
View Full Code Here

         Metaclass testFPA = metadata.getMetaclass("TestFPA");
         Instance a = (Instance)testFPA.invoke("new");
        
         a.setValue("data", new Binary("Creation data for 'a'.".getBytes("utf-8")));
        
         Instance b = (Instance)testFPA.invoke("new");
        
         b.setValue("data", new Binary("Creation data for 'b'.".getBytes("utf-8")));
        
         commit(context);
       
View Full Code Here

   {
      Metaclass domesticAnimalClass = m_metadata.getMetaclass("Animal");
      InstanceArrayList list, collection;
      Instance inst, inst2;

      list = (InstanceArrayList)domesticAnimalClass.invoke("read", new Object[]{
         parse("(commonName (licenses name))"), null, null, null, null, null
      });

      assertEquals(4, list.size());
      inst = list.getInstance(0);
View Full Code Here

      tobj.setValue("trace", "");
      tobj.setValue("throwInnerEx", Boolean.FALSE);
      tobj.setValue("throwOuterEx", Boolean.FALSE);
      tobj.setValue("throwUncaughtEx", Boolean.FALSE);

      Instance instance = (Instance)serviceClass.invoke("invoke", new Object[]{"TryFinally", tobj, null});

      assertEquals(Boolean.TRUE, instance.invoke("done"));

      TransferObject result = (TransferObject)instance.invoke("result");
View Full Code Here

      assertEquals("THROWBLOCK;END_THROWBLOCK;F_INNER;F_OUTER;", result.getValue("trace"));


      tobj.setValue("trace", "");
      tobj.setValue("throwInnerEx", Boolean.TRUE);
      instance = (Instance)serviceClass.invoke("invoke", new Object[]{"TryFinally", tobj, null});
      result = (TransferObject)instance.invoke("result");
      assertEquals("THROWBLOCK;CAUGHT_INNER;F_INNER;F_OUTER;", result.getValue("trace"));


      tobj.setValue("trace", "");
View Full Code Here


      tobj.setValue("trace", "");
      tobj.setValue("throwInnerEx", Boolean.FALSE);
      tobj.setValue("throwOuterEx", Boolean.TRUE);
      instance = (Instance)serviceClass.invoke("invoke", new Object[]{"TryFinally", tobj, null});
      result = (TransferObject)instance.invoke("result");
      assertEquals("THROWBLOCK;F_INNER;CAUGHT_OUTER;F_OUTER;", result.getValue("trace"));


      tobj.setValue("trace", "");
View Full Code Here

      tobj.setValue("throwOuterEx", Boolean.FALSE);
      tobj.setValue("throwUncaughtEx", Boolean.TRUE);

      try
      {
         instance = (Instance)serviceClass.invoke("invoke", new Object[]{"TryFinally", tobj, null});
         fail();
      }
      catch (ScriptingException ex)
      {
         result = (TransferObject)instance.invoke("result");
View Full Code Here

      InstanceList resultList = query.read();

      assertEquals(1, resultList.size());
      contact = resultList.getInstance(0);

      workflowList = (InstanceList)workflowClass.invoke("forInstance",
         new Object[]{contact});
      assertEquals(0, workflowList.size());

      contact.invoke("start");
      commit();
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.