Search in sources :

Example 1 with DocumentDeleteQueryParams

use of jakarta.nosql.document.DocumentDeleteQueryParams in project jnosql-diana by eclipse.

the class DeleteQueryParser method apply.

@Override
public DocumentDeleteQueryParams apply(DeleteQuery deleteQuery, DocumentObserverParser observer) {
    Objects.requireNonNull(deleteQuery, "deleteQuery is required");
    Objects.requireNonNull(observer, "observer is required");
    Params params = Params.newParams();
    DocumentDeleteQuery query = getQuery(params, observer, deleteQuery);
    return new DefaultDocumentDeleteQueryParams(query, params);
}
Also used : DocumentDeleteQueryParams(jakarta.nosql.document.DocumentDeleteQueryParams) Params(jakarta.nosql.Params) DocumentDeleteQuery(jakarta.nosql.document.DocumentDeleteQuery)

Example 2 with DocumentDeleteQueryParams

use of jakarta.nosql.document.DocumentDeleteQueryParams in project jnosql-diana by eclipse.

the class BaseDocumentRepository method getDeleteQuery.

protected DocumentDeleteQuery getDeleteQuery(Method method, Object[] args) {
    DeleteMethodProvider methodProvider = DeleteMethodProvider.get();
    DeleteQuery deleteQuery = methodProvider.apply(method, getClassMapping().getName());
    DeleteQueryConverter converter = ServiceLoaderProvider.get(DeleteQueryConverter.class);
    DocumentDeleteQueryParams queryParams = converter.apply(deleteQuery, getParser());
    DocumentDeleteQuery query = queryParams.getQuery();
    Params params = queryParams.getParams();
    getParamsBinder().bind(params, args, method);
    return query;
}
Also used : DeleteMethodProvider(org.eclipse.jnosql.communication.query.method.DeleteMethodProvider) DocumentDeleteQueryParams(jakarta.nosql.document.DocumentDeleteQueryParams) DeleteQueryConverter(jakarta.nosql.document.DeleteQueryConverter) DocumentQueryParams(jakarta.nosql.document.DocumentQueryParams) DocumentDeleteQueryParams(jakarta.nosql.document.DocumentDeleteQueryParams) Params(jakarta.nosql.Params) DocumentDeleteQuery(jakarta.nosql.document.DocumentDeleteQuery) DeleteQuery(jakarta.nosql.query.DeleteQuery) DocumentDeleteQuery(jakarta.nosql.document.DocumentDeleteQuery)

Aggregations

Params (jakarta.nosql.Params)2 DocumentDeleteQuery (jakarta.nosql.document.DocumentDeleteQuery)2 DocumentDeleteQueryParams (jakarta.nosql.document.DocumentDeleteQueryParams)2 DeleteQueryConverter (jakarta.nosql.document.DeleteQueryConverter)1 DocumentQueryParams (jakarta.nosql.document.DocumentQueryParams)1 DeleteQuery (jakarta.nosql.query.DeleteQuery)1 DeleteMethodProvider (org.eclipse.jnosql.communication.query.method.DeleteMethodProvider)1