01: package tableapp.business;
02:
03: import tableapp.spec.Access;
04: import java.util.Date;
05: import java.text.DateFormat;
06:
07: /**
08: * <p>Title: </p>
09: * <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 implements Access {
17: public int noAccesses;
18: public String sDate;
19:
20: public AccessImpl() {
21: sDate = DateFormat.getTimeInstance(DateFormat.MEDIUM).format(
22: new Date());
23: }
24:
25: public String getDate() {
26: return sDate;
27: }
28:
29: public int getNoAccesses() {
30: return noAccesses;
31: }
32:
33: public void setNoAccesses(int num) {
34: this .noAccesses = num;
35: }
36:
37: public void setDate(Date date) {
38: this .sDate = sDate = DateFormat.getTimeInstance(
39: DateFormat.MEDIUM).format(date);
40: }
41:
42: public String toString() {
43: return "STRING VALUE: " + noAccesses + " " + sDate;
44: }
45: }
|