Package net.celisdelafuente.java.Acacia.entity

Examples of net.celisdelafuente.java.Acacia.entity.Book


          classification.create(c);
          classification.refresh(c);
        }
      }
     
      Book b = new Book();
      form.copyTo(b);
      try {
        ISBN validIsbn = new ISBN(fIsbn.getValue());
        b.setIsbn(validIsbn.toString());
      } catch (InvalidStandardIDException e) {
        // TODO Auto-generated catch block
        b.setIsbn("");
        e.printStackTrace();
      }
      DateFormat df = new SimpleDateFormat("yyyy");
      Date year = df.parse(fPubDate.getSelectedValues().get(0).toString());
     
      if(year != null)
        b.setPubdate(year);
     
      if(a != null)
        b.setAuthor(a);
     
      if(b != null)
        b.setPublisher(p);
     
      if(c != null)
        b.setClassification(c);
     
      if(fQtty.getValue().isEmpty())
        b.setQuantity(1);
     
      Integer book_id = b.getId();
      if (book_id != 0 && book_id != null) {
        book.update(b);
      } else {
        book.create(b);
      }
View Full Code Here

TOP

Related Classes of net.celisdelafuente.java.Acacia.entity.Book

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.