Class Result<T>
java.lang.Object
fr.gouv.vitam.metadata.core.database.collections.Result<T>
- Type Parameters:
T
- Parameter Type
- Direct Known Subclasses:
ResultDefault
,ResultError
Abstract class for Result
-
Field Summary
Modifier and TypeFieldDescriptionCurrent Ids in the resultprotected List<FacetResult>
The FacetResult listThe final Result partstatic final String
Current Units in the resultprotected long
Number of result (might be different on update/delete than currentUnits)static final String
Field containing the full documents result as an array of documentCurrent Ids in the resultprotected String
The scrollIdprotected long
Total aproximated results out of limitprotected final BuilderToken.FILTERARGS
The type of the results (Units, ObjectGroups, Objects) -
Constructor Summary
ConstructorDescriptionConstructor for empty resultResult
(BuilderToken.FILTERARGS type, Collection<String> collection) Constructor from a set, setting the nbResult to the size of Set -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFacetResult
(FacetResult facetResult) Add a FacetResultAdd one document into final resultAd one Id to CurrentIdsclear()
Clear the ResultgetFacet()
getFinal()
final long
Return ScrollId of Resultlong
getTotal()
getType()
boolean
boolean
isError()
Put from argumentvoid
setFinal
(org.bson.conversions.Bson projection) Build the array of resultsetScrollId
(String scrollId) Add ScrollId to ResultsetTotal
(long total) setUpdatedResult
(long nb) toString()
-
Field Details
-
RESULT_FIELD
Field containing the full documents result as an array of document- See Also:
-
IDLIST
Current Units in the result- See Also:
-
currentIds
Current Ids in the result -
scores
Current Ids in the result -
nbResult
protected long nbResultNumber of result (might be different on update/delete than currentUnits) -
total
protected long totalTotal aproximated results out of limit -
type
The type of the results (Units, ObjectGroups, Objects) -
finalResult
The final Result part -
facetResult
The FacetResult list -
scrollId
The scrollId
-
-
Constructor Details
-
Result
Constructor for empty result- Parameters:
type
- of filter
-
Result
Constructor from a set, setting the nbResult to the size of Set- Parameters:
type
- of filtercollection
- the set of working collection
-
-
Method Details
-
clear
Clear the Result- Returns:
- this
-
putFrom
Put from argument- Parameters:
from
- the Result for creating another- Returns:
- Result created
-
isError
public boolean isError()- Returns:
- True if this result is in error status (list containing error status)
-
getCurrentIds
- Returns:
- the current Ids
-
getCurrentScores
- Returns:
- the current scores
-
getType
- Returns:
- the type of Results
-
addId
Ad one Id to CurrentIds- Parameters:
id
- the id as String adding to current resultscore
- the associated score- Returns:
- this
-
setScrollId
Add ScrollId to Result- Parameters:
scrollId
- the scrollid as String adding to current result- Returns:
- this
-
getScrollId
Return ScrollId of Result- Returns:
- ScrollId
-
getNbResult
public final long getNbResult()- Returns:
- the nbResult
-
setUpdatedResult
- Parameters:
nb
- the number of updated elements- Returns:
- this
-
getTotal
public long getTotal()- Returns:
- the approximative total of responses possible, out of limit
-
setTotal
- Parameters:
total
- the approximative total of responses possible, out of limit- Returns:
- this
-
getFinal
- Returns:
- the final Result
-
getFacet
- Returns:
- the list of FacetResult
-
getListFiltered
- Returns:
- the filtered list for Select operation
- Throws:
InvalidParseOperationException
- if exception occurred when getting the filter list
-
addFinal
Add one document into final result- Parameters:
document
- of type MetaDataDocument adding to result
-
setFinal
public void setFinal(org.bson.conversions.Bson projection) Build the array of result- Parameters:
projection
- the project of document
-
addFacetResult
Add a FacetResult- Parameters:
facetResult
- facetResult
-
toString
-
hasFinalResult
public boolean hasFinalResult()- Returns:
- boolean check if exist finalResult part
-