Skip to content

Commit

Permalink
tests(integration): added Library interface to acting as Jakarta Data…
Browse files Browse the repository at this point in the history
… Repository for testing purposes

Signed-off-by: Maximillian Arruda <dearrudam@gmail.com>
  • Loading branch information
dearrudam committed Jun 7, 2023
1 parent fa2615b commit e267dc9
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2023 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.elasticsearch.integration;

import jakarta.data.repository.CrudRepository;
import jakarta.data.repository.Param;
import jakarta.data.repository.Query;
import jakarta.data.repository.Repository;

import java.util.stream.Stream;

@Repository
public interface Library extends CrudRepository<Book, String> {

@Query("select * from Book where author.name = @name")
Stream<Book> findByAuthorName(@Param("name") String name);

Stream<Book> findByTitleLike( String title);

}

0 comments on commit e267dc9

Please sign in to comment.