Examples of Customer


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

    @Test
    public void testOneToMany() throws Exception {

        EntityTest test = lookup("EntityTest", EntityTest.class);
        Customer c = test.oneToManyCreate();
        assertNotNull(c);
        assertNotNull(c.getTickets());
        Set<Ticket> tickets = c.getTickets();
        assertTrue(tickets.size() > 0);

        assertNotNull(c);
        assertNotNull(c.getTickets());
        tickets = c.getTickets();
        assertTrue(tickets.size() > 0);

    }
View Full Code Here

Examples of org.jboss.as.test.integration.jpa.hibernate.envers.Customer

    @Test
    public void testRevisionsfromAuditJoinTable() throws Exception {

        SLSBAudit slsbAudit = lookup("SLSBAudit", SLSBAudit.class);

        Customer c1 = slsbAudit.createCustomer("MADHUMITA", "SADHUKHAN", "WORK", "+420", "543789654");
        Phone p1 = c1.getPhones().get(1);
        p1.setType("Emergency");
        slsbAudit.updatePhone(p1);
        c1.setSurname("Mondal");
        slsbAudit.updateCustomer(c1);
        c1.setFirstname("Steve");
        c1.setSurname("Jobs");
        slsbAudit.updateCustomer(c1);

        // delete phone

        c1.getPhones().remove(p1);
        slsbAudit.updateCustomer(c1);
        slsbAudit.deletePhone(p1);
        Assert.assertEquals(1, c1.getPhones().size());
        testRevisionDatafromAuditJoinTable(c1, slsbAudit);
        testRevisionTypefromAuditJoinTable(c1, slsbAudit);
        testOtherFieldslikeForeignKeysfromAuditJoinTable(c1, slsbAudit);

    }
View Full Code Here

Examples of org.jboss.embedded.test.ejb.Customer

      group.process();

      outputJNDI();
      InitialContext ctx = new InitialContext();
      DAO dao = (DAO)ctx.lookup("DAOBean/local");
      Customer cust = dao.createCustomer("Bill");
      cust = dao.findCustomer("Bill");
      assert cust != null;
      assert cust.getName().equals("Bill");

      group.undeploy();


   }
View Full Code Here

Examples of org.jboss.embedded.test.vfs.Customer

      jar.addResources(DAO.class, includes, null);
      jar.mkdir("META-INF").addResource("vfs-test-persistence.xml", "persistence.xml");
      Bootstrap.getInstance().deploy(jar);
      DAO dao = (DAO)new InitialContext().lookup("DAOBean/local");
      dao.create("Bill");
      Customer cust = dao.find("Bill");
      assertNotNull(cust);

   }
View Full Code Here

Examples of org.jboss.embedded.tutorial.javase.beans.Customer

      CustomerDAOLocal local = (CustomerDAOLocal)ctx.lookup("CustomerDAOBean/local");
      CustomerDAORemote remote = (CustomerDAORemote)ctx.lookup("CustomerDAOBean/remote");

      System.out.println("----------------------------------------------------------");
      int id = local.createCustomer("Gavin");
      Customer cust = local.findCustomer(id);
      System.out.println("    Successfully created and found Gavin from @Local interface");

      id = remote.createCustomer("Emmanuel");
      cust = remote.findCustomer(id);
      System.out.println("    Successfully created and found Emmanuel from @Remote interface");
View Full Code Here

Examples of org.jboss.embedded.tutorial.junit.beans.Customer

      InitialContext ctx = new InitialContext();
      CustomerDAOLocal local = (CustomerDAOLocal) ctx.lookup("CustomerDAOBean/local");
      CustomerDAORemote remote = (CustomerDAORemote) ctx.lookup("CustomerDAOBean/remote");

      int id = local.createCustomer("Gavin");
      Customer cust = local.findCustomer(id);
      assertNotNull(cust);
      System.out.println("Successfully created and found Gavin from @Local interface");

      id = remote.createCustomer("Emmanuel");
      cust = remote.findCustomer(id);
View Full Code Here

Examples of org.jboss.errai.samples.restdemo.client.shared.Customer

  @PostConstruct
  public void init() {
    final Button create = new Button("Create", new ClickHandler() {
      @Override
      public void onClick(ClickEvent clickEvent) {
        Customer customer = new Customer(custFirstName.getText(), custLastName.getText(), custPostalCode.getText());
        customerService.call(creationCallback).createCustomer(customer);
      }
    });

    Button get = new Button("Get (Simulate Error)", new ClickHandler() {
View Full Code Here

Examples of org.jboss.example.jaxrs2.async.Customer

      WebTarget target = client.target("http://localhost:9095/customers");
      Response response = target.queryParam("name", "Bill").request().get();
      try
      {
         Assert.assertEquals(200, response.getStatus());
         Customer cust = response.readEntity(Customer.class);
         Assert.assertEquals("Bill", cust.getName());
      }
      finally
      {
         response.close();
         client.close();
View Full Code Here

Examples of org.jboss.remoting.samples.transporter.basic.Customer

{
   private String locatorURI = "socket://localhost:5400";

   public void makeClientCall() throws Exception
   {
      Customer customer = createCustomer();

      CustomerProcessor customerProcessor = (CustomerProcessor) TransporterClient.createTransporterClient(locatorURI, CustomerProcessor.class);

      System.out.println("Customer to be processed: " + customer);
      Customer processedCustomer = customerProcessor.processCustomer(customer);
      System.out.println("Customer is now: " + processedCustomer);

      TransporterClient.destroyTransporterClient(customerProcessor);

View Full Code Here

Examples of org.jboss.remoting.samples.transporter.multiple.Customer

{
   private String locatorURI = "socket://localhost:5400";

   public void makeClientCall() throws Exception
   {
      Customer customer = createCustomer();

      CustomerProcessor customerProcessor = (CustomerProcessor) TransporterClient.createTransporterClient(locatorURI, CustomerProcessor.class);

      System.out.println("Customer to be processed: " + customer);
      Customer processedCustomer = customerProcessor.processCustomer(customer);
      System.out.println("Customer is now: " + processedCustomer);

      AccountProcessor accountProcessor = (AccountProcessor) TransporterClient.createTransporterClient(locatorURI, AccountProcessor.class);

      System.out.println("Asking for a new account to be created for customer.");
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.