KickJava   Java API By Example, From Geeks To Geeks.

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


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/EventSelectByPolicy.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 EventSelectByPolicy
15     extends TKPrepQuery
16 {
17
18     // Constants
19

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

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