KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > acl > db > queries > PolicySelectByUserContextType


1 package de.webman.acl.db.queries;
2
3 import java.sql.Connection JavaDoc;
4 import java.sql.Types JavaDoc;
5 import com.teamkonzept.db.TKPrepQuery;
6
7 /**
8  * $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/db/queries/PolicySelectByUserContextType.java,v 1.1 2001/08/20 08:25:09 mischa Exp $
9  *
10  * @version 0.10
11  * @since 0.10
12  * @author © 2000 Team-Konzept
13  */

14 public class PolicySelectByUserContextType
15     extends TKPrepQuery
16 {
17
18     // Constants
19

20     public static final String JavaDoc[] ORDER =
21     {
22         "WM_USER_ID",
23         "WM_CONTEXT_ID",
24         "OBJECT_TYPE"
25     };
26
27     public static final Object JavaDoc[][] TYPES =
28     {
29         {"WM_USER_ID", new Integer JavaDoc(Types.INTEGER)},
30         {"WM_CONTEXT_ID", new Integer JavaDoc(Types.INTEGER)},
31         {"OBJECT_TYPE", new Integer JavaDoc(Types.INTEGER)}
32     };
33
34     public static final boolean[] RELEVANTS =
35     {
36         true
37     };
38
39     public static final String JavaDoc SQL = (new StringBuffer JavaDoc()).append("SELECT WM_POLICY_ID FROM WM_POLICY WHERE ")
40                                                          .append("WM_USER_ID = ? AND ")
41                                                          .append("WM_CONTEXT_ID = ? AND ")
42                                                          .append("OBJECT_TYPE = ? ")
43                                                          .toString();
44
45
46     // Method implementations
47

48     public void initQuery (Connection JavaDoc connection)
49     {
50         super.initQuery(connection,
51                         true,
52                         ORDER,
53                         TYPES,
54                         RELEVANTS,
55                         SQL);
56     }
57
58 }
59
Popular Tags