KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > league > util > League


1 /*
2  * League.java
3  *
4  * Created on March 9, 2005, 10:44 AM
5  */

6
7 package league.util;
8
9 import java.io.IOException JavaDoc;
10 import java.util.*;
11 /**
12  *
13  * @author honza
14  */

15 public class League extends Object JavaDoc implements java.io.Serializable JavaDoc {
16     private String JavaDoc name=null;
17     private Date startDate=null;
18     private Date endDate=null;
19     private String JavaDoc note=null;
20     private Integer JavaDoc id=null;
21     
22     public League() {
23     }
24     
25     public League(Integer JavaDoc id, String JavaDoc name, Date startDate, Date endDate, String JavaDoc note) {
26         this.id=id;
27         this.name=name;
28         this.startDate=startDate;
29         this.endDate=endDate;
30         this.note=note;
31     }
32     
33     public Integer JavaDoc getId() {
34         return id;
35     }
36     public void setId(Integer JavaDoc id) {
37         this.id=id;
38     }
39     public String JavaDoc getName() {
40         return name;
41     }
42     
43     public Date getStartDate() {
44         return startDate;
45     }
46     
47     public Date getEndDate() {
48         return endDate;
49     }
50     
51     public String JavaDoc getNote() {
52         return note;
53     }
54     
55     public String JavaDoc toString() {
56         return getName();
57     }
58     private void readObject(java.io.ObjectInputStream JavaDoc ois) throws IOException JavaDoc, ClassNotFoundException JavaDoc{
59         
60         name=(String JavaDoc)ois.readObject();
61         startDate = (Date) ois.readObject();
62         endDate = (Date) ois.readObject();
63         note=(String JavaDoc)ois.readObject();
64         id= (Integer JavaDoc) ois.readObject();
65         
66         ois.close();
67     }
68     
69     private void writeObject(java.io.ObjectOutputStream JavaDoc oos) throws IOException JavaDoc {
70         
71         
72         
73         oos.writeObject(name);
74         oos.writeObject(startDate);
75         oos.writeObject(endDate);
76         oos.writeObject(note);
77         oos.writeObject(id);
78         
79         
80         oos.close();
81     }
82 }
83
Popular Tags