KickJava   Java API By Example, From Geeks To Geeks.

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


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/ContextDBInterface.java,v 1.1 2001/08/20 08:25:08 mischa Exp $
7  *
8  * Database interface for contexts.
9  *
10  * @version 0.10
11  * @since 0.10
12  * @author © 2000 Team-Konzept
13  */

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

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

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

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

33     public static final Class JavaDoc WM_CONTEXT_SELECT_ALL = ContextSelectAll.class;
34
35     /**
36      * Singleton instance.
37      */

38     private static final ContextDBInterface INSTANCE = new ContextDBInterface();
39
40
41     // Constructors
42

43     /**
44      * Inhibits instantiation from outside.
45      */

46     private ContextDBInterface ()
47     {
48         super(ContextInsert.class,
49               ContextUpdate.class,
50               ContextSelect.class,
51               ContextDelete.class,
52               new Class JavaDoc[1],
53               new Class JavaDoc[1],
54               null);
55     }
56
57
58     // Instance
59

60     /**
61      * Returns the singleton instance of the database interface.
62      *
63      * @return the singleton instance of the database interface.
64      */

65     public static final ContextDBInterface getInstance ()
66     {
67         return INSTANCE;
68     }
69
70
71     // Method implementations
72

73     /**
74      * Returns the name of the database table.
75      *
76      * @return the name of the database table.
77      */

78     public final String JavaDoc getTableName ()
79     {
80         return TABLE_NAME;
81     }
82
83     /**
84      * Returns the name of the primary key.
85      *
86      * @return the name of the primary key.
87      */

88     public final String JavaDoc getPrimaryKeyName ()
89     {
90         return PRIMARY_KEY_NAME;
91     }
92
93     /**
94      * Returns the name of the dependent key.
95      *
96      * @return the name of the dependent key.
97      */

98     public final String JavaDoc getDependentKeyName ()
99     {
100         return null;
101     }
102
103     /**
104      * Returns the query for selection of all objects.
105      *
106      * @return the query for selection of all objects.
107      */

108     public final Class JavaDoc getSelectAllQuery ()
109     {
110         return WM_CONTEXT_SELECT_ALL;
111     }
112
113     /**
114      * Returns the query for selection of all dependent objects.
115      *
116      * @return the query for selection of all dependent objects.
117      */

118     public final Class JavaDoc getSelectDependentQuery ()
119     {
120         return null;
121     }
122
123     /**
124      * Returns the query for insertion of all dependent objects.
125      *
126      * @return the query for insertion of all dependent objects.
127      */

128     public final Class JavaDoc getInsertDependentQuery ()
129     {
130         return null;
131     }
132
133 }
134
Popular Tags