|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.result.BasicResultItem
public class BasicResultItem
A simple implementation of a search result item. Is not multi-thread safe. Mutates on setter methods. Delegates all fields (of all types) to the one map. Any field "recordid" is considered as a key to equality between result items.
| Constructor Summary | |
|---|---|
|
BasicResultItem()
|
|
BasicResultItem(ResultItem copy)
|
protected |
BasicResultItem(String title,
String url)
|
| Method Summary | |
|---|---|
BasicResultItem |
addField(String field,
String value)
Adds the field to the returned instance which is otherwise equal to this. |
BasicResultItem |
addObjectField(String field,
Serializable value)
Adds the field to the returned instance which is otherwise equal to this. |
BasicResultItem |
addToMultivaluedField(String field,
String value)
Adds (to the multivalued) field to the returned instance which is otherwise equal to this. |
boolean |
equals(Object obj)
|
String |
getField(String field)
|
String |
getField(String field,
int maxLength)
|
Collection<String> |
getFieldNames()
Returns a defensive copy of the field names existing in this resultItem. |
Map<String,Serializable> |
getFields()
JavaBean standards access (read-only) to the fields map. |
Integer |
getInteger(String field)
|
Collection<String> |
getMultivaluedField(String field)
Returns a live copy of the field's collection. |
Serializable |
getObjectField(String field)
|
String |
getTitle()
The title this result item represents. |
String |
getUrl()
The URL this result item represents. |
int |
hashCode()
|
ResultItem |
setTitle(String title)
Sets the title to the returned instance which is otherwise equal to this. |
ResultItem |
setUrl(String url)
Sets the URL to the returned instance which is otherwise equal to this. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicResultItem()
protected BasicResultItem(String title,
String url)
title - url - public BasicResultItem(ResultItem copy)
copy - | Method Detail |
|---|
public BasicResultItem addField(String field,
String value)
ResultItem
addField in interface ResultItemfield - value -
public String getField(String field)
getField in interface ResultItemfield -
public Map<String,Serializable> getFields()
public Serializable getObjectField(String field)
getObjectField in interface ResultItemfield -
public BasicResultItem addObjectField(String field,
Serializable value)
ResultItem
addObjectField in interface ResultItemfield - value -
public Integer getInteger(String field)
field -
public String getField(String field,
int maxLength)
field - maxLength -
public Collection<String> getFieldNames()
getFieldNames in interface ResultItempublic Collection<String> getMultivaluedField(String field)
getMultivaluedField in interface ResultItemfield -
public BasicResultItem addToMultivaluedField(String field,
String value)
ResultItem
addToMultivaluedField in interface ResultItemfield - value -
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String getUrl()
ResultItem
getUrl in interface ResultItempublic ResultItem setUrl(String url)
ResultItem
setUrl in interface ResultItempublic String getTitle()
ResultItem
getTitle in interface ResultItempublic ResultItem setTitle(String title)
ResultItem
setTitle in interface ResultItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||