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.quadrige3.core.dao;
7
8 /*-
9 * #%L
10 * Quadrige3 Core :: Client API
11 * %%
12 * Copyright (C) 2017 - 2024 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 * Contains configuration parameters for a <code>CriteriaSearch</code>.
30 *
31 * @author Stefan Reichert
32 * @author Peter Friese
33 */
34 public class CriteriaSearchConfiguration
35 {
36 /**
37 * Constructs a new CriteriaSearchConfiguration instance with all fields set to
38 * either <code>null</code> or <code>false</code>.
39 */
40 public CriteriaSearchConfiguration()
41 {
42 this.forceEagerLoading = false;
43 this.firstResult = null;
44 this.fetchSize = null;
45 this.maximumResultSize = null;
46 }
47
48 /**
49 * If a parameter refers to a childEntity and <code>forceEagerLoading</code> is
50 * <code>true</code>, the childEntity is always loaded. If <code>forceEagerLoading</code> is
51 * <code>false</code>, the loading depends on the persister-configuration of the parentEntity.
52 */
53 private boolean forceEagerLoading;
54
55 /**
56 * Returns whether or not eager loading is enabled.
57 *
58 * @return <code>true</code> if eager loading is enabled, <code>false</code> otherwise
59 */
60 public boolean isForceEagerLoading()
61 {
62 return this.forceEagerLoading;
63 }
64
65 /**
66 * Sets whether or not eager loading is to be enabled.
67 *
68 * @param forceEagerLoadingIn <code>true</code> if eager loading is to be enabled, <code>false</code> otherwise
69 */
70 public void setForceEagerLoading(boolean forceEagerLoadingIn)
71 {
72 this.forceEagerLoading = forceEagerLoadingIn;
73 }
74
75 /**
76 * The first result to retrieve.
77 */
78 private Integer firstResult;
79
80 /**
81 * Gets the first result to retrieve.
82 *
83 * @return the first result to retrieve
84 */
85 public Integer getFirstResult()
86 {
87 return this.firstResult;
88 }
89
90 /**
91 * Sets the first result to retrieve.
92 *
93 * @param firstResultIn the first result to retrieve
94 */
95 public void setFirstResult(Integer firstResultIn)
96 {
97 this.firstResult = firstResultIn;
98 }
99
100 /**
101 * The fetch size.
102 */
103 private Integer fetchSize;
104
105 /**
106 * Gets the fetch size.
107 *
108 * @return the fetch size
109 */
110 public Integer getFetchSize()
111 {
112 return this.fetchSize;
113 }
114
115 /**
116 * Sets the fetch size.
117 *
118 * @param fetchSizeIn the fetch size
119 */
120 public void setFetchSize(Integer fetchSizeIn)
121 {
122 this.fetchSize = fetchSizeIn;
123 }
124
125 /**
126 * If <code>maximumResultSize</code> is not <code>null</code> it limits the maximum size of
127 * the resultList.
128 */
129 private Integer maximumResultSize;
130
131 /**
132 * Gets the maximum size of the search result.
133 *
134 * @return the maximum size of the search result.
135 */
136 public Integer getMaximumResultSize()
137 {
138 return this.maximumResultSize;
139 }
140
141 /**
142 * Sets the maximum size of the result.
143 *
144 * @param maximumResultSizeIn A number indicating how many results will be returned.
145 */
146 public void setMaximumResultSize(Integer maximumResultSizeIn)
147 {
148 this.maximumResultSize = maximumResultSizeIn;
149 }
150 }