View Javadoc

1   /**
2    * Copyright (C) 2005-2009 Alfresco Software Limited.
3    *
4    * This file is part of the Spring Surf Extension project.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *  http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package org.springframework.webflow.samples.booking;
20  
21  import java.io.Serializable;
22  
23  
24  /**
25   * A backing bean for the main hotel search form. Encapsulates the criteria needed to perform a hotel search.
26   * 
27   * It is expected a future milestone of Spring Web Flow 2.0 will allow flow-scoped beans like this one to hold
28   * references to transient services that are restored automatically when the flow is resumed on subsequent requests.
29   * This would allow this SearchCriteria object to delegate to the {@link TravelService} directly, for example,
30   * eliminating the need for the actions in {@link MainActions}.
31   */
32  public class SearchCriteria implements Serializable {
33  
34      private static final long serialVersionUID = 1L;
35  
36      /**
37       * The user-provided search criteria for finding Hotels.
38       */
39      private String searchString;
40  
41      /**
42       * The maximum page size of the Hotel result list
43       */
44      private int pageSize;
45  
46      /**
47       * The current page of the Hotel result list.
48       */
49      private int page;
50  
51      public String getSearchString() {
52  	return searchString;
53      }
54  
55      public void setSearchString(String searchString) {
56  	this.searchString = searchString;
57      }
58  
59      public int getPageSize() {
60  	return pageSize;
61      }
62  
63      public void setPageSize(int pageSize) {
64  	this.pageSize = pageSize;
65      }
66  
67      public int getPage() {
68  	return page;
69      }
70  
71      public void setPage(int page) {
72  	this.page = page;
73      }
74  }