001 package edu.sampleu.bookstore.document; 002 003 import java.util.ArrayList; 004 import java.util.List; 005 006 import org.kuali.rice.krad.document.TransactionalDocumentBase; 007 import edu.sampleu.bookstore.bo.BookOrder; 008 009 /* 010 * Transactional Document class file for Book Order. 011 */ 012 013 public class BookOrderDocument extends TransactionalDocumentBase { 014 015 private static final long serialVersionUID = -1856169002927442467L; 016 017 private List<BookOrder> bookOrders = new ArrayList<BookOrder>(); 018 019 public List<BookOrder> getBookOrders() { 020 return bookOrders; 021 } 022 023 public void setBookOrders(List<BookOrder> bookOrders) { 024 this.bookOrders = bookOrders; 025 } 026 027 public void addBookOrder(BookOrder bookOrder) { 028 bookOrder.setDocumentId(getDocumentNumber()); 029 bookOrders.add(bookOrder); 030 } 031 032 public void removeBookOrder(int deleteIndex) { 033 bookOrders.remove(deleteIndex); 034 } 035 036 }