Source code: openfuture/masterdata/test/MyMasterDataProvider.java
1 package openfuture.masterdata.test;
2
3 import openfuture.masterdata.*;
4 import java.util.*;
5
6 /**
7 * This class extends the <tt>DefaultMasterDataProvider</tt> to add some
8 * more behavior for the example: It provides direct access methods to the
9 * Master Data types <tt>Paint</tt> and </Language>.
10 *
11 * Creation date: (10.09.00 09:43:57)
12 * @author: Markus Giebeler
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.<p>
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.<p>
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br>
27 * http://www.gnu.org/copyleft/lesser.html"
28 */
29 public class MyMasterDataProvider extends DefaultMasterDataProvider {
30 /**
31 * Constructor
32 */
33 public MyMasterDataProvider() {
34 super();
35 setService(new MyMasterDataService());
36 }
37 /**
38 * Insert the method's description here.
39 *
40 * Creation date: (10.09.00 09:46:31)
41 * @return openfuture.masterdata.test.Paint
42 * @param id java.lang.String
43 */
44 public Language getLanguage(String id) {
45 return (Language) getMasterData("Language", id);
46 }
47 /**
48 * Insert the method's description here.
49 *
50 * Creation date: (10.09.00 09:47:31)
51 * @return java.util.Vector
52 */
53 public Vector getLanguages() {
54 return getMasterData("Language");
55 }
56 /**
57 * Insert the method's description here.
58 *
59 * Creation date: (10.09.00 09:46:31)
60 * @return openfuture.masterdata.test.Paint
61 * @param id java.lang.String
62 */
63 public Manufacturer getManufacturer(String id) {
64 return (Manufacturer) getMasterData("Manufacturer", id);
65 }
66 /**
67 * Insert the method's description here.
68 *
69 * Creation date: (10.09.00 09:47:31)
70 * @return java.util.Vector
71 */
72 public Vector getManufacturers() {
73 return getMasterData("Manufacturer");
74 }
75 /**
76 * Insert the method's description here.
77 *
78 * Creation date: (10.09.00 09:46:31)
79 * @return openfuture.masterdata.test.Paint
80 * @param id java.lang.String
81 */
82 public Paint getPaint(String id) {
83 return (Paint) getMasterData("Paint", id);
84 }
85 /**
86 * Insert the method's description here.
87 *
88 * Creation date: (10.09.00 09:47:31)
89 * @return java.util.Vector
90 */
91 public Vector getPaints() {
92 return getMasterData("Paint");
93 }
94 }