Examples of Child


Examples of org.drools.Child

        RuleBase ruleBase = getRuleBase();
        ruleBase.addPackage( pkg );
        ruleBase = SerializationHelper.serializeObject( ruleBase );
        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        workingMemory.insert( new Child( "gp" ) );

        workingMemory.fireAllRules();
    }
View Full Code Here

Examples of org.drools.compiler.Child

    @Test
    public void testShadowProxyInHirarchies() throws Exception {
        KnowledgeBase kbase = SerializationHelper.serializeObject( loadKnowledgeBase( "test_ShadowProxyInHirarchies.drl" ) );
        StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );

        ksession.insert( new Child( "gp" ) );

        ksession.fireAllRules();
    }
View Full Code Here

Examples of org.drools.compiler.Child

     @Test
     public void testShadowProxyInHirarchies() throws Exception {
         KnowledgeBase kbase = SerializationHelper.serializeObject( loadKnowledgeBase( "test_ShadowProxyInHirarchies.drl" ) );
         StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );

         ksession.insert( new Child( "gp" ) );

         ksession.fireAllRules();
     }
View Full Code Here

Examples of org.drools.compiler.Child

     @Test
     public void testShadowProxyInHirarchies() throws Exception {
         KnowledgeBase kbase = SerializationHelper.serializeObject( loadKnowledgeBase( "test_ShadowProxyInHirarchies.drl" ) );
         StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );

         ksession.insert( new Child( "gp" ) );

         ksession.fireAllRules();
     }
View Full Code Here

Examples of org.drools.compiler.Child

    @Test
    public void testShadowProxyInHirarchies() throws Exception {
        KnowledgeBase kbase = SerializationHelper.serializeObject( loadKnowledgeBase( "test_ShadowProxyInHirarchies.drl" ) );
        StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );

        ksession.insert( new Child( "gp" ) );

        ksession.fireAllRules();
    }
View Full Code Here

Examples of org.eclipse.sapphire.tests.modeling.properties.element.TestElement.Child

   
    public void Homogeneous_Content()
    {
        assertNull( this.element.getHomogeneous().content() );
       
        final Child child = this.element.getHomogeneous().content( true );
       
        assertNotNull( child );
        assertSame( child, this.element.getHomogeneous().content() );
    }
View Full Code Here

Examples of org.eclipselabs.mongoemf.example.model.Child

      Parent parent = ModelFactory.eINSTANCE.createParent();
      parent.setName("Parent " + i);

      for (int j = 0; j < CHILD_COUNT; j++)
      {
        Child child = ModelFactory.eINSTANCE.createChild();
        child.setName("Child " + i + " " + j);
        parent.getChildren().add(child);

        Resource resource = resourceSet.createResource(URI.createURI("mongodb://localhost/test/Child/"));
        resource.getContents().add(child);

        try
        {
          resource.save(null);
        }
        catch (IOException e)
        {
          e.printStackTrace();
        }
      }

      Resource resource = resourceSet.createResource(URI.createURI("mongodb://localhost/test/Parent/"));
      resource.getContents().add(parent);

      try
      {
        resource.save(null);
      }
      catch (IOException e)
      {
        e.printStackTrace();
      }

      if (firstParent == null)
        firstParent = resource.getURI();
    }

    System.out.println();
    long endTime = System.currentTimeMillis();
    System.out.println("Time to create " + (PARENT_COUNT * CHILD_COUNT) + " objects: " + ((endTime - startTime) / 1000.0) + " sec");

    ResourceSet resourceSet = resourceSetFactory.createResourceSet();

    startTime = System.currentTimeMillis();
    Resource resource = resourceSet.getResource(firstParent, true);
    endTime = System.currentTimeMillis();
    System.out.println("Time to get first parent: " + (endTime - startTime) + " ms");

    Parent parent = (Parent) resource.getContents().get(0);

    startTime = System.currentTimeMillis();

    for (Child child : parent.getChildren())
      child.getName();

    endTime = System.currentTimeMillis();
    System.out.println("Time to walk " + CHILD_COUNT + " children of first parent: " + (endTime - startTime) + " ms");
    System.out.println("All done");
  }
View Full Code Here

Examples of org.hibernate.ogm.backendtck.associations.collection.types.Child

  @Before
  public void prepareDb() throws Exception {
    getTransactionManager().begin();
    final EntityManager em = getFactory().createEntityManager();

    child11 = new Child();
    child11.setName( "Emmanuel" );
    em.persist( child11 );

    child12 = new Child();
    child12.setName( "Christophe" );
    em.persist( child12 );

    father1 = new Father();
    father1.getOrderedChildren().add( child11 );
    father1.getOrderedChildren().add( child12 );

    em.persist( father1 );

    child21 = new Child();
    child21.setName( "Caroline" );
    em.persist( child21 );

    child22 = new Child();
    child22.setName( "Thomas" );
    em.persist( child22 );

    father2 = new Father();
    father2.getOrderedChildren().add( child21 );
View Full Code Here

Examples of org.hibernate.test.event.collection.Child

  public Child createChild( String name ) {
    return new ChildWithManyToOne( name );
  }

  public Child addChild(String name) {
    Child child = createChild( name );
    addChild( child );
    return child;
  }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

        };
       
        parentContext.getBean("parent");
       
        Parent parentBean = (Parent) parentContext.getBean("parent");
        Child child = parentBean.tryGetChild();

        try {
            child.childMethod();
            fail();
        }
        catch (NoServiceException e) {
        }

        // now create child appliction context
        ClassPathXmlApplicationContext childContext = new ClassPathXmlApplicationContext(
                new String[] { "childcontainer/child-context.xml" }, parentContext){
             @Override
                protected DefaultListableBeanFactory createBeanFactory() {
                    DefaultListableBeanFactory beanFactory = super.createBeanFactory();
                    beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry, null));
                    beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(new SimpleModuleDefinition("module1")));
                    return beanFactory;
                }
        };

        // bingo, child.childMethod does nto throw NoServiceException
        child.childMethod();

        // now create another context which depends only on the parent
        ApplicationContext another = childContext;

        // call method from child
        Child anotherChild = (Child) another.getBean("child");
        anotherChild.childMethod();

        // shutdown the child context
        childContext.close();

        // should go back to what it was doing before
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.