Mark Rogers 7a1d7666f5 Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
84958: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      83712: ACE-2612: Added option to lower case Suggester term (addressing the review comments). Also refactored the Suggester service to take 'SuggesterParameters' as a method parameter.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85273 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2014-09-20 09:27:37 +00:00

82 lines
2.1 KiB
Java

/*
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.service.cmr.search;
/**
* This class defines suggester parameters
*
* @author Jamal Kaabi-Mofrad
* @since 5.0
*/
public class SuggesterParameters
{
private final String term;
private final int limit;
private final boolean termIsCaseSensitive;
public SuggesterParameters(String term)
{
this(term, -1, false);
}
public SuggesterParameters(String term, int limit, boolean termIsCaseSensitive)
{
this.term = term;
this.limit = limit;
this.termIsCaseSensitive = termIsCaseSensitive;
}
/**
* @return the term
*/
public String getTerm()
{
return this.term;
}
/**
* @return the limit
*/
public int getLimit()
{
return this.limit;
}
/**
* @return the termIsCaseSensitive
*/
public boolean isTermIsCaseSensitive()
{
return this.termIsCaseSensitive;
}
/*
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
StringBuilder builder = new StringBuilder(200);
builder.append("SuggesterParameters [term=").append(this.term).append(", limit=").append(this.limit)
.append(", termIsCaseSensitive=").append(this.termIsCaseSensitive).append("]");
return builder.toString();
}
}