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.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 String getAlign() {
035                    return _align;
036            }
037    
038            public int getColspan() {
039                    return _colspan;
040            }
041    
042            public String getCssClass() {
043                    return _cssClass;
044            }
045    
046            public int getIndex() {
047                    return _index;
048            }
049    
050            public String getValign() {
051                    return _valign;
052            }
053    
054            public abstract void print(PageContext pageContext) throws Exception;
055    
056            public void setAlign(String align) {
057                    _align = align;
058            }
059    
060            public void setColspan(int colspan) {
061                    _colspan = colspan;
062            }
063    
064            public void setCssClass(String cssClass) {
065                    _cssClass = cssClass;
066            }
067    
068            public void setIndex(int index) {
069                    _index = index;
070            }
071    
072            public void setValign(String valign) {
073                    _valign = valign;
074            }
075    
076            private String _align = DEFAULT_ALIGN;
077            private int _colspan = DEFAULT_COLSPAN;
078            private String _cssClass = DEFAULT_CSS_CLASS;
079            private int _index;
080            private String _valign = DEFAULT_VALIGN;
081    
082    }