|
|
@@ -79,7 +79,7 @@ public class RecipeSearchBizLuceneImpl implements RecipeSearchBiz, RecipeSearchI
|
|
|
*/
|
|
|
private static final String LUCENE_SORT_ERROR_EMPTY_INDEX = "no terms";
|
|
|
|
|
|
- private static final Integer ZERO = new Integer(0);
|
|
|
+ private static final Integer ZERO = 0;
|
|
|
|
|
|
private final Logger log = Logger.getLogger(RecipeSearchBizLuceneImpl.class);
|
|
|
|
|
|
@@ -120,12 +120,12 @@ public class RecipeSearchBizLuceneImpl implements RecipeSearchBiz, RecipeSearchI
|
|
|
Set<Integer> tmpSet = new TreeSet<Integer>(); // to sort
|
|
|
for ( int i = 0; i < allowableRecipeIndexPageSizes.length; i++ ) {
|
|
|
if ( allowableRecipeIndexPageSizes[i] < 1 ) {
|
|
|
- tmpSet.add(new Integer(-1));
|
|
|
+ tmpSet.add(-1);
|
|
|
} else {
|
|
|
- tmpSet.add(new Integer(allowableRecipeIndexPageSizes[i]));
|
|
|
+ tmpSet.add(allowableRecipeIndexPageSizes[i]);
|
|
|
}
|
|
|
}
|
|
|
- if ( !tmpSet.contains(new Integer(defaultRecipeIndexPageSize)) ) {
|
|
|
+ if ( !tmpSet.contains(defaultRecipeIndexPageSize) ) {
|
|
|
throw new RuntimeException("defaultRecipeIndexPageSize value '"
|
|
|
+defaultRecipeIndexPageSize +"' not available in allowableRecipeIndexPageSizes set "
|
|
|
+tmpSet);
|
|
|
@@ -133,7 +133,7 @@ public class RecipeSearchBizLuceneImpl implements RecipeSearchBiz, RecipeSearchI
|
|
|
int[] tmpArray = new int[tmpSet.size()];
|
|
|
int i = 0;
|
|
|
this.recipePagination = domainObjectFactory.getPaginationSupportInstance();
|
|
|
- this.recipePagination.setDefaultPageSize(new Integer(defaultRecipeIndexPageSize));
|
|
|
+ this.recipePagination.setDefaultPageSize(defaultRecipeIndexPageSize);
|
|
|
for ( Iterator itr = tmpSet.iterator(); itr.hasNext(); i++ ) {
|
|
|
Integer anInt = (Integer)itr.next();
|
|
|
tmpArray[i] = anInt.intValue();
|
|
|
@@ -155,12 +155,12 @@ public class RecipeSearchBizLuceneImpl implements RecipeSearchBiz, RecipeSearchI
|
|
|
tmpSet.clear();
|
|
|
for ( i = 0; i < allowableUserIndexPageSizes.length; i++ ) {
|
|
|
if ( allowableUserIndexPageSizes[i] < 1 ) {
|
|
|
- tmpSet.add(new Integer(-1));
|
|
|
+ tmpSet.add(-1);
|
|
|
} else {
|
|
|
- tmpSet.add(new Integer(allowableUserIndexPageSizes[i]));
|
|
|
+ tmpSet.add(allowableUserIndexPageSizes[i]);
|
|
|
}
|
|
|
}
|
|
|
- if ( !tmpSet.contains(new Integer(defaultUserIndexPageSize)) ) {
|
|
|
+ if ( !tmpSet.contains(defaultUserIndexPageSize) ) {
|
|
|
throw new RuntimeException("defaultUserIndexPageSize value '"
|
|
|
+defaultUserIndexPageSize +"' not available in allowableUserIndexPageSizes set "
|
|
|
+tmpSet);
|
|
|
@@ -168,7 +168,7 @@ public class RecipeSearchBizLuceneImpl implements RecipeSearchBiz, RecipeSearchI
|
|
|
tmpArray = new int[tmpSet.size()];
|
|
|
i = 0;
|
|
|
this.userPagination = domainObjectFactory.getPaginationSupportInstance();
|
|
|
- this.userPagination.setDefaultPageSize(new Integer(defaultUserIndexPageSize));
|
|
|
+ this.userPagination.setDefaultPageSize(defaultUserIndexPageSize);
|
|
|
for ( Iterator itr = tmpSet.iterator(); itr.hasNext(); i++ ) {
|
|
|
Integer anInt = (Integer)itr.next();
|
|
|
tmpArray[i] = anInt.intValue();
|
|
|
@@ -391,8 +391,8 @@ public class RecipeSearchBizLuceneImpl implements RecipeSearchBiz, RecipeSearchI
|
|
|
results.setTotalResults(ZERO);
|
|
|
}
|
|
|
|
|
|
- results.setPageSize(new Integer(pageSize));
|
|
|
- results.setPageStart(new Integer(criteria.getPageStart()));
|
|
|
+ results.setPageSize(pageSize);
|
|
|
+ results.setPageStart(criteria.getPageStart());
|
|
|
results.setUiIndex(index);
|
|
|
|
|
|
return matches;
|
|
|
@@ -593,7 +593,7 @@ public class RecipeSearchBizLuceneImpl implements RecipeSearchBiz, RecipeSearchI
|
|
|
domainObjectFactory.getIndexSelectionTypeInstance();
|
|
|
section.setIndexKey(aSection);
|
|
|
int count = getIndexCount(indexType,aSection);
|
|
|
- section.setCount(new Integer(count));
|
|
|
+ section.setCount(count);
|
|
|
if ( aSection.equals(displaySection) ) {
|
|
|
section.setSelected(true);
|
|
|
}
|