-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8327350
commit bc80840
Showing
8 changed files
with
160 additions
and
75 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
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 |
---|---|---|
|
@@ -30,15 +30,16 @@ | |
import com.google.common.base.Joiner; | ||
import com.google.common.base.MoreObjects; | ||
import java.util.Arrays; | ||
import lombok.AllArgsConstructor; | ||
import java.util.Locale; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.hisp.dhis.schema.Property; | ||
|
||
/** | ||
* @author Morten Olav Hansen <[email protected]> | ||
*/ | ||
@Getter | ||
@AllArgsConstructor | ||
@RequiredArgsConstructor | ||
public class QueryPath { | ||
private final Property property; | ||
|
||
|
@@ -48,6 +49,12 @@ public class QueryPath { | |
|
||
private static final Joiner PATH_JOINER = Joiner.on("."); | ||
|
||
/** | ||
* If this locale is not null then the query must use the translations jsonb column instead of | ||
* default properties. | ||
*/ | ||
private Locale locale; | ||
|
||
public QueryPath(Property property, boolean persisted) { | ||
this(property, persisted, new String[0]); | ||
} | ||
|
@@ -70,6 +77,14 @@ public boolean haveAlias(int n) { | |
return alias != null && alias.length > n; | ||
} | ||
|
||
public void setLocale(Locale locale) { | ||
this.locale = locale; | ||
} | ||
|
||
public Locale getLocale() { | ||
return locale; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return MoreObjects.toStringHelper(this) | ||
|
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.