KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > demo > icare > model > Car


1 package org.objectweb.petals.demo.icare.model;
2
3 import java.util.Set JavaDoc;
4
5 /**
6  * The Car entity
7  *
8  * @author Cristian Spiescu
9  * @author Imad Zarzouri
10  * @author Omar Senhaji Rhazi
11  * @author Anass Ouazzani Chahdi
12  *
13  * @since 15.01.2007
14  */

15 public class Car extends Entity {
16     private Category category;
17     
18     private Set JavaDoc<Reservation> reservations;
19     
20     private String JavaDoc brand;
21     
22     private String JavaDoc model;
23
24     public Car() {
25         super();
26     }
27
28     public Car(Category category, String JavaDoc brand, String JavaDoc model) {
29         super();
30         this.category = category;
31         this.brand = brand;
32         this.model = model;
33     }
34
35     public String JavaDoc getBrand() {
36         return brand;
37     }
38
39     public void setBrand(String JavaDoc brand) {
40         this.brand = brand;
41     }
42
43     public Category getCategory() {
44         return category;
45     }
46
47     public void setCategory(Category category) {
48         this.category = category;
49     }
50
51     public String JavaDoc getModel() {
52         return model;
53     }
54
55     public void setModel(String JavaDoc model) {
56         this.model = model;
57     }
58
59     public Set JavaDoc<Reservation> getReservations() {
60         return reservations;
61     }
62
63     public void setReservations(Set JavaDoc<Reservation> reservations) {
64         this.reservations = reservations;
65     }
66     
67     public String JavaDoc toString(){
68         //return ("Category : "+ category + " Brand : " + brand + " Model : " + model);
69
return ("(" + category + ") " + brand + " " + model);
70     }
71     
72 }
73
Popular Tags