1 6 7 package league.util; 8 9 import java.io.IOException ; 10 import java.util.*; 11 15 public class League extends Object implements java.io.Serializable { 16 private String name=null; 17 private Date startDate=null; 18 private Date endDate=null; 19 private String note=null; 20 private Integer id=null; 21 22 public League() { 23 } 24 25 public League(Integer id, String name, Date startDate, Date endDate, String 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 getId() { 34 return id; 35 } 36 public void setId(Integer id) { 37 this.id=id; 38 } 39 public String 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 getNote() { 52 return note; 53 } 54 55 public String toString() { 56 return getName(); 57 } 58 private void readObject(java.io.ObjectInputStream ois) throws IOException , ClassNotFoundException { 59 60 name=(String )ois.readObject(); 61 startDate = (Date) ois.readObject(); 62 endDate = (Date) ois.readObject(); 63 note=(String )ois.readObject(); 64 id= (Integer ) ois.readObject(); 65 66 ois.close(); 67 } 68 69 private void writeObject(java.io.ObjectOutputStream oos) throws IOException { 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 |