Examples of Company


Examples of org.drools.examples.broker.model.Company

    @SuppressWarnings("unchecked")
    public void receive(Event<?> event) {
        try {
            StockTick tick = ((Event<StockTick>) event).getObject();
            Company company = this.companies.getCompany( tick.getSymbol() );
            this.tickStream.insert( tick );
            this.session.getAgenda().getAgendaGroup( "evaluation" ).setFocus();
            this.session.fireAllRules();
            window.updateCompany( company.getSymbol() );
            window.updateTick( tick );
           
        } catch ( Exception e ) {
            System.err.println("=============================================================");
            System.err.println("Unexpected exception caught: "+e.getMessage() );
View Full Code Here

Examples of org.drools.examples.broker.model.Company

    @SuppressWarnings("unchecked")
    public void receive(Event<?> event) {
        try {
            StockTick tick = ((Event<StockTick>) event).getObject();
            Company company = this.companies.getCompany( tick.getSymbol() );
            this.tickStream.insert( tick );
            this.session.getAgenda().getAgendaGroup( "evaluation" ).setFocus();
            this.session.fireAllRules();
            window.updateCompany( company.getSymbol() );
            window.updateTick( tick );
           
        } catch ( Exception e ) {
            System.err.println("=============================================================");
            System.err.println("Unexpected exception caught: "+e.getMessage() );
View Full Code Here

Examples of org.hibernate.test.annotations.Company

    tx = s.beginTransaction();
    Flight firstOne = new Flight();
    firstOne.setId( new Long( 1 ) );
    firstOne.setName( "AF0101" );
    firstOne.setDuration( new Long( 1000 ) );
    Company frenchOne = new Company();
    frenchOne.setName( "Air France" );
    firstOne.setCompany( frenchOne );
    s.persist( firstOne );
    tx.commit();
    s.close();
    assertNotNull( "identity id should work", frenchOne.getId() );

    s = openSession();
    tx = s.beginTransaction();
    firstOne = (Flight) s.get( Flight.class, new Long( 1 ) );
    assertNotNull( firstOne.getCompany() );
    assertEquals( frenchOne.getName(), firstOne.getCompany().getName() );
    tx.commit();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.test.dynamicentity.Company

  public void testIt() {
    // Test saving these dyna-proxies
    Session session = openSession();
    session.beginTransaction();
    Company company = ProxyHelper.newCompanyProxy();
    company.setName( "acme" );
    session.save( company );
    Customer customer = ProxyHelper.newCustomerProxy();
    customer.setName( "Steve" );
    customer.setCompany( company );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
View Full Code Here

Examples of org.hibernate.test.dynamicentity.Company

  public void testIt() {
    // Test saving these dyna-proxies
    Session session = openSession();
    session.beginTransaction();
    Company company = ProxyHelper.newCompanyProxy();
    company.setName( "acme" );
    session.save( company );
    Customer customer = ProxyHelper.newCustomerProxy();
    customer.setName( "Steve" );
    customer.setCompany( company );
    Address address = ProxyHelper.newAddressProxy();
    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );
View Full Code Here

Examples of org.hibernate.test.dynamicentity.Company

  public void testIt() {
    // Test saving these dyna-proxies
    Session session = openSession();
    session.beginTransaction();
    Company company = ProxyHelper.newCompanyProxy();
    company.setName( "acme" );
    session.save( company );
    Customer customer = ProxyHelper.newCustomerProxy();
    customer.setName( "Steve" );
    customer.setCompany( company );
    Address address = ProxyHelper.newAddressProxy();
    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Company

   
    public Company getCompanyById(final Long companyId, Object... params) {
        Criteria criteria = createDefaultCriteria(Company.class);
        FetchPlan fetchPlan = handleCompanySpecificFetchMode(criteria, params);
        criteria.add(Restrictions.eq("id", companyId));
        Company company = (Company) criteria.uniqueResult();
        if(company != null){
            company.setFetchPlan(fetchPlan);
        }
        return company;
    }
View Full Code Here

Examples of org.jboss.as.test.integration.jpa.hibernate.entity.Company

        assertEquals(f.getId(), new Long(1));

        assertEquals(f.getName(), f2.getName());
        assertEquals(f.getCompany().getName(), f2.getCompany().getName());

        Company c = test.findCompanyById(f.getCompany().getId());
        assertNotNull("Company has one flight.", c.getFlights());
        assertEquals(f.getCompany().getFlights().size(), c.getFlights().size());

    }
View Full Code Here

Examples of org.jboss.aspects.currentinvocation.test.subinvocation.beans.Company

      super(name);
   }

   public void testRecursive()
   {
      Company company = new Company();
      company.deliverProduct();
   }
View Full Code Here

Examples of org.jboss.test.jpa.entity.Company

      Flight f = test.manyToOneCreate();
      f = test.findFlightById(f.getId());
      assertTrue(f.getName().equals("AF0101"));
      assertTrue(f.getCompany().getName().equals("Air France"));

      Company c = test.findCompanyById(f.getCompany().getId());
      assertTrue(c != null);
      assertTrue(c.getFlights().size() == 1);
   }
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.