1 package edu.sampleu.bookstore.document;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import org.kuali.rice.kns.document.TransactionalDocumentBase;
7 import edu.sampleu.bookstore.bo.BookOrder;
8
9
10
11
12
13 public class BookOrderDocument extends TransactionalDocumentBase {
14
15 private static final long serialVersionUID = -1856169002927442467L;
16
17 private List<BookOrder> bookOrders = new ArrayList<BookOrder>();
18
19 public List<BookOrder> getBookOrders() {
20 return bookOrders;
21 }
22
23 public void setBookOrders(List<BookOrder> bookOrders) {
24 this.bookOrders = bookOrders;
25 }
26
27 public void addBookOrder(BookOrder bookOrder) {
28 bookOrder.setDocumentId(getDocumentNumber());
29 bookOrders.add(bookOrder);
30 }
31
32 public void removeBookOrder(int deleteIndex) {
33 bookOrders.remove(deleteIndex);
34 }
35
36 }