-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added IsEmpty operation for filter predicate (#1176)
* Added IsEmpty operation for filter predicate * small fix * Allow filter on ismany relationship for isempty operation. Add It test * Add @ElementCollection to attribute awards * remove string case * exclude isnull check on attribute collection * skip query on attribute collection test * exclude tags for jpa datastore * ieEmpty returns false if there is null association * Add exception if toMany association exist on the path and is not target collection * Add IT test * remove unused code * Fixing Typo Co-authored-by: Aaron Klish <[email protected]>
- Loading branch information
1 parent
ff88afb
commit 236ed8f
Showing
21 changed files
with
603 additions
and
12 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
24 changes: 24 additions & 0 deletions
24
elide-core/src/main/java/com/yahoo/elide/core/filter/IsEmptyPredicate.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,24 @@ | ||
/* | ||
* Copyright 2019, Yahoo Inc. | ||
* Licensed under the Apache License, Version 2.0 | ||
* See LICENSE file in project root for terms. | ||
*/ | ||
package com.yahoo.elide.core.filter; | ||
|
||
import com.yahoo.elide.core.Path; | ||
|
||
import java.util.Collections; | ||
|
||
/** | ||
* Is Empty Predicate Class. | ||
*/ | ||
public class IsEmptyPredicate extends FilterPredicate { | ||
|
||
public IsEmptyPredicate(Path path) { | ||
super(path, Operator.ISEMPTY, Collections.emptyList()); | ||
} | ||
|
||
public IsEmptyPredicate(Path.PathElement pathElement) { | ||
super(pathElement, Operator.ISEMPTY, Collections.emptyList()); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
elide-core/src/main/java/com/yahoo/elide/core/filter/NotEmptyPredicate.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,24 @@ | ||
/* | ||
* Copyright 2019, Yahoo Inc. | ||
* Licensed under the Apache License, Version 2.0 | ||
* See LICENSE file in project root for terms. | ||
*/ | ||
package com.yahoo.elide.core.filter; | ||
|
||
import com.yahoo.elide.core.Path; | ||
|
||
import java.util.Collections; | ||
|
||
/** | ||
* Not Empty Predicate Class. | ||
*/ | ||
public class NotEmptyPredicate extends FilterPredicate { | ||
|
||
public NotEmptyPredicate(Path path) { | ||
super(path, Operator.NOTEMPTY, Collections.emptyList()); | ||
} | ||
|
||
public NotEmptyPredicate(Path.PathElement pathElement) { | ||
super(pathElement, Operator.NOTEMPTY, Collections.emptyList()); | ||
} | ||
} |
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
Oops, something went wrong.