1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package com.enspire.gemini;
25
26 /***
27 * Updates one end of a bidirectional relationship.
28 *
29 * @author Dragan Djuric <dragand@dev.java.net>
30 * @since 1.0
31 **/
32 public interface RelationshipUpdater {
33
34 /***
35 * Associates two objects through the property that this updater updates,
36 * but only if they are not already associated.
37 *
38 * @param owner the owner of the property
39 * @param propertyName the name of the property that should be updated
40 * @param value the value of the object that is gong to be associated with
41 * <code>owner</code>
42 * @return the old value of the property
43 */
44 Object set(Object owner, String propertyName, Object value);
45
46 /***
47 * Disassociates two objects that are associated through the property
48 * (denoted with <code>propertyName</code> attribute), but only if they are
49 * already associated.
50 *
51 * @param owner the owner of a property
52 * @param propertyName
53 * @param value the value of the object that is gong to be associated with
54 * <code>owner</code> the old value of the property
55 * @return the old value of the property
56 */
57 Object unset(Object owner, String propertyName, Object value);
58
59 }