KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > albel > tags > table > model > Keys


1 /*
2  * Keys.java
3  *
4  * Created on Pirmadienis, 2004, Rugsėjo 6, 11.41
5  */

6
7 package albel.tags.table.model;
8
9 /**
10  * Keys are used to identify table's objects in such contexts as
11  *HttpSession ,request and possible others.
12  * @author alblau
13  */

14 public class Keys {
15     private String JavaDoc tableId;
16     /** Creates a new instance of Keys */
17     private Keys() {
18     }
19     public Keys(String JavaDoc id) {
20         this.tableId=id;
21     }
22     public String JavaDoc getEditRowNumberKey() {
23         return "tt_"+tableId+"_EditRowNumber";
24     }
25     public String JavaDoc getDeleteRowNumberKey() {
26         return "tt_"+tableId+"_DeleteRowNumber";
27     }
28     public static String JavaDoc getEditRowNumberKey(String JavaDoc tableId) {
29         return "tt_"+tableId+"_EditRowNumber";
30     }
31     public String JavaDoc getSaveButtonNameKey() {
32         return "tt_"+tableId+"_EditRowSaveButton";
33     }
34     public String JavaDoc getCreateButtonNameKey() {
35         return "tt_"+tableId+"_CreateRowButton";
36     }
37     public String JavaDoc getTableSessionKey() {
38         return TABLE_SESSION_KEY+"."+tableId;
39     }
40     public static String JavaDoc getTableSessionKey(String JavaDoc tableId) {
41         return TABLE_SESSION_KEY+"."+tableId;
42     }
43     private static String JavaDoc TABLE_SESSION_KEY="albel.tags.table";
44 }
45
Popular Tags