Skip to content

Commit

Permalink
[Wen Hao] - update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhao committed Oct 19, 2016
1 parent b06f9b6 commit 2022c3a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ public Page<Person> findAll(SearchRequest request) {

find any person nickName equals to "dog" and name equals to "Jack"/"Eric" or null value, and company is null.

**Test:** [EqualTest.java](./src/test/java/com/github/wenhao/jpa/integration/EqualTest.java) and [NotEqualTest.java](./src/test/java/com/github/wenhao/jpa/integration/NotEqualTest.java)

```java
public Persons findAll(SearchRequest request) {
Specification<Person> specification = new Specifications<Person>()
Expand All @@ -112,6 +114,8 @@ public Persons findAll(SearchRequest request) {

find any person name in "Jack" or "Eric".

**Test:** [InTest.java](./src/test/java/com/github/wenhao/jpa/integration/InTest.java)

```java
public Persons findAll(SearchRequest request) {
Specification<Person> specification = new Specifications<Person>()
Expand All @@ -126,6 +130,8 @@ public Persons findAll(SearchRequest request) {

find any people age bigger than 18.

**Test:** [GtTest.java](./src/test/java/com/github/wenhao/jpa/integration/GtTest.java)

```java
public Persons findAll(SearchRequest request) {
Specification<Person> specification = new Specifications<Person>()
Expand All @@ -140,6 +146,8 @@ public Persons findAll(SearchRequest request) {

find any person age between 18 and 25, birthday between someday and someday.

**Test:** [BetweenTest.java](./src/test/java/com/github/wenhao/jpa/integration/BetweenTest.java)

```java
public Persons findAll(SearchRequest request) {
Specification<Person> specification = new Specifications<Person>()
Expand All @@ -155,6 +163,8 @@ public Persons findAll(SearchRequest request) {

find any person name like %ac% or %og%, company not like %ec%.

**Test:** [LikeTest.java](./src/test/java/com/github/wenhao/jpa/integration/LikeTest.java) and [NotLikeTest.java](./src/test/java/com/github/wenhao/jpa/integration/NotLikeTest.java)

```java
public Page<Person> findAll(SearchRequest request) {
Specification<Person> specification = new Specifications<Person>()
Expand Down

0 comments on commit 2022c3a

Please sign in to comment.