KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tableapp > business > AccessImpl


1 package tableapp.business;
2
3 import tableapp.spec.Access;
4 import java.util.Date JavaDoc;
5 import java.text.DateFormat JavaDoc;
6
7 /**
8  * <p>Title: </p>
9  * <p>Description: </p>
10  * <p>Copyright: Copyright (c) 2005</p>
11  * <p>Company: </p>
12  * @author not attributable
13  * @version 1.0
14  */

15
16 public class AccessImpl
17     implements Access {
18   public int noAccesses;
19   public String JavaDoc sDate;
20
21   public AccessImpl() {
22     sDate=DateFormat.getTimeInstance(DateFormat.MEDIUM).format(new Date JavaDoc());
23   }
24
25   public String JavaDoc getDate() {
26     return sDate;
27   }
28   public int getNoAccesses() {
29     return noAccesses;
30   }
31
32   public void setNoAccesses(int num) {
33     this.noAccesses = num;
34   }
35   public void setDate(Date JavaDoc date) {
36    this.sDate = sDate=DateFormat.getTimeInstance(DateFormat.MEDIUM).format(date);
37  }
38
39   public String JavaDoc toString(){
40     return "STRING VALUE: "+noAccesses+ " "+sDate;
41   }
42 }
Popular Tags