|
12 | 12 | import com.arte.libs.grammar.domain.QueryPropertyRestriction;
|
13 | 13 | import com.arte.libs.grammar.orm.jpa.criteria.AbstractCriteriaProcessor;
|
14 | 14 | import com.arte.libs.grammar.orm.jpa.criteria.CriteriaProcessorContext;
|
| 15 | +import com.arte.libs.grammar.orm.jpa.criteria.OrderProcessorBuilder; |
15 | 16 | import com.arte.libs.grammar.orm.jpa.criteria.RestrictionProcessorBuilder;
|
16 | 17 | import com.arte.libs.grammar.orm.jpa.criteria.converter.CriterionConverter;
|
17 | 18 |
|
@@ -41,6 +42,7 @@ public enum QueryProperty {
|
41 | 42 | NAME,
|
42 | 43 | USER,
|
43 | 44 | USER_ID,
|
| 45 | + EMAIL, |
44 | 46 | PERMALINK,
|
45 | 47 | CREATED_DATE,
|
46 | 48 | LAST_MODIFIED_DATE,
|
@@ -100,6 +102,18 @@ public void registerProcessors() {
|
100 | 102 | .withAlias(ENTITY_FIELD_USER, ENTITY_FIELD_USER)
|
101 | 103 | .withEntityProperty(ENTITY_FIELD_USER + ".id")
|
102 | 104 | .build());
|
| 105 | + registerRestrictionProcessor(RestrictionProcessorBuilder |
| 106 | + .stringRestrictionProcessor() |
| 107 | + .withQueryProperty(QueryProperty.EMAIL) |
| 108 | + .withAlias(ENTITY_FIELD_USER, ENTITY_FIELD_USER) |
| 109 | + .withEntityProperty(ENTITY_FIELD_USER + ".email") |
| 110 | + .build()); |
| 111 | + registerOrderProcessor(OrderProcessorBuilder |
| 112 | + .orderProcessor() |
| 113 | + .withQueryProperty(QueryProperty.EMAIL) |
| 114 | + .withAlias(ENTITY_FIELD_USER, ENTITY_FIELD_USER) |
| 115 | + .withEntityProperty(ENTITY_FIELD_USER + ".email") |
| 116 | + .build()); |
103 | 117 | registerRestrictionProcessor(RestrictionProcessorBuilder
|
104 | 118 | .stringRestrictionProcessor()
|
105 | 119 | .withQueryProperty(QueryProperty.PERMALINK).sortable()
|
|
0 commit comments