01: package org.apache.ojb.broker;
02:
03: import java.io.Serializable;
04: import java.util.List;
05:
06: import org.apache.ojb.broker.core.proxy.IndirectionHandler;
07: import org.apache.ojb.broker.core.proxy.VirtualProxy;
08:
09: /**
10: * Proxy class for ProductGroup.
11: */
12: public class ProductGroupProxy extends VirtualProxy implements
13: InterfaceProductGroup, Serializable {
14: public ProductGroupProxy() {
15: }
16:
17: /**
18: * ProductGroupProxy constructor comment.
19: * @param uniqueId org.apache.ojb.broker.Identity
20: */
21: public ProductGroupProxy(PBKey key, Identity uniqueId) {
22: super (key, uniqueId);
23: }
24:
25: public ProductGroupProxy(IndirectionHandler handler) {
26: super (handler);
27: }
28:
29: /** return List of all Articles in productgroup*/
30: public List getAllArticles() {
31: return realSubject().getAllArticles();
32: }
33:
34: /** return group id*/
35: public Integer getId() {
36: return realSubject().getId();
37: }
38:
39: /** return groupname*/
40: public String getName() {
41: return realSubject().getName();
42: }
43:
44: /**
45: * Insert the method's description here.
46: * Creation date: (08.11.2000 22:38:26)
47: * @return org.apache.ojb.examples.broker.Article
48: */
49: private ProductGroup realSubject() {
50: try {
51: ProductGroup result = (ProductGroup) getRealSubject();
52: if (result == null)
53: throw new NullPointerException("Real subject was null");
54: return result;
55: } catch (Throwable t) {
56: System.out.println(t.getMessage());
57: t.printStackTrace();
58: return null;
59: }
60: }
61:
62: public String toString() {
63: return realSubject().toString();
64: }
65:
66: /** add article to group*/
67: public void add(InterfaceArticle article) {
68: realSubject().add(article);
69: }
70: }
|