KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > joinfetch > Bid


1 //$Id: Bid.java,v 1.1 2005/05/16 05:46:47 oneovthafew Exp $
2
package org.hibernate.test.joinfetch;
3
4 import java.util.Calendar JavaDoc;
5
6 /**
7  * @author Gavin King
8  */

9 public class Bid {
10     
11     private float amount;
12     private Item item;
13     private Calendar JavaDoc timestamp;
14     private Long JavaDoc id;
15
16     public float getAmount() {
17         return amount;
18     }
19     public void setAmount(float amount) {
20         this.amount = amount;
21     }
22     public Item getItem() {
23         return item;
24     }
25     public void setItem(Item item) {
26         this.item = item;
27     }
28     public Calendar JavaDoc getTimestamp() {
29         return timestamp;
30     }
31     public void setTimestamp(Calendar JavaDoc timestamp) {
32         this.timestamp = timestamp;
33     }
34     
35     Bid() {}
36     public Bid(Item item, float amount) {
37         this.amount = amount;
38         this.item = item;
39         item.getBids().add(this);
40         this.timestamp = Calendar.getInstance();
41     }
42     public Long JavaDoc getId() {
43         return id;
44     }
45     public void setId(Long JavaDoc id) {
46         this.id = id;
47     }
48
49 }
50
Popular Tags