001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.dao.search;
016    
017    import com.liferay.portal.kernel.util.StringPool;
018    
019    import javax.servlet.jsp.PageContext;
020    
021    /**
022     * @author Brian Wing Shun Chan
023     */
024    public abstract class SearchEntry implements Cloneable {
025    
026            public static final String DEFAULT_ALIGN = "left";
027    
028            public static final int DEFAULT_COLSPAN = 1;
029    
030            public static final String DEFAULT_CSS_CLASS = StringPool.BLANK;
031    
032            public static final String DEFAULT_VALIGN = "middle";
033    
034            public SearchEntry() {
035            }
036    
037            /**
038             * @deprecated
039             */
040            public SearchEntry(String align, String valign, int colspan) {
041                    _align = align;
042                    _valign = valign;
043                    _colspan = colspan;
044            }
045    
046            public String getAlign() {
047                    return _align;
048            }
049    
050            public int getColspan() {
051                    return _colspan;
052            }
053    
054            public String getCssClass() {
055                    return _cssClass;
056            }
057    
058            public int getIndex() {
059                    return _index;
060            }
061    
062            public String getValign() {
063                    return _valign;
064            }
065    
066            public abstract void print(PageContext pageContext) throws Exception;
067    
068            public void setAlign(String align) {
069                    _align = align;
070            }
071    
072            public void setColspan(int colspan) {
073                    _colspan = colspan;
074            }
075    
076            public void setCssClass(String cssClass) {
077                    _cssClass = cssClass;
078            }
079    
080            public void setIndex(int index) {
081                    _index = index;
082            }
083    
084            public void setValign(String valign) {
085                    _valign = valign;
086            }
087    
088            private String _align = DEFAULT_ALIGN;
089            private int _colspan = DEFAULT_COLSPAN;
090            private String _cssClass = DEFAULT_CSS_CLASS;
091            private int _index;
092            private String _valign = DEFAULT_VALIGN;
093    
094    }