|
@@ -52,8 +52,7 @@ |
52 |
52 |
|
} |
53 |
53 |
|
} |
54 |
54 |
|
|
55 |
|
- |
private static POFilteringWhereClause[] createChildren( MetaDataForPO pMD, |
56 |
|
- |
AbstractWhereClauseAssociativeList pWhereClause ) |
|
55 |
+ |
private static POFilteringWhereClause[] createChildren( MetaDataForPO pMD, AbstractWhereClauseAssociativeList pWhereClause ) |
57 |
56 |
|
{ |
58 |
57 |
|
List<WhereClause> zClauses = pWhereClause.getWhereClauseList(); |
59 |
58 |
|
POFilteringWhereClause[] zFilters = new POFilteringWhereClause[zClauses.size()]; |
|
@@ -103,23 +102,19 @@ |
103 |
102 |
|
} |
104 |
103 |
|
} |
105 |
104 |
|
|
106 |
|
- |
private static AttributeAccessorSCD getAASCD( MetaDataForPO pMD, |
107 |
|
- |
AbstractWhereClauseColumnReference pWhereClause ) |
|
105 |
+ |
private static AttributeAccessorSCD getAASCD( MetaDataForPO pMD, AbstractWhereClauseColumnReference pWhereClause ) |
108 |
106 |
|
{ |
109 |
|
- |
AttributeAccessorSCD zSCD = |
110 |
|
- |
pMD.getAccessorSCDoptional( pWhereClause.getColumnDefinition().getName() ); |
|
107 |
+ |
AttributeAccessorSCD zSCD = pMD.getAccessorSCDoptional( pWhereClause.getColumnDefinition().getName() ); |
111 |
108 |
|
return ((zSCD != null) && zSCD.isPersisted()) ? zSCD : null; |
112 |
109 |
|
} |
113 |
110 |
|
|
114 |
|
- |
private static AttributeAccessorSCD getComparableAASCD( MetaDataForPO pMD, |
115 |
|
- |
AbstractWhereClauseColumnReference pWhereClause ) |
|
111 |
+ |
private static AttributeAccessorSCD getComparableAASCD( MetaDataForPO pMD, AbstractWhereClauseColumnReference pWhereClause ) |
116 |
112 |
|
{ |
117 |
113 |
|
AttributeAccessorSCD zSCD = getAASCD( pMD, pWhereClause ); |
118 |
114 |
|
return ((zSCD != null) && zSCD.isColumnTypeComparable()) ? zSCD : null; |
119 |
115 |
|
} |
120 |
116 |
|
|
121 |
|
- |
private static AttributeAccessorSCD getStringAASCD( MetaDataForPO pMD, |
122 |
|
- |
AbstractWhereClauseColumnReference pWhereClause ) |
|
117 |
+ |
private static AttributeAccessorSCD getStringAASCD( MetaDataForPO pMD, AbstractWhereClauseColumnReference pWhereClause ) |
123 |
118 |
|
{ |
124 |
119 |
|
AttributeAccessorSCD zSCD = getAASCD( pMD, pWhereClause ); |
125 |
120 |
|
return ((zSCD != null) && zSCD.isColumnTypeComparable()) ? zSCD : null; |
|
@@ -130,8 +125,7 @@ |
130 |
125 |
|
return (pFilter == null) ? pFilter : new Filter_NOT( pMD, pFilter ); |
131 |
126 |
|
} |
132 |
127 |
|
|
133 |
|
- |
private static POFilteringWhereClause notable( MetaDataForPO pMD, WhereClause pWhereClause, |
134 |
|
- |
POFilteringWhereClause pFilter ) |
|
128 |
+ |
private static POFilteringWhereClause notable( MetaDataForPO pMD, WhereClause pWhereClause, POFilteringWhereClause pFilter ) |
135 |
129 |
|
{ |
136 |
130 |
|
if ( pWhereClause instanceof WhereClauseNotable ) |
137 |
131 |
|
{ |
|
@@ -143,33 +137,28 @@ |
143 |
137 |
|
return pFilter; |
144 |
138 |
|
} |
145 |
139 |
|
|
146 |
|
- |
private static POFilteringWhereClause create_NOT( MetaDataForPO pMD, |
147 |
|
- |
AbstractWhereClauseWrapper pWhereClause ) |
|
140 |
+ |
private static POFilteringWhereClause create_NOT( MetaDataForPO pMD, AbstractWhereClauseWrapper pWhereClause ) |
148 |
141 |
|
{ |
149 |
142 |
|
return not( pMD, create( pMD, pWhereClause.getWrappedWhereClause() ) ); |
150 |
143 |
|
} |
151 |
144 |
|
|
152 |
|
- |
private static POFilteringWhereClause create_OR( MetaDataForPO pMD, |
153 |
|
- |
AbstractWhereClauseAssociativeList pWhereClause ) |
|
145 |
+ |
private static POFilteringWhereClause create_OR( MetaDataForPO pMD, AbstractWhereClauseAssociativeList pWhereClause ) |
154 |
146 |
|
{ |
155 |
147 |
|
return new Filter_OR( pMD, createChildren( pMD, pWhereClause ) ); |
156 |
148 |
|
} |
157 |
149 |
|
|
158 |
|
- |
private static POFilteringWhereClause create_AND( MetaDataForPO pMD, |
159 |
|
- |
AbstractWhereClauseAssociativeList pWhereClause ) |
|
150 |
+ |
private static POFilteringWhereClause create_AND( MetaDataForPO pMD, AbstractWhereClauseAssociativeList pWhereClause ) |
160 |
151 |
|
{ |
161 |
152 |
|
return new Filter_AND( pMD, createChildren( pMD, pWhereClause ) ); |
162 |
153 |
|
} |
163 |
154 |
|
|
164 |
|
- |
private static POFilteringWhereClause create_IS_NULL( MetaDataForPO pMD, |
165 |
|
- |
AbstractWhereClauseColumnAndTypeTo pWhereClause ) |
|
155 |
+ |
private static POFilteringWhereClause create_IS_NULL( MetaDataForPO pMD, AbstractWhereClauseColumnAndTypeTo pWhereClause ) |
166 |
156 |
|
{ |
167 |
157 |
|
AttributeAccessorSCD zSCD = getAASCD( pMD, pWhereClause ); |
168 |
158 |
|
return notable( pMD, pWhereClause, (zSCD != null) ? new Filter_IS_NULL( pMD, zSCD ) : null ); |
169 |
159 |
|
} |
170 |
160 |
|
|
171 |
|
- |
private static POFilteringWhereClause create_EQUALS( MetaDataForPO pMD, |
172 |
|
- |
AbstractWhereClauseColumnAndValue pWhereClause ) |
|
161 |
+ |
private static POFilteringWhereClause create_EQUALS( MetaDataForPO pMD, AbstractWhereClauseColumnAndValue pWhereClause ) |
173 |
162 |
|
{ |
174 |
163 |
|
AttributeAccessorSCD zSCD = getAASCD( pMD, pWhereClause ); |
175 |
164 |
|
Object zValue = convertToColumnType( zSCD, pWhereClause.getValue() ); |
|
@@ -178,8 +167,7 @@ |
178 |
167 |
|
null ); |
179 |
168 |
|
} |
180 |
169 |
|
|
181 |
|
- |
private static POFilteringWhereClause create_LESSTHAN( MetaDataForPO pMD, |
182 |
|
- |
AbstractWhereClauseColumnAndValue pWhereClause ) |
|
170 |
+ |
private static POFilteringWhereClause create_LESSTHAN( MetaDataForPO pMD, AbstractWhereClauseColumnAndValue pWhereClause ) |
183 |
171 |
|
{ |
184 |
172 |
|
AttributeAccessorSCD zSCD = getComparableAASCD( pMD, pWhereClause ); |
185 |
173 |
|
Comparable zValue = convertToComparableColumnType( zSCD, pWhereClause.getValue() ); |
|
@@ -188,8 +176,7 @@ |
188 |
176 |
|
null ); |
189 |
177 |
|
} |
190 |
178 |
|
|
191 |
|
- |
private static POFilteringWhereClause create_GREATERTHAN( MetaDataForPO pMD, |
192 |
|
- |
AbstractWhereClauseColumnAndValue pWhereClause ) |
|
179 |
+ |
private static POFilteringWhereClause create_GREATERTHAN( MetaDataForPO pMD, AbstractWhereClauseColumnAndValue pWhereClause ) |
193 |
180 |
|
{ |
194 |
181 |
|
AttributeAccessorSCD zSCD = getComparableAASCD( pMD, pWhereClause ); |
195 |
182 |
|
Comparable zValue = convertToComparableColumnType( zSCD, pWhereClause.getValue() ); |
|
@@ -198,8 +185,7 @@ |
198 |
185 |
|
null ); |
199 |
186 |
|
} |
200 |
187 |
|
|
201 |
|
- |
private static POFilteringWhereClause create_BETWEEN( MetaDataForPO pMD, |
202 |
|
- |
AbstractWhereClauseColumnAndTwoValues pWhereClause ) |
|
188 |
+ |
private static POFilteringWhereClause create_BETWEEN( MetaDataForPO pMD, AbstractWhereClauseColumnAndTwoValues pWhereClause ) |
203 |
189 |
|
{ |
204 |
190 |
|
AttributeAccessorSCD zSCD = getComparableAASCD( pMD, pWhereClause ); |
205 |
191 |
|
Comparable zLeftValue = convertToComparableColumnType( zSCD, pWhereClause.getLeftValue() ); |
|
@@ -209,8 +195,7 @@ |
209 |
195 |
|
null ); |
210 |
196 |
|
} |
211 |
197 |
|
|
212 |
|
- |
private static POFilteringWhereClause create_IS_ANY_OF( MetaDataForPO pMD, |
213 |
|
- |
AbstractWhereClauseColumnAnd_N_Values pWhereClause ) |
|
198 |
+ |
private static POFilteringWhereClause create_IS_ANY_OF( MetaDataForPO pMD, AbstractWhereClauseColumnAnd_N_Values pWhereClause ) |
214 |
199 |
|
{ |
215 |
200 |
|
AttributeAccessorSCD zSCD = getAASCD( pMD, pWhereClause ); |
216 |
201 |
|
if ( zSCD != null ) |
|
@@ -229,8 +214,7 @@ |
229 |
214 |
|
return null; |
230 |
215 |
|
} |
231 |
216 |
|
|
232 |
|
- |
private static POFilteringWhereClause create_CONTAINS( MetaDataForPO pMD, |
233 |
|
- |
AbstractWhereClauseColumnAndLikeValue pWhereClause ) |
|
217 |
+ |
private static POFilteringWhereClause create_CONTAINS( MetaDataForPO pMD, AbstractWhereClauseColumnAndLikeValue pWhereClause ) |
234 |
218 |
|
{ |
235 |
219 |
|
AttributeAccessorSCD zSCD = getStringAASCD( pMD, pWhereClause ); |
236 |
220 |
|
String zValue = convertToStringColumnType( zSCD, pWhereClause.getValue() ); |
|
@@ -239,8 +223,7 @@ |
239 |
223 |
|
null ); |
240 |
224 |
|
} |
241 |
225 |
|
|
242 |
|
- |
private static POFilteringWhereClause create_STARTS_WITH( MetaDataForPO pMD, |
243 |
|
- |
AbstractWhereClauseColumnAndLikeValue pWhereClause ) |
|
226 |
+ |
private static POFilteringWhereClause create_STARTS_WITH( MetaDataForPO pMD, AbstractWhereClauseColumnAndLikeValue pWhereClause ) |
244 |
227 |
|
{ |
245 |
228 |
|
AttributeAccessorSCD zSCD = getStringAASCD( pMD, pWhereClause ); |
246 |
229 |
|
String zValue = convertToStringColumnType( zSCD, pWhereClause.getValue() ); |
|
@@ -249,8 +232,7 @@ |
249 |
232 |
|
null ); |
250 |
233 |
|
} |
251 |
234 |
|
|
252 |
|
- |
private static POFilteringWhereClause create_ENDS_WITH( MetaDataForPO pMD, |
253 |
|
- |
AbstractWhereClauseColumnAndLikeValue pWhereClause ) |
|
235 |
+ |
private static POFilteringWhereClause create_ENDS_WITH( MetaDataForPO pMD, AbstractWhereClauseColumnAndLikeValue pWhereClause ) |
254 |
236 |
|
{ |
255 |
237 |
|
AttributeAccessorSCD zSCD = getStringAASCD( pMD, pWhereClause ); |
256 |
238 |
|
String zValue = convertToStringColumnType( zSCD, pWhereClause.getValue() ); |
|
@@ -259,8 +241,7 @@ |
259 |
241 |
|
null ); |
260 |
242 |
|
} |
261 |
243 |
|
|
262 |
|
- |
private static POFilteringWhereClause create_LIKE( MetaDataForPO pMD, |
263 |
|
- |
AbstractWhereClauseColumnAndLikeValues pWhereClause ) |
|
244 |
+ |
private static POFilteringWhereClause create_LIKE( MetaDataForPO pMD, AbstractWhereClauseColumnAndLikeValues pWhereClause ) |
264 |
245 |
|
{ |
265 |
246 |
|
AttributeAccessorSCD zSCD = getStringAASCD( pMD, pWhereClause ); |
266 |
247 |
|
if ( zSCD != null ) |
|
@@ -382,8 +363,7 @@ |
382 |
363 |
|
|
383 |
364 |
|
private static class Filter_GREATERTHAN extends AbstractPOFWC_ColumnAndValue |
384 |
365 |
|
{ |
385 |
|
- |
public Filter_GREATERTHAN( MetaDataForPO pMD, AttributeAccessorSCD pColumnDefinition, |
386 |
|
- |
Comparable pValue ) |
|
366 |
+ |
public Filter_GREATERTHAN( MetaDataForPO pMD, AttributeAccessorSCD pColumnDefinition, Comparable pValue ) |
387 |
367 |
|
{ |
388 |
368 |
|
super( WhereClauseType.GREATERTHAN, pMD, pColumnDefinition, pValue ); |
389 |
369 |
|
} |
|
@@ -399,8 +379,7 @@ |
399 |
379 |
|
|
400 |
380 |
|
private static class Filter_BETWEEN extends AbstractPOFWC_ColumnAndTwoValue |
401 |
381 |
|
{ |
402 |
|
- |
public Filter_BETWEEN( MetaDataForPO pMD, AttributeAccessorSCD pColumnDefinition, |
403 |
|
- |
Comparable pLeftValue, Comparable pRightValue ) |
|
382 |
+ |
public Filter_BETWEEN( MetaDataForPO pMD, AttributeAccessorSCD pColumnDefinition, Comparable pLeftValue, Comparable pRightValue ) |
404 |
383 |
|
{ |
405 |
384 |
|
super( WhereClauseType.BETWEEN, pMD, pColumnDefinition, pLeftValue, pRightValue ); |
406 |
385 |
|
} |
|
@@ -502,8 +481,7 @@ |
502 |
481 |
|
|
503 |
482 |
|
private static class Filter_LIKE extends AbstractPOFWC_ColumnAndLikeValues |
504 |
483 |
|
{ |
505 |
|
- |
public Filter_LIKE( MetaDataForPO pMD, AttributeAccessorSCD pColumnDefinition, |
506 |
|
- |
StringMatcher pStringMatcher, String[] pValues ) |
|
484 |
+ |
public Filter_LIKE( MetaDataForPO pMD, AttributeAccessorSCD pColumnDefinition, StringMatcher pStringMatcher, String[] pValues ) |
507 |
485 |
|
{ |
508 |
486 |
|
super( WhereClauseType.LIKE, pMD, pColumnDefinition, pStringMatcher, pValues ); |
509 |
487 |
|
} |