Skip to content

Commit 861e712

Browse files
committed
Add query object functions.
1 parent 123b983 commit 861e712

7 files changed

Lines changed: 687 additions & 292 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package org.springframework.data.ebean.annotation;
2+
3+
import org.springframework.data.ebean.querychannel.ExprType;
4+
5+
import java.lang.annotation.*;
6+
7+
/**
8+
* Expr param.
9+
*
10+
* @author XueguiYuan
11+
* @version 1.0 (created time: 2018/4/29).
12+
*/
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@Target(ElementType.FIELD)
15+
@Documented
16+
public @interface ExprParam {
17+
18+
/**
19+
* Query param name.
20+
*/
21+
String name() default "";
22+
23+
/**
24+
* Query param name.
25+
*/
26+
String value() default "";
27+
28+
/**
29+
* Expr.
30+
*/
31+
ExprType expr() default ExprType.DEFAULT;
32+
33+
/**
34+
* Case insensitive.
35+
*/
36+
boolean ignoreCase() default true;
37+
38+
/**
39+
* If true, do nothing when field value is null, else and expr isNull.
40+
*/
41+
boolean escapeNull() default true;
42+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.springframework.data.ebean.annotation;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
/**
9+
* Define the fetch path string for query select and fetch.
10+
*
11+
* @author XueguiYuan
12+
* @version 1.0 (created time: 2018/4/29).
13+
*/
14+
@Retention(RetentionPolicy.RUNTIME)
15+
@Target(ElementType.TYPE)
16+
public @interface IncludeFields {
17+
/**
18+
* Query fetch path string.
19+
*/
20+
String value();
21+
}

0 commit comments

Comments
 (0)