1 package org.apache.ojb.broker; 2 3 import java.io.Serializable ; 4 import java.util.List ; 5 6 import org.apache.ojb.broker.core.proxy.IndirectionHandler; 7 import org.apache.ojb.broker.core.proxy.VirtualProxy; 8 9 10 13 public class ProductGroupProxy extends VirtualProxy implements InterfaceProductGroup, Serializable 14 { 15 public ProductGroupProxy() 16 { 17 } 18 19 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 35 public List getAllArticles() 36 { 37 return realSubject().getAllArticles(); 38 } 39 40 41 public Integer getId() 42 { 43 return realSubject().getId(); 44 } 45 46 47 public String getName() 48 { 49 return realSubject().getName(); 50 } 51 52 57 private ProductGroup realSubject() 58 { 59 try 60 { 61 ProductGroup result = (ProductGroup) getRealSubject(); 62 if (result == null) throw new NullPointerException ("Real subject was null"); 63 return result; 64 } 65 catch (Throwable t) 66 { 67 System.out.println(t.getMessage()); 68 t.printStackTrace(); 69 return null; 70 } 71 } 72 73 public String toString() 74 { 75 return realSubject().toString(); 76 } 77 78 79 public void add(InterfaceArticle article) 80 { 81 realSubject().add(article); 82 } 83 } 84 | Popular Tags |