Package org.jboss.test.jpa.classloader.model

Examples of org.jboss.test.jpa.classloader.model.Account


   public void testSimpleInsert() throws Exception
   {
      Integer id = Integer.valueOf(1001);
      Integer balance = Integer.valueOf(5);
      sfsb0.createAccount(SMITH, id, balance, "94536");
      Account acct = sfsb0.getAccount(id);
      assertNotNull(acct);
      AccountHolder holder = acct.getAccountHolder();
      assertNotNull(holder);
      assertEquals("Smith", holder.getLastName());
      assertEquals("1000", holder.getSsn());
      assertEquals(balance, acct.getBalance());
      assertEquals("94536", acct.getBranch());
   }
View Full Code Here


      return (Account) manager.find(Account.class, id);
   }
  
   public void createAccount(AccountHolder holder, Integer id, Integer openingBalance, String branch)
   {
      Account account = new Account();
      account.setId(id);
      account.setAccountHolder(holder);
      account.setBalance(openingBalance);
      account.setBranch(branch);
      manager.persist(account);
      log.info("Persisted Account " + id);
   }
View Full Code Here

         {
            for (Iterator it = accts.iterator(); it.hasNext();)
            {
               try
               {
                  Account acct = (Account) it.next();
                  log.info("Removing " + acct);
                  manager.remove(acct);
               }
               catch (Exception ignored) {}
            }
View Full Code Here

TOP

Related Classes of org.jboss.test.jpa.classloader.model.Account

Copyright © 2018 www.massapicom. 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.