KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > store > products > MirrorProductArchive


1 /*
2  * Created on Jul 13, 2006
3  */

4 package com.openedit.store.products;
5
6 import java.util.List JavaDoc;
7
8 import com.openedit.OpenEditException;
9 import com.openedit.store.Product;
10 import com.openedit.store.ProductArchive;
11 import com.openedit.store.ProductPathFinder;
12 import com.openedit.store.Store;
13 import com.openedit.store.StoreException;
14 import com.openedit.store.Types;
15
16 public class MirrorProductArchive implements ProductArchive
17 {
18     protected ProductArchive fieldBaseArchive;
19     protected ProductArchive fieldMirrorArchive;
20     
21     public ProductArchive getBaseArchive()
22     {
23         return fieldBaseArchive;
24     }
25
26     public void setBaseArchive(ProductArchive inBaseArchive)
27     {
28         fieldBaseArchive = inBaseArchive;
29     }
30
31     public ProductArchive getMirrorArchive()
32     {
33         return fieldMirrorArchive;
34     }
35
36     public void setMirrorArchive(ProductArchive inMirrorArchive)
37     {
38         fieldMirrorArchive = inMirrorArchive;
39     }
40
41     public void clearProduct(Product inProduct)
42     {
43         fieldBaseArchive.clearProduct(inProduct);
44     }
45
46     public void clearProducts()
47     {
48         fieldBaseArchive.clearProducts();
49     }
50
51     public void deleteProduct(Product inItem) throws StoreException
52     {
53         fieldBaseArchive.deleteProduct(inItem);
54     }
55
56     public Product getProduct(String JavaDoc inId) throws StoreException
57     {
58         return fieldBaseArchive.getProduct(inId);
59     }
60
61     public ProductPathFinder getProductPathFinder()
62     {
63         return fieldBaseArchive.getProductPathFinder();
64     }
65
66     public PropertyDetails getPropertyDetails() throws StoreException
67     {
68         return fieldBaseArchive.getPropertyDetails();
69     }
70
71     public Store getStore()
72     {
73         return fieldBaseArchive.getStore();
74     }
75
76     public List JavaDoc listAllProductIds()
77     {
78         return fieldBaseArchive.listAllProductIds();
79     }
80
81     public String JavaDoc loadDescription(Product inProduct) throws StoreException
82     {
83         return fieldBaseArchive.loadDescription(inProduct);
84     }
85
86     public String JavaDoc nextProductNumber(Store inStore) throws StoreException
87     {
88         return fieldBaseArchive.nextProductNumber(inStore);
89     }
90
91     public void saveBlankProductDescription(Product inProduct) throws StoreException
92     {
93         fieldBaseArchive.saveBlankProductDescription(inProduct);
94     }
95
96     public void saveProduct(Product inInItem) throws StoreException
97     {
98         fieldBaseArchive.saveProduct(inInItem);
99         if (fieldMirrorArchive != null)
100         {
101             fieldMirrorArchive.saveProduct(inInItem);
102         }
103     }
104
105     public void saveProductDescription(Product inProduct, String JavaDoc inDescription) throws StoreException
106     {
107         fieldBaseArchive.saveProductDescription(inProduct, inDescription);
108     }
109
110     public void setStore(Store inDir)
111     {
112         fieldBaseArchive.setStore(inDir);
113     }
114     
115 }
116
Popular Tags