001    /**
002     * Copyright (c) 2000-2013 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.shopping.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     */
025    public class OrderDisplayTerms extends DisplayTerms {
026    
027            public static final String EMAIL_ADDRESS = "emailAddress";
028    
029            public static final String FIRST_NAME = "firstName";
030    
031            public static final String LAST_NAME = "lastName";
032    
033            public static final String NUMBER = "number";
034    
035            public static final String STATUS = "status";
036    
037            public OrderDisplayTerms(PortletRequest portletRequest) {
038                    super(portletRequest);
039    
040                    emailAddress = ParamUtil.getString(portletRequest, EMAIL_ADDRESS);
041                    firstName = ParamUtil.getString(portletRequest, FIRST_NAME);
042                    lastName = ParamUtil.getString(portletRequest, LAST_NAME);
043                    number = ParamUtil.getString(portletRequest, NUMBER);
044                    status = ParamUtil.getString(portletRequest, STATUS);
045            }
046    
047            public String getEmailAddress() {
048                    return emailAddress;
049            }
050    
051            public String getFirstName() {
052                    return firstName;
053            }
054    
055            public String getLastName() {
056                    return lastName;
057            }
058    
059            public String getNumber() {
060                    return number;
061            }
062    
063            public String getStatus() {
064                    return status;
065            }
066    
067            protected String emailAddress;
068            protected String firstName;
069            protected String lastName;
070            protected String number;
071            protected String status;
072    
073    }