|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.wikitty.search.PagedResult<T>
T - paged result value typepublic class PagedResult<T>
Paged result containing result collection and facet topics.
| Field Summary | |
|---|---|
protected Map<String,List<FacetTopic>> |
facets
facet asked or null if no facet |
protected Map<String,Map<String,FacetTopic>> |
facetsAsMap
facet asked of null if no facet, FacetTopic are put in map with key topic name, To use this variable, you must used getter, because, this variable is lazy loaded from facets variable. |
protected int |
firstIndice
indice element in global search result |
protected int |
numFound
total number of result if we call the query for all possible result |
protected String |
queryString
query really executed |
protected List<T> |
results
list of result in the wanted interval |
| Constructor Summary | |
|---|---|
PagedResult(int firstIndice,
int numFound,
String queryString,
Map<String,List<FacetTopic>> facets,
List<T> results)
we don't initialize securityToken |
|
| Method Summary | ||
|---|---|---|
PagedResult<Wikitty> |
cast(String securityToken,
WikittyService ws)
Convert all result to the wikitty type and return new PagedResult with this new result list. |
|
|
cast(WikittyProxy proxy,
Class<E> clazz)
Call cast(WikittyProxy, Class, boolean) with
autoconvert = true |
|
|
cast(WikittyProxy proxy,
Class<E> clazz,
boolean autoconvert)
Convert all result to the wanted type and return new PagedResult with this new result list. |
|
T |
get(int i)
Return element at index. |
|
List<T> |
getAll()
Return unmodifiable list of all result. |
|
Collection<String> |
getFacetNames()
Return name of all facet used in query. |
|
Map<String,List<FacetTopic>> |
getFacets()
Get map represent facets. |
|
Map<String,Map<String,FacetTopic>> |
getFacetsAsMap()
|
|
T |
getFirst()
Return the first element in result Can throw an exception if no element available |
|
int |
getFirstIndice()
|
|
int |
getNumFound()
|
|
String |
getQueryString()
|
|
List<FacetTopic> |
getTopic(String facetName)
Return all topic for the specified facet. |
|
FacetTopic |
getTopic(String facetName,
String topicName)
Return topic for the specified facet and topic name. |
|
int |
getTopicCount(String facetName,
String topicName)
Return topic count for the specified facet and topic name. |
|
Iterator<T> |
iterator()
Iterate on result, same as getAll().iterator(). |
|
int |
size()
Return the number of result in this object. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int firstIndice
protected int numFound
protected String queryString
protected List<T> results
protected Map<String,List<FacetTopic>> facets
protected Map<String,Map<String,FacetTopic>> facetsAsMap
| Constructor Detail |
|---|
public PagedResult(int firstIndice,
int numFound,
String queryString,
Map<String,List<FacetTopic>> facets,
List<T> results)
firstIndice - numFound - queryString - facets - results - | Method Detail |
|---|
public <E extends BusinessEntityImpl> PagedResult<E> cast(WikittyProxy proxy,
Class<E> clazz)
cast(WikittyProxy, Class, boolean) with
autoconvert = true
proxy - used to retrieve securityToken and WikittyServiceclazz - target PagedResult type
public PagedResult<Wikitty> cast(String securityToken,
WikittyService ws)
securityToken - security tokenws - wikitty service
public <E extends BusinessEntityImpl> PagedResult<E> cast(WikittyProxy proxy,
Class<E> clazz,
boolean autoconvert)
E - class to cast intoproxy - used to retrieve securityToken and WikittyServiceautoconvert - if autoconvert is false and object don't all needed
extension, object is not put in the result
public int getFirstIndice()
public int getNumFound()
public String getQueryString()
public Collection<String> getFacetNames()
public List<FacetTopic> getTopic(String facetName)
facetName - name of the wanted facet
public FacetTopic getTopic(String facetName,
String topicName)
facetName - name of the wanted facettopicName - name of the wanted topic
public int getTopicCount(String facetName,
String topicName)
facetName - name of the wanted facettopicName - name of the wanted topic
public Map<String,List<FacetTopic>> getFacets()
public Map<String,Map<String,FacetTopic>> getFacetsAsMap()
public T getFirst()
public T get(int i)
i - index
public List<T> getAll()
public int size()
public Iterator<T> iterator()
iterator in interface Iterable<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||