Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/hibernate/test/joinfetch/Bid.java


1   //$Id: Bid.java 6793 2005-05-16 05:46:47Z oneovthafew $
2   package org.hibernate.test.joinfetch;
3   
4   import java.util.Calendar;
5   
6   /**
7    * @author Gavin King
8    */
9   public class Bid {
10    
11    private float amount;
12    private Item item;
13    private Calendar timestamp;
14    private Long 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 getTimestamp() {
29      return timestamp;
30    }
31    public void setTimestamp(Calendar 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 getId() {
43      return id;
44    }
45    public void setId(Long id) {
46      this.id = id;
47    }
48  
49  }