001    /**
002     * Copyright (c) 2000-present 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 java.util.ArrayList;
018    import java.util.List;
019    
020    /**
021     * @author Sergio Gonz??lez
022     */
023    public class SearchContainerResults<R> {
024    
025            public SearchContainerResults() {
026            }
027    
028            public SearchContainerResults(List<R> results, int total) {
029                    _results = results;
030                    _total = total;
031            }
032    
033            public List<R> getResults() {
034                    return _results;
035            }
036    
037            public int getTotal() {
038                    return _total;
039            }
040    
041            public void setResults(List<R> results) {
042                    this._results = results;
043            }
044    
045            public void setTotal(int total) {
046                    this._total = total;
047            }
048    
049            private List<R> _results = new ArrayList<>();
050            private int _total;
051    
052    }