forked from spring-attic/spring-data-aerospike
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup, add @beta annotation to QualifierBuilder
- Loading branch information
Showing
7 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/main/java/org/springframework/data/aerospike/annotation/Beta.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,15 @@ | ||
package org.springframework.data.aerospike.annotation; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Marks public API as potentially volatile, i.e. it may be a subject of incompatible changes in future releases. | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@Target({ElementType.TYPE, ElementType.CONSTRUCTOR, ElementType.METHOD}) | ||
public @interface Beta { | ||
|
||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,31 @@ void findPersonsByMetadata() { | |
.containsAll(repository.findUsingQuery(new Query(sinceUpdateTimeLt50Seconds))); | ||
} | ||
|
||
@Test | ||
void findBySimplePropertyEquals_Enum() { | ||
Qualifier genderEqFemale = Qualifier.builder() | ||
.setPath("gender") | ||
.setFilterOperation(FilterOperation.EQ) | ||
.setValue(Value.get(Person.Gender.FEMALE)) | ||
.build(); | ||
assertThat(repository.findUsingQuery(new Query(genderEqFemale))).containsOnly(alicia); | ||
} | ||
|
||
@Test | ||
void findBySimplePropertyEquals_String() { | ||
String email = "[email protected]"; | ||
alicia.setEmailAddress(email); | ||
repository.save(alicia); | ||
|
||
Qualifier genderEqFemale = Qualifier.builder() | ||
// custom bin name has been set to "email" via @Field annotation | ||
.setPath("email") | ||
.setFilterOperation(FilterOperation.EQ) | ||
.setValue(Value.get(email)) | ||
.build(); | ||
assertThat(repository.findUsingQuery(new Query(genderEqFemale))).containsOnly(alicia); | ||
} | ||
|
||
@Test | ||
void findPersonsByQuery() { | ||
Iterable<Person> result; | ||
|
@@ -266,20 +291,9 @@ void mapValuesTest() { | |
Qualifier intMapWithExactKeyAndValueLt100 = Qualifier.builder() | ||
.setPath("intMap." + keyExactMatch) // Map bin name | ||
.setFilterOperation(FilterOperation.MAP_VAL_LT_BY_KEY) | ||
// .setKey(Value.get(keyExactMatch)) // Map key | ||
.setValue(Value.get(valueToSearchLessThan)) // Map value to compare with | ||
.build(); | ||
assertThat(repository.findUsingQuery(new Query(intMapWithExactKeyAndValueLt100))).containsOnly(carter); | ||
} | ||
|
||
@Test | ||
void findBySimplePropertyEquals_Enum() { | ||
Qualifier genderEqFemale = Qualifier.builder() | ||
.setPath("gender") | ||
.setFilterOperation(FilterOperation.EQ) | ||
.setValue(Value.get(Person.Gender.FEMALE)) | ||
.build(); | ||
assertThat(repository.findUsingQuery(new Query(genderEqFemale))).containsOnly(alicia); | ||
} | ||
} | ||
|