KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > acl > db > EventDBInterface


1 package de.webman.acl.db;
2
3 import de.webman.acl.db.queries.*;
4
5 /**
6  * $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/db/EventDBInterface.java,v 1.1 2001/08/20 08:25:08 mischa Exp $
7  *
8  * Database interface for events.
9  *
10  * @version 0.10
11  * @since 0.10
12  * @author © 2000 Team-Konzept
13  */

14 public class EventDBInterface
15     extends ObjectDBInterface
16 {
17
18     // Constants
19

20     /**
21      * The table name.
22      */

23     public static final String JavaDoc TABLE_NAME = "WM_EVENT";
24
25     /**
26      * The primary key name.
27      */

28     public static final String JavaDoc PRIMARY_KEY_NAME = "WM_EVENT_ID";
29
30     /**
31      * Selection class.
32      */

33     public static final Class JavaDoc WM_EVENT_SELECT_ALL = EventSelectAll.class;
34
35     /**
36      * Selection class.
37      */

38     public static final Class JavaDoc WM_EVENT_SELECT_BY_NAME = EventSelectByName.class;
39
40     /**
41      * Selection class.
42      */

43     public static final Class JavaDoc WM_EVENT_SELECT_BY_POLICY = EventSelectByPolicy.class;
44
45     /**
46      * Selection class.
47      */

48     public static final Class JavaDoc WM_EVENT_SELECT_BY_POLICY_ATTRIBUTES = EventSelectByPolicyAttributes.class;
49
50     /**
51      * Singleton instance.
52      */

53     private static final EventDBInterface INSTANCE = new EventDBInterface();
54
55
56     // Constructors
57

58     /**
59      * Inhibits instantiation from outside.
60      */

61     private EventDBInterface ()
62     {
63         super(EventInsert.class,
64               EventUpdate.class,
65               EventSelect.class,
66               EventDelete.class,
67               new Class JavaDoc[1],
68               new Class JavaDoc[1],
69               null);
70     }
71
72
73     // Instance
74

75     /**
76      * Returns the singleton instance of the database interface.
77      *
78      * @return the singleton instance of the database interface.
79      */

80     public static final EventDBInterface getInstance ()
81     {
82         return INSTANCE;
83     }
84
85
86     // Method implementations
87

88     /**
89      * Returns the name of the database table.
90      *
91      * @return the name of the database table.
92      */

93     public final String JavaDoc getTableName ()
94     {
95         return TABLE_NAME;
96     }
97
98     /**
99      * Returns the name of the primary key.
100      *
101      * @return the name of the primary key.
102      */

103     public final String JavaDoc getPrimaryKeyName ()
104     {
105         return PRIMARY_KEY_NAME;
106     }
107
108     /**
109      * Returns the name of the dependent key.
110      *
111      * @return the name of the dependent key.
112      */

113     public final String JavaDoc getDependentKeyName ()
114     {
115         return null;
116     }
117
118     /**
119      * Returns the query for selection of all objects.
120      *
121      * @return the query for selection of all objects.
122      */

123     public final Class JavaDoc getSelectAllQuery ()
124     {
125         return WM_EVENT_SELECT_ALL;
126     }
127
128     /**
129      * Returns the query for selection of all dependent objects.
130      *
131      * @return the query for selection of all dependent objects.
132      */

133     public final Class JavaDoc getSelectDependentQuery ()
134     {
135         return null;
136     }
137
138     /**
139      * Returns the query for insertion of all dependent objects.
140      *
141      * @return the query for insertion of all dependent objects.
142      */

143     public final Class JavaDoc getInsertDependentQuery ()
144     {
145         return null;
146     }
147
148 }
149
Popular Tags