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