01: /*
02: * Copyright 2007 Dan Shellman
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.iscreen.samples;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20:
21: /**
22: * This is a sample object graph, with the Order being the top-most object
23: * in the graph.
24: *
25: * @author Shellman, Dan
26: */
27: public class Order {
28: private String orderId;
29: private List lineItems = new ArrayList();
30: private Customer customer;
31:
32: /**
33: * Default constructor.
34: */
35: public Order(String id) {
36: orderId = id;
37: } //end Order()
38:
39: public String getOrderId() {
40: return orderId;
41: } //end getOrderId()
42:
43: public void addItem(LineItem item) {
44: lineItems.add(item);
45: } //end addItem()
46:
47: public void setCustomer(Customer cust) {
48: customer = cust;
49: } //end setCustomer()
50:
51: public Customer getCustomer() {
52: return customer;
53: } //end getCustomer()
54:
55: public List getLineItems() {
56: return lineItems;
57: } //end getLineItems()
58: } //end Order
|