01: package com.jat.business;
02:
03: import java.util.Enumeration;
04: import java.util.Vector;
05: import java.io.Serializable;
06:
07: /**
08: * <p>Title: JAT</p>
09: * <p>Description: </p>
10: * <p>Copyright: Copyright (c) 2004 -2005 Stefano Fratini (stefano.fratini@gmail.com)</p>
11: * <p>Distributed under the terms of the GNU Lesser General Public License, v2.1 or later</p>
12: * @author stf
13: * @version 1.1
14: */
15:
16: public class MultiBusinessObjectProperties implements Serializable {
17:
18: public MultiBusinessObjectProperties() {
19: }
20:
21: public void put(String name, BusinessObjectProperties properties) {
22: this .properties.addElement(new DataRequest(name, properties));
23: }
24:
25: public void put(String name, BusinessObject bo) {
26: this .put(name, bo.getProperties());
27: }
28:
29: public int size() {
30: return this .properties.size();
31: }
32:
33: public DataRequest elementAt(int index) {
34: return (DataRequest) this .properties.elementAt(index);
35: }
36:
37: public Enumeration elements() {
38: return this .properties.elements();
39: }
40:
41: private Vector properties = new Vector();
42:
43: public class DataRequest {
44:
45: protected DataRequest(String name,
46: BusinessObjectProperties properties) {
47: this .queryName = name;
48: this .props = properties;
49: }
50:
51: public String getName() {
52: return this .queryName;
53: }
54:
55: public BusinessObjectProperties getProperties() {
56: return this .props;
57: }
58:
59: private String queryName;
60: private BusinessObjectProperties props;
61: }
62: }
|