mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
SEARCH-419: Correct handling of fieldfacet label and exclusion filters
This commit is contained in:
@@ -1289,6 +1289,8 @@ public class SearchParameters implements BasicSearchParameters
|
|||||||
public static class FieldFacet
|
public static class FieldFacet
|
||||||
{
|
{
|
||||||
String field;
|
String field;
|
||||||
|
String label;
|
||||||
|
List<String> excludeFilters;
|
||||||
String prefix = null;
|
String prefix = null;
|
||||||
FieldFacetSort sort = null;
|
FieldFacetSort sort = null;
|
||||||
Integer limitOrNull = null;
|
Integer limitOrNull = null;
|
||||||
@@ -1411,70 +1413,78 @@ public class SearchParameters implements BasicSearchParameters
|
|||||||
this.enumMethodCacheMinDF = enumMethodCacheMinDF;
|
this.enumMethodCacheMinDF = enumMethodCacheMinDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLabel()
|
||||||
|
{
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label)
|
||||||
|
{
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getExcludeFilters()
|
||||||
|
{
|
||||||
|
return excludeFilters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExcludeFilters(List<String> excludeFilters)
|
||||||
|
{
|
||||||
|
this.excludeFilters = excludeFilters;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o)
|
||||||
|
{
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
FieldFacet that = (FieldFacet) o;
|
||||||
|
|
||||||
|
if (offset != that.offset)
|
||||||
|
return false;
|
||||||
|
if (minCount != that.minCount)
|
||||||
|
return false;
|
||||||
|
if (countDocsMissingFacetField != that.countDocsMissingFacetField)
|
||||||
|
return false;
|
||||||
|
if (enumMethodCacheMinDF != that.enumMethodCacheMinDF)
|
||||||
|
return false;
|
||||||
|
if (!field.equals(that.field))
|
||||||
|
return false;
|
||||||
|
if (label != null ? !label.equals(that.label) : that.label != null)
|
||||||
|
return false;
|
||||||
|
if (excludeFilters != null ? !excludeFilters.equals(that.excludeFilters) : that.excludeFilters != null)
|
||||||
|
return false;
|
||||||
|
if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null)
|
||||||
|
return false;
|
||||||
|
if (sort != that.sort)
|
||||||
|
return false;
|
||||||
|
if (limitOrNull != null ? !limitOrNull.equals(that.limitOrNull) : that.limitOrNull != null)
|
||||||
|
return false;
|
||||||
|
if (method != that.method)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
final int prime = 31;
|
int result = field.hashCode();
|
||||||
int result = 1;
|
result = 31 * result + (label != null ? label.hashCode() : 0);
|
||||||
result = prime * result + (countDocsMissingFacetField ? 1231 : 1237);
|
result = 31 * result + (excludeFilters != null ? excludeFilters.hashCode() : 0);
|
||||||
result = prime * result + enumMethodCacheMinDF;
|
result = 31 * result + (prefix != null ? prefix.hashCode() : 0);
|
||||||
result = prime * result + ((field == null) ? 0 : field.hashCode());
|
result = 31 * result + (sort != null ? sort.hashCode() : 0);
|
||||||
result = prime * result + ((limitOrNull == null) ? 0 : limitOrNull.hashCode());
|
result = 31 * result + (limitOrNull != null ? limitOrNull.hashCode() : 0);
|
||||||
result = prime * result + ((method == null) ? 0 : method.hashCode());
|
result = 31 * result + offset;
|
||||||
result = prime * result + minCount;
|
result = 31 * result + minCount;
|
||||||
result = prime * result + offset;
|
result = 31 * result + (countDocsMissingFacetField ? 1 : 0);
|
||||||
result = prime * result + ((prefix == null) ? 0 : prefix.hashCode());
|
result = 31 * result + (method != null ? method.hashCode() : 0);
|
||||||
result = prime * result + ((sort == null) ? 0 : sort.hashCode());
|
result = 31 * result + enumMethodCacheMinDF;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object obj)
|
|
||||||
{
|
|
||||||
if (this == obj)
|
|
||||||
return true;
|
|
||||||
if (obj == null)
|
|
||||||
return false;
|
|
||||||
if (getClass() != obj.getClass())
|
|
||||||
return false;
|
|
||||||
FieldFacet other = (FieldFacet) obj;
|
|
||||||
if (countDocsMissingFacetField != other.countDocsMissingFacetField)
|
|
||||||
return false;
|
|
||||||
if (enumMethodCacheMinDF != other.enumMethodCacheMinDF)
|
|
||||||
return false;
|
|
||||||
if (field == null)
|
|
||||||
{
|
|
||||||
if (other.field != null)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (!field.equals(other.field))
|
|
||||||
return false;
|
|
||||||
if (limitOrNull == null)
|
|
||||||
{
|
|
||||||
if (other.limitOrNull != null)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (!limitOrNull.equals(other.limitOrNull))
|
|
||||||
return false;
|
|
||||||
if (method != other.method)
|
|
||||||
return false;
|
|
||||||
if (minCount != other.minCount)
|
|
||||||
return false;
|
|
||||||
if (offset != other.offset)
|
|
||||||
return false;
|
|
||||||
if (prefix == null)
|
|
||||||
{
|
|
||||||
if (other.prefix != null)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (!prefix.equals(other.prefix))
|
|
||||||
return false;
|
|
||||||
if (sort != other.sort)
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user