1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.caleigo.core;
20
21 import org.caleigo.core.event.*;
22
23 /*** A IProxyEntity is an extension of the IEntity interface for entity objects
24 * that act as proxies to other entity objects or may even be wrappers around
25 * other forms of property providers. <BR><BR>
26 *
27 * The proxy's remote object is the object that the proxy refers to.
28 * Proxy objects may be chained to other proxies in several layers and
29 * the first non proxy object in achain is defined as the source object.
30 * The remote/source object can be null in which case all access to field
31 * data in the proxy will return the default value defined by the proxy's
32 * descriptors.
33 *
34 * @author Dennis Zikovic
35 * @version 1.00
36 *
37 *//*
38 *
39 * WHEN WHO WHY & WHAT
40 * -----------------------------------------------------------------------------
41 * 2001-11-08 Dennis Zikovic Creation
42 */
43 public interface IProxyEntity extends IEntity
44 {
45
46
47 /*** Boolean access method that returns true if the proxy has a remote
48 * entity if false then getRemoteEntity() will return null.
49 */
50 public boolean hasRemoteEntity();
51
52 /*** Access method that returns the remote entity of the proxy.
53 * May return null if the proxy does not currently have a remote.
54 */
55 public IEntity getRemoteEntity();
56
57 /*** Boolean access method that returns true if the proxy has a source
58 * entity if false then getSourceEntity() will return null.
59 */
60 public boolean hasSourceEntity();
61
62 /*** Access method that returns the source entity of the proxy.
63 * May return null if the proxy does not currently have a source entity.
64 */
65 public IEntity getSourceEntity();
66
67 /*** Optional mutation method that throws an UnsupportedOperationException
68 * if the implementing class does not support the method.
69 */
70 public void setRemoteEntity(IEntity entity);
71
72 /*** Adds IProxyListener to receive notifications of performed
73 * data operations on the entity object.
74 */
75 public void addProxyListener(IProxyListener listener);
76
77 /*** Removes the specified IProxyListener from the entity object.
78 */
79 public void removeProxyListener(IProxyListener listener);
80 }
81