public class WikittyQueryResult<T> extends Object implements Serializable, Iterable<T>
WikittyQuery. Pour caster les
valeurs dans une autre representation vous pouvez utiliser la methode
WikittyClient.castTo(java.lang.Class, org.nuiton.wikitty.query.WikittyQueryResult)| Modifier and Type | Field and Description |
|---|---|
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 |
offset
indice of offset result in global search result
|
protected WikittyQuery |
query
query used to produce initial WikittyQueryResult
|
protected String |
queryName
nom du critere qui a ete uitilise (peut-etre null) si le critete n'avait pas de nom
|
protected String |
queryString
query really executed (internal representation depend of search engine used
|
protected List<T> |
results
list of result in the wanted interval
|
protected List<Map<String,Object>> |
selectResult
if query contains select clause, contains select result
|
protected long |
timeConvertion
temps (nanoseconde) de transformation des resultats bruts en un autre type(calcul cote client)
|
protected long |
timeQuery
temps (nanoseconde) mis pour faire la requete (calcul cote serveur)
|
protected int |
totalResult
total number of result if we call the query for all possible result
|
protected List<String> |
wikittyIdResult
Wikitty ids resulting of where clause
|
| Constructor and Description |
|---|
WikittyQueryResult(String queryName,
int offset,
int totalResult,
WikittyQuery query,
String queryString,
List<T> results,
List<Map<String,Object>> selectResult,
List<String> wikittyIdResult,
Map<String,List<FacetTopic>> facets,
long timeQuery,
long timeConvertion)
Init paged result.
|
| Modifier and Type | Method and Description |
|---|---|
<E> WikittyQueryResult<E> |
castTo(WikittyClient client,
Class<E> target)
Convert all result to the wanted type and return new WikittyQueryResult
with this new result list.
|
<E,F> WikittyQueryResult<Map<String,E>> |
castToMap(WikittyClient client,
Class<E> target)
Convert all result to the wanted type and return new WikittyQueryResult
with this new result list.
|
<E> WikittyQueryResult<E> |
convertMapToSimple()
if this WikittyQueryResult contains Map
|
WikittyQueryResult<String> |
convertMapToSimpleString() |
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()
Get map represent facets.
|
int |
getFirst()
Deprecated.
since 3.5 use
getOffset() |
int |
getOffset()
indice of offset result in global search result
|
WikittyQuery |
getQuery()
Return query used to initialise the first WikittyQueryResult (before
some transformation with getSelect or getWikitties).
|
String |
getQueryName()
nom du critere qui a ete uitilise (peut-etre null) si le critete n'avait pas de nom
|
String |
getQueryString()
query really executed (internal representation depend of search engine used
|
WikittyQueryResult<Map<String,Object>> |
getSelectResult()
Retourne les resultats de select
|
WikittyQueryResult<Object> |
getSelectResult(String resultName)
Retourne les resultats de select pour le champs demande
|
<E> WikittyQueryResult<Map<String,E>> |
getSelectResult(WikittyClient client,
Class<E> clazz)
Retourne les resultats de select transforme en objet de type clazz
|
<E> WikittyQueryResult<E> |
getSelectResult(WikittyClient client,
Class<E> clazz,
String resultName)
Retourne les resultats de select pour le champs demande et le transforme
en objet de type clazz
|
List<String> |
getSelectResultName()
Retourne la liste liste des noms disponible comme resulat de select
|
long |
getTimeConvertion()
temps (nanoseconde) de transformation des resultats bruts en un autre
type(calcul cote client)
|
long |
getTimeQuery()
temps (nanoseconde) mis pour faire la requete (calcul cote serveur)
|
List<FacetTopic> |
getTopic(Element facetName)
Return all topic for the specified facet.
|
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.
|
int |
getTotalResult()
total number of result if we call the query for all possible result
|
WikittyQueryResult<String> |
getWikittyResult()
Retourne un nouveau WikittyQueryResult avec comme resultat la liste
des ids des wikitties selectionnes par la Query initiale
|
<E extends BusinessEntity> |
getWikittyResult(WikittyClient client,
Class<E> clazz)
Retourne un nouveau WikittyQueryResult avec comme resultat une liste
de BusinessEntity du type de la class passee en parametre a partir
des ids des wikitties selectionnes par la Query initiale
|
int |
getWikittyResultSize()
retourne le nombre de wikitty actuellement disponible dans le resultat
|
boolean |
hasSelectResult()
Indique s'il y a des resultats de select on non
|
Iterator<T> |
iterator()
Iterate on result, same as getAll().iterator().
|
T |
peek()
Return the offset element in result
Can throw an exception if no element available
|
int |
selectResultSize()
Le nombre de map contenu dans le resultat de select
|
void |
setTimeConvertion(long timeConvertion)
temps (nanoseconde) de transformation des resultats bruts en un autre
type(calcul cote client)
|
void |
setTimeQuery(long timeQuery)
temps (nanoseconde) mis pour faire la requete (calcul cote serveur)
|
int |
size()
Return the number of result in this object.
|
String |
toString() |
protected String queryName
protected int offset
protected int totalResult
protected String queryString
protected WikittyQuery query
protected List<Map<String,Object>> selectResult
protected Map<String,List<FacetTopic>> facets
protected transient Map<String,Map<String,FacetTopic>> facetsAsMap
protected long timeQuery
protected long timeConvertion
public WikittyQueryResult(String queryName, int offset, int totalResult, WikittyQuery query, String queryString, List<T> results, List<Map<String,Object>> selectResult, List<String> wikittyIdResult, Map<String,List<FacetTopic>> facets, long timeQuery, long timeConvertion)
offset - indice element in global search resulttotalResult - total number of result if we call the query for all possible resultqueryString - query really executedfacets - facet asked or null if no facetresults - list of result in the wanted intervalpublic <E> WikittyQueryResult<E> convertMapToSimple()
public WikittyQueryResult<String> convertMapToSimpleString()
public String getQueryName()
@Deprecated public int getFirst()
getOffset()public int getOffset()
public int getTotalResult()
public String getQueryString()
public WikittyQuery getQuery()
public int getWikittyResultSize()
public WikittyQueryResult<String> getWikittyResult()
public <E extends BusinessEntity> WikittyQueryResult<E> getWikittyResult(WikittyClient client, Class<E> clazz)
public boolean hasSelectResult()
public int selectResultSize()
public List<String> getSelectResultName()
public WikittyQueryResult<Map<String,Object>> getSelectResult()
public <E> WikittyQueryResult<Map<String,E>> getSelectResult(WikittyClient client, Class<E> clazz)
E - client - clazz - public WikittyQueryResult<Object> getSelectResult(String resultName)
resultName - public <E> WikittyQueryResult<E> getSelectResult(WikittyClient client, Class<E> clazz, String resultName)
resultName - public Collection<String> getFacetNames()
public List<FacetTopic> getTopic(String facetName)
facetName - name of the wanted facetpublic List<FacetTopic> getTopic(Element facetName)
facetName - name of the wanted facetpublic FacetTopic getTopic(String facetName, String topicName)
facetName - name of the wanted facettopicName - name of the wanted topicpublic int getTopicCount(String facetName, String topicName)
facetName - name of the wanted facettopicName - name of the wanted topicpublic Map<String,List<FacetTopic>> getFacets()
public Map<String,Map<String,FacetTopic>> getFacetsAsMap()
public T peek()
public T get(int i)
i - indexpublic int size()
public long getTimeQuery()
public void setTimeQuery(long timeQuery)
public long getTimeConvertion()
public void setTimeConvertion(long timeConvertion)
public <E> WikittyQueryResult<E> castTo(WikittyClient client, Class<E> target)
queryResult - result to converttarget - to cast into.
Can be Wikitty, BusinessEntity, String, Date, Number (returned is BigDecimal), Boolean, byte[]public <E,F> WikittyQueryResult<Map<String,E>> castToMap(WikittyClient client, Class<E> target)
queryResult - result to converttarget - to cast into.
Can be Wikitty, BusinessEntity, String, Date, Number (returned is BigDecimal), Boolean, byte[]Copyright © 2009–2015 CodeLutin. All rights reserved.