001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.enterpriseadmin.search;
016    
017    import com.liferay.portal.kernel.dao.search.DisplayTerms;
018    import com.liferay.portal.kernel.util.ParamUtil;
019    
020    import javax.portlet.PortletRequest;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     * @author Jorge Ferrer
025     */
026    public class OrganizationDisplayTerms extends DisplayTerms {
027    
028            public static final String CITY = "city";
029    
030            public static final String COUNTRY_ID = "countryId";
031    
032            public static final String NAME = "name";
033    
034            public static final String PARENT_ORGANIZATION_ID = "parentOrganizationId";
035    
036            public static final String REGION_ID = "regionId";
037    
038            public static final String STREET = "street";
039    
040            public static final String TYPE = "type";
041    
042            public static final String ZIP = "zip";
043    
044            public OrganizationDisplayTerms(PortletRequest portletRequest) {
045                    super(portletRequest);
046    
047                    city = ParamUtil.getString(portletRequest, CITY);
048                    countryId = ParamUtil.getLong(portletRequest, COUNTRY_ID);
049                    name = ParamUtil.getString(portletRequest, NAME);
050                    parentOrganizationId = ParamUtil.getLong(
051                            portletRequest, PARENT_ORGANIZATION_ID);
052                    regionId = ParamUtil.getLong(portletRequest, REGION_ID);
053                    street = ParamUtil.getString(portletRequest, STREET);
054                    type = ParamUtil.getString(portletRequest, TYPE);
055                    zip = ParamUtil.getString(portletRequest, ZIP);
056            }
057    
058            public String getCity() {
059                    return city;
060            }
061    
062            public long getCountryId() {
063                    return countryId;
064            }
065    
066            public String getName() {
067                    return name;
068            }
069    
070            public long getParentOrganizationId() {
071                    return parentOrganizationId;
072            }
073    
074            public long getRegionId() {
075                    return regionId;
076            }
077    
078            public String getStreet() {
079                    return street;
080            }
081    
082            public String getType() {
083                    return type;
084            }
085    
086            public String getZip() {
087                    return zip;
088            }
089    
090            public void setType(String type) {
091                    this.type = type;
092            }
093    
094            protected String city;
095            protected long countryId;
096            protected String name;
097            protected long parentOrganizationId;
098            protected long regionId;
099            protected String street;
100            protected String type;
101            protected String zip;
102    
103    }