~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/cid/Customer.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//$Id: Customer.java 4806 2004-11-25 14:37:00Z steveebersole $
 
2
package org.hibernate.test.cid;
 
3
 
 
4
import java.util.ArrayList;
 
5
import java.util.List;
 
6
import java.util.GregorianCalendar;
 
7
import java.math.BigDecimal;
 
8
 
 
9
/**
 
10
 * @author Gavin King
 
11
 */
 
12
public class Customer {
 
13
        private String customerId;
 
14
        private String name;
 
15
        private String address;
 
16
        private List orders = new ArrayList();
 
17
        /**
 
18
         * @return Returns the address.
 
19
         */
 
20
        public String getAddress() {
 
21
                return address;
 
22
        }
 
23
        /**
 
24
         * @param address The address to set.
 
25
         */
 
26
        public void setAddress(String address) {
 
27
                this.address = address;
 
28
        }
 
29
        /**
 
30
         * @return Returns the customerId.
 
31
         */
 
32
        public String getCustomerId() {
 
33
                return customerId;
 
34
        }
 
35
        /**
 
36
         * @param customerId The customerId to set.
 
37
         */
 
38
        public void setCustomerId(String customerId) {
 
39
                this.customerId = customerId;
 
40
        }
 
41
        /**
 
42
         * @return Returns the name.
 
43
         */
 
44
        public String getName() {
 
45
                return name;
 
46
        }
 
47
        /**
 
48
         * @param name The name to set.
 
49
         */
 
50
        public void setName(String name) {
 
51
                this.name = name;
 
52
        }
 
53
        /**
 
54
         * @return Returns the orders.
 
55
         */
 
56
        public List getOrders() {
 
57
                return orders;
 
58
        }
 
59
        /**
 
60
         * @param orders The orders to set.
 
61
         */
 
62
        public void setOrders(List orders) {
 
63
                this.orders = orders;
 
64
        }
 
65
 
 
66
        public Order generateNewOrder(BigDecimal total) {
 
67
                Order order = new Order(this);
 
68
                order.setOrderDate( new GregorianCalendar() );
 
69
                order.setTotal( total );
 
70
 
 
71
                return order;
 
72
        }
 
73
}