01: package de.webman.acl.db;
02:
03: import java.sql.SQLException;
04: import com.teamkonzept.db.TKDBTableData;
05: import com.teamkonzept.db.TKQuery;
06:
07: /**
08: * $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/db/EventCollectionDBData.java,v 1.1 2001/08/20 08:25:08 mischa Exp $
09: *
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 © 2000 Team-Konzept
18: */
19: public class EventCollectionDBData extends ObjectCollectionDBData {
20:
21: // Attributes
22:
23: /**
24: * The login of a policy.
25: */
26: private Integer login = null;
27:
28: /**
29: * The context of a policy.
30: */
31: private Integer context = null;
32:
33: /**
34: * The object type of a policy.
35: */
36: private Integer type = null;
37:
38: /**
39: * The object reference of a policy.
40: */
41: private Integer reference = null;
42:
43: /**
44: * The access mode of a policy.
45: */
46: private String access = null;
47:
48: // Constructors
49:
50: /**
51: * Creates a data container for event collections.
52: *
53: * @param login the login of a policy.
54: * @param context the context of a policy.
55: * @param type the object type of a policy.
56: * @param reference the object reference of a policy.
57: * @param access the access mode of a policy.
58: */
59: public EventCollectionDBData(Integer login, Integer context,
60: Integer type, Integer reference, String access) {
61: super (null, null, EventDBInterface.PRIMARY_KEY_NAME, null);
62:
63: this .login = login;
64: this .context = context;
65: this .type = type;
66: this .reference = reference;
67: this .access = access;
68: }
69:
70: // Method implementations
71:
72: /**
73: * Inserts the attributes of a policy into the given query.
74: *
75: * @param query the query to be executed.
76: * @exception java.sql.SQLException if an database error occured.
77: */
78: public void insertIntoQuery(TKQuery query) throws SQLException {
79: query.setQueryParams(LoginDBInterface.PRIMARY_KEY_NAME,
80: this .login);
81: query.setQueryParams(ContextDBInterface.PRIMARY_KEY_NAME,
82: this .context);
83: query.setQueryParams("OBJECT_TYPE", this .type);
84: query.setQueryParams("OBJECT_REFERENCE", this .reference);
85: query.setQueryParams("POLICY_ACCESS", this.access);
86: }
87:
88: }
|