1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package de.bea.domingo.proxy;
24
25 import lotus.domino.Document;
26 import lotus.domino.NotesException;
27 import de.bea.domingo.DBase;
28 import de.bea.domingo.DNotesMonitor;
29 import de.bea.domingo.DProfileDocument;
30
31 /***
32 * Represents a document in a database.
33 */
34 public final class ProfileDocumentProxy extends BaseDocumentProxy implements DProfileDocument {
35
36 /*** serial version ID for serialization. */
37 private static final long serialVersionUID = 3690193256935994673L;
38
39 /***
40 * Constructor for DDocumentImpl.
41 *
42 * @param theFactory the controlling factory
43 * @param parent the parent object
44 * @param theDocument the Notes document object
45 * @param monitor the monitor
46 */
47 protected ProfileDocumentProxy(final NotesProxyFactory theFactory, final DBase parent,
48 final Document theDocument, final DNotesMonitor monitor) {
49 super(theFactory, parent, theDocument, monitor);
50 }
51
52 /***
53 * {@inheritDoc}
54 * @see de.bea.domingo.DProfileDocument#getKey()
55 */
56 public String getKey() {
57 getFactory().preprocessMethod();
58 try {
59 return getDocument().getKey();
60 } catch (NotesException e) {
61 throw newRuntimeException("Cannot get key", e);
62 }
63 }
64
65 /***
66 * {@inheritDoc}
67 * @see de.bea.domingo.DProfileDocument#getNameOfProfile()
68 */
69 public String getNameOfProfile() {
70 getFactory().preprocessMethod();
71 try {
72 return getDocument().getNameOfProfile();
73 } catch (NotesException e) {
74 throw newRuntimeException("Cannot get name of profile", e);
75 }
76 }
77
78 /***
79 * {@inheritDoc}
80 * @see de.bea.domingo.proxy.BaseProxy#toString()
81 */
82 public String toString() {
83 return getKey() + "_" + getNameOfProfile();
84 }
85 }