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 11 public class ArticleProxy extends VirtualProxy implements InterfaceArticle 12 { 13 16 public void setProductGroup(InterfaceProductGroup pg) 17 { 18 realSubject().setProductGroup(pg); 19 } 20 21 public ArticleProxy() 22 { 23 } 24 25 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 43 public void addToStock(int diff) 44 { 45 realSubject().addToStock(diff); 46 } 47 48 51 public Integer getArticleId() 52 { 53 return realSubject().getArticleId(); 54 } 55 56 59 public String getArticleName() 60 { 61 return realSubject().getArticleName(); 62 } 63 64 67 public InterfaceProductGroup getProductGroup() 68 { 69 return realSubject().getProductGroup(); 70 } 71 72 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 88 public int getStock() 89 { 90 return realSubject().getStock(); 91 } 92 93 98 private InterfaceArticle realSubject() 99 { 100 try 101 { 102 return (InterfaceArticle) getRealSubject(); 103 } 104 catch (Exception e) 105 { 106 return null; 107 } 108 } 109 110 113 public void setArticleId(Integer newArticleId) 114 { 115 realSubject().setArticleId(newArticleId); 116 } 117 118 121 public void setArticleName(java.lang.String newArticleName) 122 { 123 realSubject().setArticleName(newArticleName); 124 } 125 } 126 | Popular Tags |