KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.apache.ojb.broker;
2
3 import org.apache.ojb.broker.core.proxy.IndirectionHandler;
4 import org.apache.ojb.broker.core.proxy.VirtualProxy;
5
6 /**
7  * Proxy class to class Article. Implements interface InterfaceArticle.
8  * delegates methods calls to the internal Article-object
9  * @author Thomas Mahler
10  */

11 public class ArticleProxy extends VirtualProxy implements InterfaceArticle
12 {
13     /* (non-Javadoc)
14      * @see org.apache.ojb.broker.InterfaceArticle#setProductGroup(org.apache.ojb.broker.InterfaceProductGroup)
15      */

16     public void setProductGroup(InterfaceProductGroup pg)
17     {
18         realSubject().setProductGroup(pg);
19     }
20
21     public ArticleProxy()
22     {
23     }
24
25     /**
26      * ArticleProxy constructor comment.
27      * @param uniqueId org.apache.ojb.broker.Identity
28      */

29     public ArticleProxy(PBKey key, Identity uniqueId)
30     {
31         super(key, uniqueId);
32     }
33
34     public ArticleProxy(IndirectionHandler handler)
35     {
36         super(handler);
37     }
38
39
40     /**
41      * addToStock method comment.
42      */

43     public void addToStock(int diff)
44     {
45         realSubject().addToStock(diff);
46     }
47
48     /**
49      * getArticleId method comment.
50      */

51     public Integer JavaDoc getArticleId()
52     {
53         return realSubject().getArticleId();
54     }
55
56     /**
57      * getArticleName method comment.
58      */

59     public String JavaDoc getArticleName()
60     {
61         return realSubject().getArticleName();
62     }
63
64     /**
65      * getProductGroup method comment.
66      */

67     public InterfaceProductGroup getProductGroup()
68     {
69         return realSubject().getProductGroup();
70     }
71
72     /**
73      * getStockValue method comment.
74      */

75     public double getStockValue()
76     {
77         return realSubject().getStockValue();
78     }
79
80     public void setStock(int stock)
81     {
82         realSubject().setStock(stock);
83     }
84
85     /**
86      * getStock method comment.
87      */

88     public int getStock()
89     {
90         return realSubject().getStock();
91     }
92
93     /**
94      * Insert the method's description here.
95      * Creation date: (08.11.2000 22:38:26)
96      * @return org.apache.ojb.examples.broker.Article
97      */

98     private InterfaceArticle realSubject()
99     {
100         try
101         {
102             return (InterfaceArticle) getRealSubject();
103         }
104         catch (Exception JavaDoc e)
105         {
106             return null;
107         }
108     }
109
110     /**
111      * setArticleId method comment.
112      */

113     public void setArticleId(Integer JavaDoc newArticleId)
114     {
115         realSubject().setArticleId(newArticleId);
116     }
117
118     /**
119      * setArticleName method comment.
120      */

121     public void setArticleName(java.lang.String JavaDoc newArticleName)
122     {
123         realSubject().setArticleName(newArticleName);
124     }
125 }
126
Popular Tags