Skip to content

Commit e267dc9

Browse files
committed
tests(integration): added Library interface to acting as Jakarta Data Repository for testing purposes
Signed-off-by: Maximillian Arruda <[email protected]>
1 parent fa2615b commit e267dc9

File tree

1 file changed

+34
-0
lines changed
  • jnosql-elasticsearch/src/test/java/org/eclipse/jnosql/databases/elasticsearch/integration

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2023 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+
*/
16+
17+
package org.eclipse.jnosql.databases.elasticsearch.integration;
18+
19+
import jakarta.data.repository.CrudRepository;
20+
import jakarta.data.repository.Param;
21+
import jakarta.data.repository.Query;
22+
import jakarta.data.repository.Repository;
23+
24+
import java.util.stream.Stream;
25+
26+
@Repository
27+
public interface Library extends CrudRepository<Book, String> {
28+
29+
@Query("select * from Book where author.name = @name")
30+
Stream<Book> findByAuthorName(@Param("name") String name);
31+
32+
Stream<Book> findByTitleLike( String title);
33+
34+
}

0 commit comments

Comments
 (0)