View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.juddi.datatype.request;
17  
18  import org.apache.juddi.datatype.BusinessKey;
19  import org.apache.juddi.datatype.KeyedReference;
20  import org.apache.juddi.datatype.RegistryObject;
21  
22  /***
23   * @author Steve Viens (sviens@apache.org)
24   */
25  public class FindRelatedBusinesses implements RegistryObject,Inquiry
26  {
27    String businessKey;
28    String generic;
29    KeyedReference keyedReference;
30    FindQualifiers findQualifiers;
31    int maxRows;
32  
33    /***
34     *
35     */
36    public FindRelatedBusinesses()
37    {
38    }
39  
40    /***
41     * Sets the businesskey of this find_related_business request to the given key. Only
42     * businesses related to the of the referenced businessEntity are returned.
43     *
44     * @param key A reference to the businessEntity.
45     */
46    public void setBusinessKey(String key)
47    {
48      this.businessKey = key;
49    }
50  
51    /***
52     * Sets the businesskey of this find_related_business request to the given key. Only
53     * businesses related to the of the referenced businessEntity are returned.
54     *
55     * @param key An instance of BusinessKey
56     */
57    public void setBusinessKey(BusinessKey key)
58    {
59      if (key != null)
60       this.businessKey = key.getValue();
61    }
62  
63    /***
64    * Returns the businesskey of this find_related_business request. Only businesses related
65    * to the of the referenced businessEntity are returned.
66    *
67    * @return The businesskey of the referenced businessEntity.
68    */
69    public String getBusinessKey()
70    {
71      return this.businessKey;
72    }
73  
74    /***
75     *
76     * @param genericValue
77     */
78    public void setGeneric(String genericValue)
79    {
80      this.generic = genericValue;
81    }
82  
83    /***
84     *
85     * @return String UDDI request's generic value.
86     */
87    public String getGeneric()
88    {
89      return this.generic;
90    }
91  
92    /***
93     *
94     */
95    public KeyedReference getKeyedReference()
96    {
97      return this.keyedReference;
98    }
99  
100   /***
101    *
102    */
103   public void setKeyedReference(KeyedReference keyedRef)
104   {
105     this.keyedReference = keyedRef;
106   }
107 
108   /***
109    *
110    */
111   public int getMaxRows()
112   {
113     return maxRows;
114   }
115 
116   /***
117    *
118    */
119   public void setMaxRows(int maxRows)
120   {
121     this.maxRows = maxRows;
122   }
123 
124   /***
125    *
126    */
127   public void setMaxRows(String maxRows)
128   {
129     setMaxRows(Integer.parseInt(maxRows));
130   }
131 
132   /***
133    *
134    */
135   public void addFindQualifier(FindQualifier findQualifier)
136   {
137     if (this.findQualifiers == null)
138       this.findQualifiers = new FindQualifiers();
139     this.findQualifiers.addFindQualifier(findQualifier);
140   }
141 
142   /***
143    *
144    */
145   public void setFindQualifiers(FindQualifiers findQualifiers)
146   {
147     this.findQualifiers = findQualifiers;
148   }
149 
150   /***
151    *
152    */
153   public FindQualifiers getFindQualifiers()
154   {
155     return findQualifiers;
156   }
157 }