-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix elide-model-config build warnings #1971
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -13,7 +13,6 @@ | |||||||
import lombok.Builder; | ||||||||
import lombok.Data; | ||||||||
import lombok.EqualsAndHashCode; | ||||||||
import lombok.NoArgsConstructor; | ||||||||
|
||||||||
import java.util.LinkedHashSet; | ||||||||
import java.util.Set; | ||||||||
|
@@ -33,7 +32,6 @@ | |||||||
@Data | ||||||||
@EqualsAndHashCode() | ||||||||
@AllArgsConstructor | ||||||||
@NoArgsConstructor | ||||||||
@Builder | ||||||||
public class Argument implements Named { | ||||||||
|
||||||||
|
@@ -48,14 +46,18 @@ public class Argument implements Named { | |||||||
|
||||||||
@JsonProperty("values") | ||||||||
@JsonDeserialize(as = LinkedHashSet.class) | ||||||||
private Set<String> values = new LinkedHashSet<>(); | ||||||||
private Set<String> values; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
@JsonProperty("tableSource") | ||||||||
private String tableSource; | ||||||||
|
||||||||
@JsonProperty("default") | ||||||||
private Object defaultValue; | ||||||||
|
||||||||
public Argument() { | ||||||||
this.values = new LinkedHashSet<>(); | ||||||||
} | ||||||||
|
||||||||
Comment on lines
+57
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove and replace with JsonDeserialize builder.
Suggested change
|
||||||||
/** | ||||||||
* Returns description of the argument. | ||||||||
* If null, returns the name | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -13,7 +13,6 @@ | |||||||||||||||||
import lombok.Builder; | ||||||||||||||||||
import lombok.Data; | ||||||||||||||||||
import lombok.EqualsAndHashCode; | ||||||||||||||||||
import lombok.NoArgsConstructor; | ||||||||||||||||||
import lombok.Singular; | ||||||||||||||||||
|
||||||||||||||||||
import java.util.ArrayList; | ||||||||||||||||||
|
@@ -45,7 +44,6 @@ | |||||||||||||||||
@Data | ||||||||||||||||||
@EqualsAndHashCode() | ||||||||||||||||||
@AllArgsConstructor | ||||||||||||||||||
@NoArgsConstructor | ||||||||||||||||||
@Builder | ||||||||||||||||||
public class Dimension implements Named { | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -62,10 +60,10 @@ public class Dimension implements Named { | |||||||||||||||||
private String category; | ||||||||||||||||||
|
||||||||||||||||||
@JsonProperty("hidden") | ||||||||||||||||||
private Boolean hidden = false; | ||||||||||||||||||
private Boolean hidden; | ||||||||||||||||||
|
||||||||||||||||||
@JsonProperty("readAccess") | ||||||||||||||||||
private String readAccess = "Prefab.Role.All"; | ||||||||||||||||||
private String readAccess; | ||||||||||||||||||
|
||||||||||||||||||
@JsonProperty("definition") | ||||||||||||||||||
private String definition; | ||||||||||||||||||
|
@@ -78,23 +76,32 @@ public class Dimension implements Named { | |||||||||||||||||
|
||||||||||||||||||
@JsonProperty("grains") | ||||||||||||||||||
@Singular | ||||||||||||||||||
private List<Grain> grains = new ArrayList<>(); | ||||||||||||||||||
private List<Grain> grains; | ||||||||||||||||||
|
||||||||||||||||||
@JsonProperty("tags") | ||||||||||||||||||
@JsonDeserialize(as = LinkedHashSet.class) | ||||||||||||||||||
private Set<String> tags = new LinkedHashSet<>(); | ||||||||||||||||||
private Set<String> tags; | ||||||||||||||||||
|
||||||||||||||||||
@JsonProperty("arguments") | ||||||||||||||||||
@Singular | ||||||||||||||||||
private List<Argument> arguments = new ArrayList<>(); | ||||||||||||||||||
private List<Argument> arguments; | ||||||||||||||||||
|
||||||||||||||||||
@JsonProperty("values") | ||||||||||||||||||
@JsonDeserialize(as = LinkedHashSet.class) | ||||||||||||||||||
private Set<String> values = new LinkedHashSet<>(); | ||||||||||||||||||
private Set<String> values; | ||||||||||||||||||
|
||||||||||||||||||
@JsonProperty("tableSource") | ||||||||||||||||||
private String tableSource; | ||||||||||||||||||
|
||||||||||||||||||
public Dimension() { | ||||||||||||||||||
this.hidden = false; | ||||||||||||||||||
this.readAccess = "Prefab.Role.All"; | ||||||||||||||||||
this.grains = new ArrayList<>(); | ||||||||||||||||||
this.tags = new LinkedHashSet<>(); | ||||||||||||||||||
this.values = new LinkedHashSet<>(); | ||||||||||||||||||
this.arguments = new ArrayList<>(); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
Comment on lines
+96
to
+104
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
/** | ||||||||||||||||||
* Returns description of the dimension. | ||||||||||||||||||
* If null, returns the name. | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -16,7 +16,6 @@ | |||||||
import lombok.Builder; | ||||||||
import lombok.Data; | ||||||||
import lombok.EqualsAndHashCode; | ||||||||
import lombok.NoArgsConstructor; | ||||||||
import lombok.Singular; | ||||||||
|
||||||||
import java.util.ArrayList; | ||||||||
|
@@ -51,7 +50,6 @@ | |||||||
@Data | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use builder for Jackson deserializer
Suggested change
|
||||||||
@EqualsAndHashCode() | ||||||||
@AllArgsConstructor | ||||||||
@NoArgsConstructor | ||||||||
@Builder | ||||||||
public class Table implements Named { | ||||||||
|
||||||||
|
@@ -68,10 +66,10 @@ public class Table implements Named { | |||||||
private String dbConnectionName; | ||||||||
|
||||||||
@JsonProperty("isFact") | ||||||||
private Boolean isFact = true; | ||||||||
private Boolean isFact; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aklish are this fields purposely modifiable after building? Or should they all be final?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we cannot declare all fields final, because we have inheritance logic |
||||||||
|
||||||||
@JsonProperty("hidden") | ||||||||
private Boolean hidden = false; | ||||||||
private Boolean hidden; | ||||||||
|
||||||||
@JsonProperty("description") | ||||||||
private String description; | ||||||||
|
@@ -86,27 +84,27 @@ public class Table implements Named { | |||||||
private String cardinality; | ||||||||
|
||||||||
@JsonProperty("readAccess") | ||||||||
private String readAccess = "Prefab.Role.All"; | ||||||||
private String readAccess; | ||||||||
|
||||||||
@JsonProperty("joins") | ||||||||
@Singular | ||||||||
private List<Join> joins = new ArrayList<>(); | ||||||||
private List<Join> joins; | ||||||||
|
||||||||
@JsonProperty("measures") | ||||||||
@Singular | ||||||||
private List<Measure> measures = new ArrayList<>(); | ||||||||
private List<Measure> measures; | ||||||||
|
||||||||
@JsonProperty("dimensions") | ||||||||
@Singular | ||||||||
private List<Dimension> dimensions = new ArrayList<>(); | ||||||||
private List<Dimension> dimensions; | ||||||||
|
||||||||
@JsonProperty("tags") | ||||||||
@JsonDeserialize(as = LinkedHashSet.class) | ||||||||
private Set<String> tags = new LinkedHashSet<>(); | ||||||||
private Set<String> tags; | ||||||||
|
||||||||
@JsonProperty("arguments") | ||||||||
@Singular | ||||||||
private List<Argument> arguments = new ArrayList<>(); | ||||||||
private List<Argument> arguments; | ||||||||
|
||||||||
@JsonProperty("extend") | ||||||||
private String extend; | ||||||||
|
@@ -117,6 +115,17 @@ public class Table implements Named { | |||||||
@JsonProperty("table") | ||||||||
private String table; | ||||||||
|
||||||||
public Table() { | ||||||||
this.isFact = true; | ||||||||
this.hidden = false; | ||||||||
this.readAccess = "Prefab.Role.All"; | ||||||||
this.joins = new ArrayList<>(); | ||||||||
this.measures = new ArrayList<>(); | ||||||||
this.dimensions = new ArrayList<>(); | ||||||||
this.tags = new LinkedHashSet<>(); | ||||||||
this.arguments = new ArrayList<>(); | ||||||||
} | ||||||||
|
||||||||
/** | ||||||||
* Returns description of the table object. | ||||||||
* If null, returns the name. | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.