|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.binaryfantasy.murq.search.MurqQuery
public class MurqQuery
A MurqQuery represents critera for content to be returned from
Murq. The results obtained are based on both built-in indexing as well as
locale information and developer defined index properties.
| Method Summary | |
|---|---|
MurqQuery |
addClassTerm(Class clazz,
boolean exclude)
Adds the clazz to this query, checking that content is
assignment-compatible. |
MurqQuery |
addContentIdTerm(String contentId,
boolean exclude)
Adds the contentId to this query, checking that content
has the contentId specified. |
MurqQuery |
addDateCreatedTerm(Date created,
boolean exclude)
Adds the created to this query, checking that content was
created on the created date specified. |
MurqQuery |
addDateModifiedTerm(Date modified,
boolean exclude)
Adds the modified to this query, checking that content was
modified on the modified date specified. |
MurqQuery |
addKeywordTerm(String property,
String keyword,
boolean exclude)
Adds a keyword value that must be matched exactly, including or excluding the results based on the value of exclude. |
MurqQuery |
addLocaleTerm(Locale locale,
boolean exclude)
Adds the locale to this query, checking that content is of
the locale specified. |
MurqQuery |
addQuery(org.apache.lucene.search.Query query,
boolean exclude)
Adds the query to this query, including or excluding it's
results based on the value of exclude. |
MurqQuery |
addQuery(String queryStr,
boolean exclude)
Adds the queryStr to this query, including or excluding
it's results based on the value of exclude. |
MurqQuery |
addRangedDateCreatedTerm(Date from,
Date to,
boolean inclusive,
boolean exclude)
Adds a creation date range to this query, checking that content was created within the date range specified. |
MurqQuery |
addRangedDateModifiedTerm(Date from,
Date to,
boolean inclusive,
boolean exclude)
Adds a modification date range to this query, checking that content was modified within the date range specified. |
MurqQuery |
addRangedKeywordTerm(String property,
String from,
String to,
boolean inclusive,
boolean exclude)
Adds a keyword value that must fall between the from and
to values, including or excluding the results based on the
value of exclude. |
MurqQuery |
allLocales()
Sets this query to ignore locale filtering and return all matching content, even content differing only by locale. |
static MurqQuery |
create()
Creates and returns a new, unconfigured, MurqQuery. |
Comparator<IContent> |
getComparator()
Returns the Comparator to be used for result ordering,
or null to use Lucene relavance ordering. |
Locale |
getLocale()
Returns the Locale for use in localization, or
null if default or no localization is to be done. |
org.apache.lucene.search.Query |
getQuery()
Returns the Lucene Query resulting from this object's
configuration. |
boolean |
isLocalized()
Return true if results will be localized. |
MurqQuery |
locale(Locale locale)
Set the Locale that results should be appropriate for,
based on the method outlined in the
ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
method. |
MurqQuery |
localize()
Sets this query filter content for locale appropriateness, based on the method outlined in the ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
method. |
MurqQuery |
orderBy(Comparator<IContent> orderBy)
Sets the Comparator to be used to order results. |
MurqQuery |
orderBy(String orderBy)
Sets the property to be compared when ordering results. |
MurqQuery |
orderBy(String[] orderBy)
Sets the priority of properties to be compared when ordering results. |
MurqQuery |
orderBy(String[] orderBy,
boolean desc)
Sets the priority of properties to be compared when ordering results. |
MurqQuery |
orderBy(String orderBy,
boolean desc)
Sets the property to be compared when ordering results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MurqQuery create()
MurqQuery.
MurqQuery.
public MurqQuery addQuery(String queryStr,
boolean exclude)
queryStr to this query, including or excluding
it's results based on the value of exclude.
queryStr - the query to be parsed and added.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addQuery(org.apache.lucene.search.Query query,
boolean exclude)
query to this query, including or excluding it's
results based on the value of exclude.
query - the query to be added.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addKeywordTerm(String property,
String keyword,
boolean exclude)
exclude.
property - the name of the content property whose value the keyword
should match.keyword - the value required for a match.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addRangedKeywordTerm(String property,
String from,
String to,
boolean inclusive,
boolean exclude)
from and
to values, including or excluding the results based on the
value of exclude.
property - the name of the content property whose value the keyword range
should match.from - the minimum value required for a match.to - the maximum value required for a match.inclusive - true if values matching the to
and from should be considered a match.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addClassTerm(Class clazz,
boolean exclude)
clazz to this query, checking that content is
assignment-compatible.
clazz - the clazz to use for assignment-compatible comparison.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addLocaleTerm(Locale locale,
boolean exclude)
locale to this query, checking that content is of
the locale specified.
locale - the locale to be matched.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addContentIdTerm(String contentId,
boolean exclude)
contentId to this query, checking that content
has the contentId specified.
contentId - the contentId to be matched.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addDateCreatedTerm(Date created,
boolean exclude)
created to this query, checking that content was
created on the created date specified.
created - the creation date to be matched.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addRangedDateCreatedTerm(Date from,
Date to,
boolean inclusive,
boolean exclude)
from - earliest creation date.to - latest creation date.inclusive - true if values matching the to
and from should be considered a match.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addDateModifiedTerm(Date modified,
boolean exclude)
modified to this query, checking that content was
modified on the modified date specified.
modified - the modification date to be matched.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery addRangedDateModifiedTerm(Date from,
Date to,
boolean inclusive,
boolean exclude)
from - earliest modification date.to - latest modification date.inclusive - true if values matching the to
and from should be considered a match.exclude - true to ensure that matching data is NOT
returned.
public MurqQuery locale(Locale locale)
Locale that results should be appropriate for,
based on the method outlined in the
ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
method.
locale - the most appropriate locale for results.
public MurqQuery localize()
ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
method.
NOTE: This disables allLocales().
public MurqQuery allLocales()
NOTE: This disables localize().
public MurqQuery orderBy(Comparator<IContent> orderBy)
Comparator to be used to order results.
orderBy - the Comparator to be used to order results.
public MurqQuery orderBy(String[] orderBy,
boolean desc)
orderBy - the priority of properties to be compared when ordering
results.desc - true if ordering should be reversed.
public MurqQuery orderBy(String orderBy,
boolean desc)
orderBy - the property to be compared when ordering results.desc - true if ordering should be reversed.
public MurqQuery orderBy(String[] orderBy)
orderBy - the priority of properties to be compared when ordering
results.
public MurqQuery orderBy(String orderBy)
orderBy - the property to be compared when ordering results.
public org.apache.lucene.search.Query getQuery()
Query resulting from this object's
configuration.
Query resulting from this object's
configuration.public Locale getLocale()
Locale for use in localization, or
null if default or no localization is to be done.
Locale for use in localization, or
null if default or no localization is to be done.public Comparator<IContent> getComparator()
Comparator to be used for result ordering,
or null to use Lucene relavance ordering.
Comparator to be used for result ordering,
or null to use Lucene relavance ordering.public boolean isLocalized()
true if results will be localized.
true if results will be localized.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||