Class GeneralSearchBuilder
java.lang.Object
org.hippoecm.frontend.plugins.standards.search.GeneralSearchBuilder
- Direct Known Subclasses:
TextSearchBuilder
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendContains
(StringBuilder queryStringBuilder, String searchTerm) protected void
protected void
appendExtraWhereClauses
(StringBuilder queryStringBuilder) Overriding classes can append extra where clauses.protected void
protected void
appendOrderByClause
(StringBuilder queryStringBuilder) protected void
protected String
buildTypesString
(String[] primaryTypes) protected static String
formatJcrContains
(String containsTerm) protected String
protected String[]
protected int
Get the minimal lentgh a search term must have before wildcarding is applied.protected StringBuilder
Makes the JCR Xpath query stringprotected String[]
getScope()
getText()
protected String
getWhereClause
(String value, boolean wildcardPostfix) static String
isoLatin1AccentReplacer
(String input) protected boolean
void
setExcludedPrimaryTypes
(String[] excludedPrimaryTypes) void
setIgnoredChars
(String ignoredChars) void
setIncludePrimaryTypes
(String[] includePrimaryTypes) Sets the JCR primary types to search for.void
setLimit
(int limit) void
setMinimalLength
(int minimalLength) Set the minimal length a search term must have before wildcarding is applied.void
void
void
setWildcardSearch
(boolean wildcardSearch)
-
Field Details
-
TEXT_QUERY_NAME
- See Also:
-
-
Constructor Details
-
GeneralSearchBuilder
public GeneralSearchBuilder() -
GeneralSearchBuilder
-
-
Method Details
-
setScope
-
setLimit
public void setLimit(int limit) -
setIncludePrimaryTypes
Sets the JCR primary types to search for.- Parameters:
includePrimaryTypes
-String
[] of primary types
-
setExcludedPrimaryTypes
-
setWildcardSearch
public void setWildcardSearch(boolean wildcardSearch) -
setIgnoredChars
-
setText
-
getText
-
setMinimalLength
public void setMinimalLength(int minimalLength) Set the minimal length a search term must have before wildcarding is applied. -
getMinimalLength
protected int getMinimalLength()Get the minimal lentgh a search term must have before wildcarding is applied. -
getIncludePrimaryTypes
-
getScope
-
getIgnoredChars
-
isWildcardSearch
protected boolean isWildcardSearch() -
getResultModel
-
getQueryStringBuilder
Makes the JCR Xpath query string- Returns:
- StringBuilder that represents the JCR Xpath query
-
appendIncludedPrimaryNodeTypeFilter
-
appendExcludedPrimaryNodeTypeFilter
-
buildTypesString
-
appendScope
-
appendContains
protected void appendContains(StringBuilder queryStringBuilder, String searchTerm) throws InvalidQueryException - Throws:
InvalidQueryException
-
formatJcrContains
-
getWhereClause
-
appendExtraWhereClauses
Overriding classes can append extra where clauses. Enclose the clause between square braces.- Parameters:
queryStringBuilder
- with the partly built up xpath query.
-
appendOrderByClause
-
isoLatin1AccentReplacer
-