diff --git a/jnosql-mongodb/src/test/java/org/eclipse/jnosql/databases/mongodb/integration/BookCustomRepository.java b/jnosql-mongodb/src/test/java/org/eclipse/jnosql/databases/mongodb/integration/BookCustomRepository.java new file mode 100644 index 000000000..9c48648ae --- /dev/null +++ b/jnosql-mongodb/src/test/java/org/eclipse/jnosql/databases/mongodb/integration/BookCustomRepository.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022 Contributors to the Eclipse Foundation + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Apache License v2.0 which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php. + * + * You may elect to redistribute this code under either of these licenses. + * + * Contributors: + * + * Maximillian Arruda + */ +package org.eclipse.jnosql.databases.mongodb.integration; + +import jakarta.data.Order; +import jakarta.data.page.Page; +import jakarta.data.page.PageRequest; +import jakarta.data.repository.*; + +import java.util.Optional; +import java.util.stream.Stream; + +@Repository +public interface BookCustomRepository { + + @Save + Book save(Book book); + + @Save + Iterable saveAll(Iterable books); + + @Delete + void delete(Book book); + + @Delete + void removeAll(Iterable books); + + @Find + Optional getById(@By("id") String id); + + @Find + Stream findByIdIn(Iterable ids); + + @Find + Stream listAll(); + + @Find + Page listAll(PageRequest pageRequest, Order sortBy); + + @Query("delete from Book") + void deleteAll(); + +}