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