|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.sconman.Query
public class Query
Query
represents queries over the content store. Use its methods to
build complex queries.
Field Summary | |
---|---|
(package private) static org.apache.lucene.analysis.Analyzer |
analyzer
The query analyzer |
Constructor Summary | |
---|---|
Query()
Builds an empty query |
|
Query(java.lang.String query)
Builds a query from a Lucene query expression |
Method Summary | |
---|---|
Query |
andAuthorEquals(User author)
The contents MUST be owned by the specified user |
Query |
andBelowCategory(Category category)
The content MUST be below the specified category |
Query |
andBelowCategoryIn(Category[] cats)
The content MUST be below the specified categories |
Query |
andCategoryEquals(Category cat)
The contents MUST be in the specified category |
Query |
andCategoryIn(Category[] cats)
The contents MUST be among the specified categories |
Query |
andContentTypeEquals(ContentType ctype)
The contents MUST be of the specified type |
Query |
andContentTypeIn(ContentType[] ctypes)
The contents MUST be among the specified content types |
Query |
andFieldEquals(java.lang.String field,
java.lang.String value)
The field MUST have the specified value |
Query |
andFieldInRange(java.lang.String field,
java.util.Date from,
java.util.Date to,
boolean included)
The content MUST have a date field in the given range |
Query |
andFieldInRange(java.lang.String field,
java.lang.String from,
java.lang.String to,
boolean included)
The content MUST have a field in the given range |
Query |
andFieldMatches(java.lang.String field,
java.lang.String value)
The field can have any word of value |
Query |
andNotBelowCategory(Category category)
The content MUST be below the specified category |
(package private) org.apache.lucene.search.BooleanQuery |
getLuceneQuery()
Returns the internal Lucene query |
Query |
orFieldEquals(java.lang.String field,
java.lang.String value)
The field COULD have the specified value |
(package private) static org.apache.lucene.search.Query |
parseQuery(java.lang.String query)
Parses a user query String |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final org.apache.lucene.analysis.Analyzer analyzer
Constructor Detail |
---|
public Query()
public Query(java.lang.String query)
query
- The Lucene queryMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
org.apache.lucene.search.BooleanQuery getLuceneQuery()
public Query andCategoryEquals(Category cat)
cat
- The category where the contents MUST bepublic Query andAuthorEquals(User author)
author
- The contents authorpublic Query andBelowCategory(Category category)
category
- public Query andBelowCategoryIn(Category[] cats)
cats
- The category list where the contents MUST be amongpublic Query andNotBelowCategory(Category category)
category
- public Query andCategoryIn(Category[] cats)
cats
- The category list where the contents MUST be amongpublic Query andContentTypeEquals(ContentType ctype)
ctype
- The content type the content MUST bepublic Query andContentTypeIn(ContentType[] ctypes)
cats
- The content type list where the contents MUST be amongpublic Query andFieldEquals(java.lang.String field, java.lang.String value)
field
- The field to constraintvalue
- The value that the field MUST havepublic Query orFieldEquals(java.lang.String field, java.lang.String value)
field
- The field to constraintvalue
- The value that the field COULD havepublic Query andFieldInRange(java.lang.String field, java.lang.String from, java.lang.String to, boolean included)
field
- The field to constraintfrom
- The lower boundto
- The upper boundincluded
- True to include boundspublic Query andFieldInRange(java.lang.String field, java.util.Date from, java.util.Date to, boolean included)
field
- The date field to constraintfrom
- The lower boundto
- The upper boundincluded
- True to include boundspublic Query andFieldMatches(java.lang.String field, java.lang.String value)
field
- The field to constraintvalue
- The value that the field can havestatic org.apache.lucene.search.Query parseQuery(java.lang.String query)
query
- The user query
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |