use of org.eclipse.jnosql.communication.query.method.DeleteMethodProvider in project jnosql-diana by eclipse.
the class DeleteQueryConverter method apply.
@Override
public List<Vertex> apply(GraphQueryMethod graphQuery) {
DeleteMethodProvider provider = DeleteMethodProvider.get();
DeleteQuery deleteQuery = provider.apply(graphQuery.getMethod(), graphQuery.getEntityName());
ClassMapping mapping = graphQuery.getMapping();
GraphTraversal<Vertex, Vertex> traversal = getGraphTraversal(graphQuery, deleteQuery::getWhere, mapping);
traversal.hasLabel(mapping.getName());
return traversal.toList();
}
use of org.eclipse.jnosql.communication.query.method.DeleteMethodProvider in project jnosql-diana by eclipse.
the class BaseColumnRepository method getDeleteQuery.
protected ColumnDeleteQuery getDeleteQuery(Method method, Object[] args) {
DeleteMethodProvider deleteMethodFactory = DeleteMethodProvider.get();
DeleteQuery deleteQuery = deleteMethodFactory.apply(method, getClassMapping().getName());
ColumnDeleteQueryParams queryParams = DELETE_CONVERTER.apply(deleteQuery, getParser());
ColumnDeleteQuery query = queryParams.getQuery();
Params params = queryParams.getParams();
getParamsBinder().bind(params, args, method);
return query;
}
use of org.eclipse.jnosql.communication.query.method.DeleteMethodProvider 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;
}
Aggregations