T
- Parameter Typepublic abstract class Result<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected List<String> |
currentIds
Current Ids in the result
|
protected List<T> |
finalResult
The final Result part
|
static String |
IDLIST
Current Units in the result
|
protected long |
nbResult
Number of result (might be different on update/delete than currentUnits)
|
static String |
RESULT_FIELD
Field containing the full documents result as an array of document
|
protected List<Float> |
scores
Current Ids in the result
|
protected String |
scrollId
The scrollId
|
protected long |
total
Total aproximated results out of limit
|
protected BuilderToken.FILTERARGS |
type
The type of the results (Units, ObjectGroups, Objects)
|
Constructor and Description |
---|
Result(BuilderToken.FILTERARGS type)
Constructor for empty result
|
Result(BuilderToken.FILTERARGS type,
Collection<String> collection)
Constructor from a set, setting the nbResult to the size of Set
|
Modifier and Type | Method and Description |
---|---|
void |
addFinal(T document)
Add one document into final result
|
Result<T> |
addId(String id,
float score)
Ad one Id to CurrentIds
|
Result<T> |
clear()
Clear the Result
|
List<String> |
getCurrentIds() |
List<Float> |
getCurrentScores() |
List<T> |
getFinal() |
List<T> |
getListFiltered() |
long |
getNbResult() |
String |
getScrollId()
Return ScrollId of Result
|
long |
getTotal() |
BuilderToken.FILTERARGS |
getType() |
boolean |
hasFinalResult() |
boolean |
isError() |
Result<T> |
putFrom(Result from)
Put from argument
|
void |
setFinal(org.bson.conversions.Bson projection)
Build the array of result
|
Result<T> |
setScrollId(String scrollId)
Add ScrollId to Result
|
Result<T> |
setTotal(long total) |
Result<T> |
setUpdatedResult(long nb) |
String |
toString() |
public static final String RESULT_FIELD
public static final String IDLIST
protected long nbResult
protected long total
protected final BuilderToken.FILTERARGS type
protected String scrollId
public Result(BuilderToken.FILTERARGS type)
type
- of filterpublic Result(BuilderToken.FILTERARGS type, Collection<String> collection)
type
- of filtercollection
- the set of working collectionpublic Result<T> putFrom(Result from)
from
- the Result for creating anotherpublic boolean isError()
public BuilderToken.FILTERARGS getType()
public Result<T> addId(String id, float score)
id
- the id as String adding to current resultscore
- the associated scorepublic Result<T> setScrollId(String scrollId)
scrollId
- the scrollid as String adding to current resultpublic String getScrollId()
public final long getNbResult()
public final Result<T> setUpdatedResult(long nb)
nb
- the number of updated elementspublic long getTotal()
public Result<T> setTotal(long total)
total
- the approximative total of responses possible, out of limitpublic List<T> getListFiltered() throws InvalidParseOperationException
InvalidParseOperationException
- if exception occurred when getting the filter listpublic void addFinal(T document)
document
- of type MetaDataDocument adding to resultpublic void setFinal(org.bson.conversions.Bson projection)
projection
- the project of documentpublic boolean hasFinalResult()
Copyright © 2018 Vitam. All rights reserved.