1
//$Id: Customer.java 4806 2004-11-25 14:37:00Z steveebersole $
2
package org.hibernate.test.cid;
4
import java.util.ArrayList;
6
import java.util.GregorianCalendar;
7
import java.math.BigDecimal;
12
public class Customer {
13
private String customerId;
15
private String address;
16
private List orders = new ArrayList();
18
* @return Returns the address.
20
public String getAddress() {
24
* @param address The address to set.
26
public void setAddress(String address) {
27
this.address = address;
30
* @return Returns the customerId.
32
public String getCustomerId() {
36
* @param customerId The customerId to set.
38
public void setCustomerId(String customerId) {
39
this.customerId = customerId;
42
* @return Returns the name.
44
public String getName() {
48
* @param name The name to set.
50
public void setName(String name) {
54
* @return Returns the orders.
56
public List getOrders() {
60
* @param orders The orders to set.
62
public void setOrders(List orders) {
66
public Order generateNewOrder(BigDecimal total) {
67
Order order = new Order(this);
68
order.setOrderDate( new GregorianCalendar() );
69
order.setTotal( total );