1 /***
2 Copyright (C) 2005 The Java Community
3
4 This program is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free Software
6 Foundation; either version 2 of the License, or (at your option) any later
7 version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 Place, Suite 330, Boston, MA 02111-1307 USA.
16
17 */
18
19 package org.bejug.javacareers.jobs.view.jsf.model;
20
21 import org.bejug.javacareers.jobs.view.jsf.util.PdfSearchResultSorter;
22
23 import javax.faces.model.ArrayDataModel;
24 import javax.faces.model.DataModel;
25 import java.util.ArrayList;
26 import java.util.List;
27
28 /***
29 * Todo: PdfListData is the same - good excuse for introducing a general class.
30 * @author Peter Symoens (Last modified by $Author: shally $)
31 * @version $Revision: 1.10 $ - $Date: 2005/12/20 15:36:47 $
32 */
33 public class PdfSearchResultData {
34
35 /***
36 * The filtered job offer model.
37 */
38 private DataModel filterModel;
39
40 /***
41 * The job offer list.
42 */
43 private static List searchResults = new ArrayList();
44
45 /***
46 * @param searchResultList
47 * The searchResults to set.
48 */
49 public static void setSearchResults(List searchResultList) {
50 searchResults = searchResultList;
51 }
52
53 /***
54 *
55 * @return Returns the dataModel
56 */
57 public DataModel getSearchResults() {
58 ArrayDataModel model = new ArrayDataModel(searchResults.toArray());
59
60 if (filterModel == null) {
61 filterModel = new PdfSearchResultSorter(model);
62 }
63
64 return filterModel;
65 }
66 }
67 /***
68 * $Log: PdfSearchResultData.java,v $
69 * Revision 1.10 2005/12/20 15:36:47 shally
70 * CheckStyle and PMD changes.
71 *
72 * Revision 1.9 2005/10/11 10:07:20 stephan_janssen
73 * Code cleanup.
74 *
75 * Revision 1.8 2005/10/11 10:05:45 stephan_janssen
76 * Code cleanup.
77 *
78 * Revision 1.7 2005/09/13 08:11:06 schauwvliege
79 * organize imports
80 *
81 * Revision 1.6 2005/08/10 09:04:49 bavo_jcs
82 * Optimized imports according to checkstyle
83 *
84 * Revision 1.5 2005/08/09 12:59:56 bavo_jcs
85 * Optimized imports
86 *
87 * Revision 1.4 2005/07/11 15:01:42 bavo_jcs
88 * PDF Ajax integration
89 *
90 * Revision 1.3 2005/06/14 12:05:54 schauwvliege
91 * CheckStyle and fixing tests
92 *
93 * Revision 1.2 2005/06/09 08:18:53 bejug_cc
94 * Fix initial import
95 *
96 * Revision 1.2 2005/06/07 09:35:50 PSONG09
97 * update javadoc
98 *
99 * Revision 1.1 2005/05/23 15:11:53 PSONG09
100 * integration pdf indexing update
101 *
102 **/