001: package org.apache.ojb.broker;
002:
003: import org.apache.ojb.broker.core.proxy.IndirectionHandler;
004: import org.apache.ojb.broker.core.proxy.VirtualProxy;
005:
006: /**
007: * Proxy class to class Article. Implements interface InterfaceArticle.
008: * delegates methods calls to the internal Article-object
009: * @author Thomas Mahler
010: */
011: public class ArticleProxy extends VirtualProxy implements
012: InterfaceArticle {
013: /* (non-Javadoc)
014: * @see org.apache.ojb.broker.InterfaceArticle#setProductGroup(org.apache.ojb.broker.InterfaceProductGroup)
015: */
016: public void setProductGroup(InterfaceProductGroup pg) {
017: realSubject().setProductGroup(pg);
018: }
019:
020: public ArticleProxy() {
021: }
022:
023: /**
024: * ArticleProxy constructor comment.
025: * @param uniqueId org.apache.ojb.broker.Identity
026: */
027: public ArticleProxy(PBKey key, Identity uniqueId) {
028: super (key, uniqueId);
029: }
030:
031: public ArticleProxy(IndirectionHandler handler) {
032: super (handler);
033: }
034:
035: /**
036: * addToStock method comment.
037: */
038: public void addToStock(int diff) {
039: realSubject().addToStock(diff);
040: }
041:
042: /**
043: * getArticleId method comment.
044: */
045: public Integer getArticleId() {
046: return realSubject().getArticleId();
047: }
048:
049: /**
050: * getArticleName method comment.
051: */
052: public String getArticleName() {
053: return realSubject().getArticleName();
054: }
055:
056: /**
057: * getProductGroup method comment.
058: */
059: public InterfaceProductGroup getProductGroup() {
060: return realSubject().getProductGroup();
061: }
062:
063: /**
064: * getStockValue method comment.
065: */
066: public double getStockValue() {
067: return realSubject().getStockValue();
068: }
069:
070: public void setStock(int stock) {
071: realSubject().setStock(stock);
072: }
073:
074: /**
075: * getStock method comment.
076: */
077: public int getStock() {
078: return realSubject().getStock();
079: }
080:
081: /**
082: * Insert the method's description here.
083: * Creation date: (08.11.2000 22:38:26)
084: * @return org.apache.ojb.examples.broker.Article
085: */
086: private InterfaceArticle realSubject() {
087: try {
088: return (InterfaceArticle) getRealSubject();
089: } catch (Exception e) {
090: return null;
091: }
092: }
093:
094: /**
095: * setArticleId method comment.
096: */
097: public void setArticleId(Integer newArticleId) {
098: realSubject().setArticleId(newArticleId);
099: }
100:
101: /**
102: * setArticleName method comment.
103: */
104: public void setArticleName(java.lang.String newArticleName) {
105: realSubject().setArticleName(newArticleName);
106: }
107: }
|