1 // license-header java merge-point
2 //
3 // Attention: Generated code! Do not modify by hand!
4 // Generated by: hibernate/HibernateSearchConfiguration.vsl in andromda-spring-cartridge.
5 //
6 package fr.ifremer.quadrige2.core.dao;
7
8 /*-
9 * #%L
10 * Quadrige2 Core :: Server API
11 * %%
12 * Copyright (C) 2017 Ifremer
13 * %%
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Affero General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU Affero General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 * #L%
27 */
28
29 /**
30 * Contains configuration parameters for a <code>CriteriaSearch</code>.
31 *
32 * @author Stefan Reichert
33 * @author Peter Friese
34 */
35 public class CriteriaSearchConfiguration
36 {
37 /**
38 * Constructs a new CriteriaSearchConfiguration instance with all fields set to
39 * either <code>null</code> or <code>false</code>.
40 */
41 public CriteriaSearchConfiguration()
42 {
43 this.forceEagerLoading = false;
44 this.firstResult = null;
45 this.fetchSize = null;
46 this.maximumResultSize = null;
47 }
48
49 /**
50 * If a parameter refers to a childEntity and <code>forceEagerLoading</code> is
51 * <code>true</code>, the childEntity is always loaded. If <code>forceEagerLoading</code> is
52 * <code>false</code>, the loading depends on the persister-configuration of the parentEntity.
53 */
54 private boolean forceEagerLoading;
55
56 /**
57 * Returns whether or not eager loading is enabled.
58 *
59 * @return <code>true</code> if eager loading is enabled, <code>false</code> otherwise
60 */
61 public boolean isForceEagerLoading()
62 {
63 return this.forceEagerLoading;
64 }
65
66 /**
67 * Sets whether or not eager loading is to be enabled.
68 *
69 * @param forceEagerLoadingIn <code>true</code> if eager loading is to be enabled, <code>false</code> otherwise
70 */
71 public void setForceEagerLoading(boolean forceEagerLoadingIn)
72 {
73 this.forceEagerLoading = forceEagerLoadingIn;
74 }
75
76 /**
77 * The first result to retrieve.
78 */
79 private Integer firstResult;
80
81 /**
82 * Gets the first result to retrieve.
83 *
84 * @return the first result to retrieve
85 */
86 public Integer getFirstResult()
87 {
88 return this.firstResult;
89 }
90
91 /**
92 * Sets the first result to retrieve.
93 *
94 * @param firstResultIn the first result to retrieve
95 */
96 public void setFirstResult(Integer firstResultIn)
97 {
98 this.firstResult = firstResultIn;
99 }
100
101 /**
102 * The fetch size.
103 */
104 private Integer fetchSize;
105
106 /**
107 * Gets the fetch size.
108 *
109 * @return the fetch size
110 */
111 public Integer getFetchSize()
112 {
113 return this.fetchSize;
114 }
115
116 /**
117 * Sets the fetch size.
118 *
119 * @param fetchSizeIn the fetch size
120 */
121 public void setFetchSize(Integer fetchSizeIn)
122 {
123 this.fetchSize = fetchSizeIn;
124 }
125
126 /**
127 * If <code>maximumResultSize</code> is not <code>null</code> it limits the maximum size of
128 * the resultList.
129 */
130 private Integer maximumResultSize;
131
132 /**
133 * Gets the maximum size of the search result.
134 *
135 * @return the maximum size of the search result.
136 */
137 public Integer getMaximumResultSize()
138 {
139 return this.maximumResultSize;
140 }
141
142 /**
143 * Sets the maximum size of the result.
144 *
145 * @param maximumResultSizeIn A number indicating how many results will be returned.
146 */
147 public void setMaximumResultSize(Integer maximumResultSizeIn)
148 {
149 this.maximumResultSize = maximumResultSizeIn;
150 }
151 }