Skip to content

Commit

Permalink
remove identifikators as field variable
Browse files Browse the repository at this point in the history
  • Loading branch information
hknots committed Nov 11, 2024
1 parent 129f164 commit f93b81f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions generate/java/java_class_tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public {{- if .Abstract }} abstract {{- end }} class {{ .Name }} {{ if .Extends
{{- if .Identifiable }}
@JsonIgnore
private Map<String, FintIdentifikator> createIdentifikators() {
@Override
private Map<String, FintIdentifikator> getIdentifikators() {
Map<String, FintIdentifikator> identifikators = new HashMap<>();
{{- if .ExtendsIdentifiable}}
Expand Down Expand Up @@ -112,10 +113,6 @@ public {{- if .Abstract }} abstract {{- end }} class {{ .Name }} {{ if .Extends
@JsonIgnore
private final List<FintRelation> relations = createRelations();
{{- end }}
{{- if .Identifiable }}
@JsonIgnore
private final Map<String, FintIdentifikator> identifikators = createIdentifikators();
{{- end }}
{{- if .Attributes }}
{{- range $att := .Attributes }}
{{- if $att.Deprecated }}
Expand Down
7 changes: 2 additions & 5 deletions generate/java/java_resource_class_tpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ public {{- if .Abstract }} abstract {{- end }} class {{ .Name }}Resource {{ if .
{{- if .Identifiable }}
@JsonIgnore
private final Map<String, FintIdentifikator> identifikators = createIdentifikators();
@JsonIgnore
private Map<String, FintIdentifikator> createIdentifikators() {
@Override
private Map<String, FintIdentifikator> getIdentifikators() {
Map<String, FintIdentifikator> identifikators = new HashMap<>();
{{- if .ExtendsIdentifiable}}
Expand All @@ -90,7 +88,6 @@ public {{- if .Abstract }} abstract {{- end }} class {{ .Name }}Resource {{ if .
return Collections.unmodifiableMap(identifikators);
}
{{- end }}
// Relations
Expand Down

0 comments on commit f93b81f

Please sign in to comment.