Package com.jcasey.controller

Examples of com.jcasey.controller.Manager


  private File bookFile;


  public JaxbAction(){
    linkController = new Manager();
  }
View Full Code Here


 
  private List<BookGenre> bookGenre;
 
  public ModifyBook()
  {
    controller = new Manager();
  }
View Full Code Here

 
  private List<BookGenre> bookGenre;
 
  public ModifyBook()
  {
    controller = new Manager();
  }
View Full Code Here

 
  private List<BookGenre> bookGenre;
 
  public ModifyBook()
  {
    controller = new Manager();
  }
View Full Code Here

 
  private List<BookGenre> bookGenre;
 
  public ModifyBook()
  {
    controller = new Manager();
  }
View Full Code Here

  private Manager linkController;
 
  public SearchBook()
  {
    linkController = new Manager();
    books = new ArrayList<Book>();
  }
View Full Code Here

  private Manager linkController;
 
  public SearchBook()
  {
    linkController = new Manager();
    books = new ArrayList<Book>();
  }
View Full Code Here

  }

  @Test
  public void testAuditRecords()
  {
    Manager manager = new Manager();

    // create book record
    Book book = new Book();
    book.setTitle("Gone with the wind");
   
    book = manager.addBook(book);
   
    book.setAuthor("Margaret Mitchell");
    book = manager.update(book);
   
    book.setTitle("Gone With The Wind");
    book = manager.update(book);
   
    manager.deleteBook(book.getBookId());
   
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();

    AuditReader auditReader = AuditReaderFactory.get(session);
View Full Code Here

  }

  @Test
  public void testOptimisticLocking()
  {
    Manager manager = new Manager();

    // create book record
    Book book1 = new Book();
    book1.setTitle("Gone");

    // persist
    book1 = manager.addBook(book1);

    // update the title in memory
    book1.setTitle("Gone with the wind");
   
    // load original record
    Book book2 = manager.getBook(book1.getBookId());
   
    // update the title in memory
    book2.setTitle("Test");

    // persist book2
    manager.update(book2);

    // attempt to persist out of date book1
    try
    {
      manager.update(book1);
      fail("Test failed: Concurrent update of book, StaleObjectStateException not thrown when it should be.");
    }
    catch(StaleObjectStateException e)
    {
      assertEquals( "com.jcasey.model.Book", e.getEntityName());
View Full Code Here

TOP

Related Classes of com.jcasey.controller.Manager

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.