KickJava   Java API By Example, From Geeks To Geeks.

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


1 package de.webman.acl.db;
2
3 import java.sql.SQLException JavaDoc;
4 import com.teamkonzept.db.TKDBTableData;
5 import com.teamkonzept.db.TKQuery;
6
7 /**
8  * $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/db/EventCollectionDBData.java,v 1.1 2001/08/20 08:25:08 mischa Exp $
9  *
10  * Data container for event collections.
11  * <P>
12  * Intended use is the selection of a number of event IDs. The selection
13  * may be restricted by the attributes of a policy.
14  *
15  * @version 0.10
16  * @since 0.10
17  * @author &copy; 2000 Team-Konzept
18  */

19 public class EventCollectionDBData
20     extends ObjectCollectionDBData
21 {
22
23     // Attributes
24

25     /**
26      * The login of a policy.
27      */

28     private Integer JavaDoc login = null;
29
30     /**
31      * The context of a policy.
32      */

33     private Integer JavaDoc context = null;
34
35     /**
36      * The object type of a policy.
37      */

38     private Integer JavaDoc type = null;
39
40     /**
41      * The object reference of a policy.
42      */

43     private Integer JavaDoc reference = null;
44
45     /**
46      * The access mode of a policy.
47      */

48     private String JavaDoc access = null;
49
50
51     // Constructors
52

53     /**
54      * Creates a data container for event collections.
55      *
56      * @param login the login of a policy.
57      * @param context the context of a policy.
58      * @param type the object type of a policy.
59      * @param reference the object reference of a policy.
60      * @param access the access mode of a policy.
61      */

62     public EventCollectionDBData (Integer JavaDoc login,
63                                     Integer JavaDoc context,
64                                     Integer JavaDoc type,
65                                     Integer JavaDoc reference,
66                                     String JavaDoc access)
67     {
68         super(null,
69               null,
70               EventDBInterface.PRIMARY_KEY_NAME,
71               null);
72
73         this.login = login;
74         this.context = context;
75         this.type = type;
76         this.reference = reference;
77         this.access = access;
78     }
79
80
81     // Method implementations
82

83     /**
84      * Inserts the attributes of a policy into the given query.
85      *
86      * @param query the query to be executed.
87      * @exception java.sql.SQLException if an database error occured.
88      */

89     public void insertIntoQuery (TKQuery query)
90         throws SQLException JavaDoc
91     {
92         query.setQueryParams(LoginDBInterface.PRIMARY_KEY_NAME, this.login);
93         query.setQueryParams(ContextDBInterface.PRIMARY_KEY_NAME, this.context);
94         query.setQueryParams("OBJECT_TYPE", this.type);
95         query.setQueryParams("OBJECT_REFERENCE", this.reference);
96         query.setQueryParams("POLICY_ACCESS", this.access);
97     }
98
99 }
100
Popular Tags