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.bean.BeanPropertiesUtil;
018    
019    import javax.servlet.jsp.PageContext;
020    
021    /**
022     * @author Brian Wing Shun Chan
023     */
024    public class ScoreSearchEntry extends SearchEntry {
025    
026            public ScoreSearchEntry() {
027            }
028    
029            /**
030             * @deprecated
031             */
032            public ScoreSearchEntry(float score) {
033                    _score = score;
034            }
035    
036            @Override
037            public Object clone() {
038                    ScoreSearchEntry scoreSearchEntry = new ScoreSearchEntry();
039    
040                    BeanPropertiesUtil.copyProperties(this, scoreSearchEntry);
041    
042                    return scoreSearchEntry;
043            }
044    
045            public float getScore() {
046                    return _score;
047            }
048    
049            @Override
050            public void print(PageContext pageContext) throws Exception {
051                    pageContext.include("/html/taglib/ui/search_iterator/score.jsp");
052            }
053    
054            public void setScore(float score) {
055                    _score = score;
056            }
057    
058            private float _score;
059    
060    }