File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
jnosql-mongodb/src/test/java/org/eclipse/jnosql/databases/mongodb/integration Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2022 Contributors to the Eclipse Foundation
3+ * All rights reserved. This program and the accompanying materials
4+ * are made available under the terms of the Eclipse Public License v1.0
5+ * and Apache License v2.0 which accompanies this distribution.
6+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
7+ * and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
8+ *
9+ * You may elect to redistribute this code under either of these licenses.
10+ *
11+ * Contributors:
12+ *
13+ * Maximillian Arruda
14+ */
15+ package org .eclipse .jnosql .databases .mongodb .integration ;
16+
17+ import jakarta .data .Order ;
18+ import jakarta .data .page .Page ;
19+ import jakarta .data .page .PageRequest ;
20+ import jakarta .data .repository .*;
21+
22+ import java .util .Optional ;
23+ import java .util .stream .Stream ;
24+
25+ @ Repository
26+ public interface BookCustomRepository {
27+
28+ @ Save
29+ Book save (Book book );
30+
31+ @ Save
32+ Iterable <Book > saveAll (Iterable <Book > books );
33+
34+ @ Delete
35+ void delete (Book book );
36+
37+ @ Delete
38+ void removeAll (Iterable <Book > books );
39+
40+ @ Find
41+ Optional <Book > getById (@ By ("id" ) String id );
42+
43+ @ Find
44+ Stream <Book > findByIdIn (Iterable <String > ids );
45+
46+ @ Find
47+ Stream <Book > listAll ();
48+
49+ @ Find
50+ Page <Book > listAll (PageRequest pageRequest , Order <Book > sortBy );
51+
52+ @ Query ("delete from Book" )
53+ void deleteAll ();
54+
55+ }
You can’t perform that action at this time.
0 commit comments