|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.bean.query.SimpleLuceneQueryBean
public class SimpleLuceneQueryBean
The query bean.
This object defines a Bean
for searching.
The idea is to abstract the process of searching into a Bean to be manipulated by CForms.
This Bean is designed to be persistable.
Field Summary | |
---|---|
static Long |
DEFAULT_PAGE
The DEFAULT_PAGE of this bean. |
static Long |
DEFAULT_PAGE_SIZE
The DEFAULT_PAGE_SIZE of this bean. |
static String |
INDEX_FIELD
The INDEX_FIELD of this bean. |
static String |
SCORE_FIELD
The SCORE_FIELD of this bean. |
Fields inherited from interface org.apache.cocoon.bean.query.SimpleLuceneQuery |
---|
AND_BOOL, OR_BOOL |
Constructor Summary | |
---|---|
SimpleLuceneQueryBean()
Default constructor. |
|
SimpleLuceneQueryBean(String type,
String bool,
String match,
String field,
String query)
Utility constructor. |
Method Summary | |
---|---|
void |
addCriterion(SimpleLuceneCriterionBean criterion)
Adds a Criterion the Bean. |
Object |
clone()
|
String |
getBool()
Gets the Bean's boolean operator. |
List |
getCriteria()
Gets the Bean's criteria. |
Date |
getDate()
Gets the Bean's inception date. |
Long |
getId()
Gets the Bean's ID. |
String |
getName()
Gets the Bean's name. |
Long |
getPage()
Gets the Bean's page index |
Long |
getSize()
Gets the Bean's page size |
Long |
getTotal()
Gets the Bean's hit count. |
String |
getType()
Gets the Bean's type. |
String |
getUser()
Gets the Bean's owner. |
void |
removeCriterion(SimpleLuceneCriterionBean criterion)
Removes a Criterion from the Bean. |
List |
search(LuceneCocoonSearcher searcher)
Gets the Bean to perform it's query The searcher specifies which LuceneCocoonSearcher to use for this search. |
void |
setBool(String bool)
Sets the Bean's boolean operator. |
void |
setCriteria(List criteria)
Sets the Bean's criteria. |
void |
setDate(Date date)
Sets the Bean's inception date. |
void |
setId(Long id)
Sets the Bean's ID. |
void |
setName(String name)
Sets the Bean's Name. |
void |
setPage(Long page)
Sets the Bean's page index. |
void |
setSize(Long size)
Sets the Bean's page size. |
void |
setTotal(Long total)
Sets the Bean's hit count. |
void |
setType(String type)
Sets the Bean's type. |
void |
setUser(String user)
Sets the Bean's owner. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Long DEFAULT_PAGE_SIZE
20
public static Long DEFAULT_PAGE
0
public static String SCORE_FIELD
_lucene-score_
public static String INDEX_FIELD
_lucene-index_
Constructor Detail |
---|
public SimpleLuceneQueryBean()
public SimpleLuceneQueryBean(String type, String bool, String match, String field, String query)
type
- the type of this querybool
- the kind of boolean opperation to apply to each of it's Criteriamatch
- the kind of match to use for the generated Criterion
field
- the field to search for the generated Criterion
query
- the terms to search for the generated Criterion
Method Detail |
---|
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public List search(LuceneCocoonSearcher searcher) throws IOException, ProcessingException
The searcher specifies which LuceneCocoonSearcher to use for this search.
It needs to have been initialised properly before use.
Each Map
in the List
returned by this method contains:
SCORE_FIELD
the Lucene scoreINDEX_FIELD
the index of the hit
search
in interface SimpleLuceneQuery
searcher
- The LuceneCocoonSearcher
to use for this search
ProcessingException
- thrown by the searcher
IOException
- thrown when the searcher's directory cannot be foundpublic Long getId()
Long
ID of the Bean.public void setId(Long id)
id
- the Long
ID of the Bean.public String getName()
String
name of the Bean.public void setName(String name)
name
- the String
name of the Bean.public String getType()
String
type of the Bean.public void setType(String type)
type
- the String
type of the Bean.public String getBool()
String
boolean of the Bean.public void setBool(String bool)
Criterion
.
bool
- the String
boolean of the Bean.public String getUser()
String
owner of the Bean.public void setUser(String user)
user
- the String
owner of the Bean.public Long getSize()
Long
page size of the Bean.public void setSize(Long size)
size
- the Long
page size of the Bean.public Long getPage()
Long
page index of the Bean.public void setPage(Long page)
page
- the Long
page index of the Bean.public Long getTotal()
Long
hit count of the Bean.public void setTotal(Long total)
total
- the Long
hit count of the Bean.public Date getDate()
Date
of the Bean.public void setDate(Date date)
date
- the Date
inception date of the Bean.public List getCriteria()
List
of Bean Query criteria.public void setCriteria(List criteria)
criteria
- the List
of Bean Query criteria.public void addCriterion(SimpleLuceneCriterionBean criterion)
Criterion
the Bean.
criterion
- the SimpleLuceneCriterionBean
to add to the Bean.public void removeCriterion(SimpleLuceneCriterionBean criterion)
Criterion
from the Bean.
criterion
- the SimpleLuceneCriterionBean
to remove from the Bean.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |