KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > broker > ProductGroupProxy


1 package org.apache.ojb.broker;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.List JavaDoc;
5
6 import org.apache.ojb.broker.core.proxy.IndirectionHandler;
7 import org.apache.ojb.broker.core.proxy.VirtualProxy;
8
9
10 /**
11  * Proxy class for ProductGroup.
12  */

13 public class ProductGroupProxy extends VirtualProxy implements InterfaceProductGroup, Serializable JavaDoc
14 {
15     public ProductGroupProxy()
16     {
17     }
18
19     /**
20      * ProductGroupProxy constructor comment.
21      * @param uniqueId org.apache.ojb.broker.Identity
22      */

23     public ProductGroupProxy(PBKey key, Identity uniqueId)
24     {
25         super(key, uniqueId);
26     }
27
28     public ProductGroupProxy(IndirectionHandler handler)
29     {
30         super(handler);
31     }
32
33
34     /** return List of all Articles in productgroup*/
35     public List JavaDoc getAllArticles()
36     {
37         return realSubject().getAllArticles();
38     }
39
40     /** return group id*/
41     public Integer JavaDoc getId()
42     {
43         return realSubject().getId();
44     }
45
46     /** return groupname*/
47     public String JavaDoc getName()
48     {
49         return realSubject().getName();
50     }
51
52     /**
53      * Insert the method's description here.
54      * Creation date: (08.11.2000 22:38:26)
55      * @return org.apache.ojb.examples.broker.Article
56      */

57     private ProductGroup realSubject()
58     {
59         try
60         {
61             ProductGroup result = (ProductGroup) getRealSubject();
62             if (result == null) throw new NullPointerException JavaDoc("Real subject was null");
63             return result;
64         }
65         catch (Throwable JavaDoc t)
66         {
67             System.out.println(t.getMessage());
68             t.printStackTrace();
69             return null;
70         }
71     }
72
73     public String JavaDoc toString()
74     {
75         return realSubject().toString();
76     }
77
78     /** add article to group*/
79     public void add(InterfaceArticle article)
80     {
81         realSubject().add(article);
82     }
83 }
84
Popular Tags