Class DbRequestHelper
java.lang.Object
fr.gouv.vitam.common.database.server.DbRequestHelper
DbRequest Helper common for Single and Multiple
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Helper to detect if document already exists so update needed instead of insertstatic <T extends VitamDocument<?>>
com.mongodb.client.MongoCursor<T>selectMongoDbExecuteThroughFakeMongoCursor
(VitamCollection<T> collection, RequestParserSingle parser, List<String> list, List<Double> scores) Private method for select using MongoDb from Elasticsearch result
-
Field Details
-
CONSISTENCY_ERROR_THE_DOCUMENT_GUID_S_IN_ES_IS_NOT_IN_MONGO_DB_ANYMORE_TENANT_S_REQUEST_ID_S
public static final String CONSISTENCY_ERROR_THE_DOCUMENT_GUID_S_IN_ES_IS_NOT_IN_MONGO_DB_ANYMORE_TENANT_S_REQUEST_ID_S- See Also:
-
-
Method Details
-
isDuplicateKeyError
Helper to detect if document already exists so update needed instead of insert- Returns:
- true if an insert that should be an Update, else False
-
selectMongoDbExecuteThroughFakeMongoCursor
public static <T extends VitamDocument<?>> com.mongodb.client.MongoCursor<T> selectMongoDbExecuteThroughFakeMongoCursor(VitamCollection<T> collection, RequestParserSingle parser, List<String> list, List<Double> scores) throws InvalidParseOperationException, VitamDBException Private method for select using MongoDb from Elasticsearch result- Parameters:
collection
-parser
-list
- list of Idsscores
- can be null, containing scores- Returns:
- MongoCursor of VitamDocument
- Throws:
InvalidParseOperationException
- when query is not correctInvalidCreateOperationException
VitamDBException
-