Class GeneralSearchBuilder

    • Constructor Detail

      • GeneralSearchBuilder

        public GeneralSearchBuilder()
      • GeneralSearchBuilder

        public GeneralSearchBuilder​(String queryName)
    • Method Detail

      • setScope

        public void setScope​(String[] paths)
      • setLimit

        public void setLimit​(int limit)
      • setIncludePrimaryTypes

        public void setIncludePrimaryTypes​(String[] includePrimaryTypes)
        Sets the JCR primary types to search for.
        Parameters:
        includePrimaryTypes - String[] of primary types
      • setExcludedPrimaryTypes

        public void setExcludedPrimaryTypes​(String[] excludedPrimaryTypes)
      • setWildcardSearch

        public void setWildcardSearch​(boolean wildcardSearch)
      • setIgnoredChars

        public void setIgnoredChars​(String ignoredChars)
      • setText

        public void setText​(String value)
      • getText

        public String 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

        protected String[] getIncludePrimaryTypes()
      • getScope

        protected String[] getScope()
      • getIgnoredChars

        protected String getIgnoredChars()
      • isWildcardSearch

        protected boolean isWildcardSearch()
      • getQueryStringBuilder

        protected StringBuilder getQueryStringBuilder()
        Makes the JCR Xpath query string
        Returns:
        StringBuilder that represents the JCR Xpath query
      • appendIncludedPrimaryNodeTypeFilter

        protected void appendIncludedPrimaryNodeTypeFilter​(StringBuilder sb)
      • appendExcludedPrimaryNodeTypeFilter

        protected void appendExcludedPrimaryNodeTypeFilter​(StringBuilder sb)
      • buildTypesString

        protected String buildTypesString​(String[] primaryTypes)
      • formatJcrContains

        protected static String formatJcrContains​(String containsTerm)
      • getWhereClause

        protected String getWhereClause​(String value,
                                        boolean wildcardPostfix)
      • appendExtraWhereClauses

        protected void appendExtraWhereClauses​(StringBuilder queryStringBuilder)
        Overriding classes can append extra where clauses. Enclose the clause between square braces.
        Parameters:
        queryStringBuilder - with the partly built up xpath query.
      • appendOrderByClause

        protected void appendOrderByClause​(StringBuilder queryStringBuilder)
      • isoLatin1AccentReplacer

        public static String isoLatin1AccentReplacer​(String input)