1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.enterpriseadmin.search;
21  
22  import com.liferay.portal.kernel.dao.search.DisplayTerms;
23  import com.liferay.portal.kernel.util.ParamUtil;
24  
25  import javax.portlet.PortletRequest;
26  
27  /**
28   * <a href="OrganizationDisplayTerms.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   * @author Jorge Ferrer
32   *
33   */
34  public class OrganizationDisplayTerms extends DisplayTerms {
35  
36      public static final String TYPE = "type";
37  
38      public static final String NAME = "name";
39  
40      public static final String STREET = "street";
41  
42      public static final String CITY = "city";
43  
44      public static final String ZIP = "zip";
45  
46      public static final String COUNTRY_ID = "countryId";
47  
48      public static final String REGION_ID = "regionId";
49  
50      public static final String PARENT_ORGANIZATION_ID = "parentOrganizationId";
51  
52      public OrganizationDisplayTerms(PortletRequest portletRequest) {
53          super(portletRequest);
54  
55          type = ParamUtil.getInteger(portletRequest, TYPE);
56          name = ParamUtil.getString(portletRequest, NAME);
57          street = ParamUtil.getString(portletRequest, STREET);
58          city = ParamUtil.getString(portletRequest, CITY);
59          zip = ParamUtil.getString(portletRequest, ZIP);
60          regionId = ParamUtil.getLong(portletRequest, REGION_ID);
61          countryId = ParamUtil.getLong(portletRequest, COUNTRY_ID);
62          parentOrganizationId = ParamUtil.getLong(
63              portletRequest, PARENT_ORGANIZATION_ID);
64      }
65  
66      public int getType() {
67          return type;
68      }
69  
70      public void setType(int type) {
71          this.type = type;
72      }
73  
74      public String getName() {
75          return name;
76      }
77  
78      public String getStreet() {
79          return street;
80      }
81  
82      public String getCity() {
83          return city;
84      }
85  
86      public String getZip() {
87          return zip;
88      }
89  
90      public long getRegionId() {
91          return regionId;
92      }
93  
94      public long getCountryId() {
95          return countryId;
96      }
97  
98      public long getParentOrganizationId() {
99          return parentOrganizationId;
100     }
101 
102     protected int type;
103     protected String name;
104     protected String street;
105     protected String city;
106     protected String zip;
107     protected long regionId;
108     protected long countryId;
109     protected long parentOrganizationId;
110 
111 }