-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #528 from OmniFish-EE/ondromih-fix-reflection-utils
Fix for #527: Handling special parameters
- Loading branch information
Showing
4 changed files
with
134 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...rs/org/eclipse/jnosql/mapping/core/repository/PersonRepositoryCompiledWithParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* 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: | ||
* | ||
* Ondro Mihalyi | ||
*/ | ||
package org.eclipse.jnosql.mapping.core.repository; | ||
|
||
import jakarta.data.Sort; | ||
import jakarta.data.repository.BasicRepository; | ||
import jakarta.data.repository.By; | ||
import jakarta.data.repository.Param; | ||
import jakarta.data.repository.Query; | ||
import java.util.List; | ||
import org.eclipse.jnosql.mapping.core.entities.Person; | ||
|
||
public interface PersonRepositoryCompiledWithParameters extends BasicRepository<Person, String> { | ||
|
||
@Query("FROM Person WHERE name = :name") | ||
List<Person> query(@Param("name") @By("name") String name, Sort sort); | ||
|
||
@Query("FROM Person WHERE age = ?1") | ||
List<Person> findAge(int age); | ||
|
||
@Query("FROM Person WHERE age = ?1 AND name = ?2") | ||
List<Person> findAgeAndName(int age, String name); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters