Skip to content

Commit 4e52063

Browse files
committed
feat: serializable variablesmap
1 parent 0650443 commit 4e52063

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/main/java/fr/insee/bpm/metadata/model/UcqVariable.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package fr.insee.bpm.metadata.model;
22

33
import lombok.Getter;
4+
import lombok.NoArgsConstructor;
45
import lombok.Setter;
56
import lombok.extern.log4j.Log4j2;
67

@@ -10,19 +11,19 @@
1011
import java.util.stream.Collectors;
1112

1213
/** One unique choice question = one variable. */
14+
@Getter
15+
@NoArgsConstructor
1316
@Log4j2
1417
public class UcqVariable extends Variable {
1518

1619
/**
1720
* Map to store the UCQ modalities. Keys: possible values. Values: text
1821
* associated.
1922
*/
20-
@Getter
2123
List<UcqModality> modalities = new ArrayList<>();
2224

2325

2426
/** Common name of the different modalities of the UCQ variable, if this variable is itself a modality of a Mcq variable. */
25-
@Getter
2627
@Setter
2728
String mcqName;
2829

src/main/java/fr/insee/bpm/metadata/model/VariablesMap.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
import lombok.Getter;
5+
import lombok.Setter;
56
import lombok.extern.slf4j.Slf4j;
67
import org.apache.commons.lang3.StringUtils;
78

@@ -17,12 +18,13 @@
1718
*/
1819
@Slf4j
1920
@Getter
21+
@Setter
2022
public class VariablesMap {
2123

2224
/** Map containing the variables.
2325
* Keys: a variable name.
2426
* Values: Variable. */
25-
protected final LinkedHashMap<String, Variable> variables = new LinkedHashMap<>();
27+
protected LinkedHashMap<String, Variable> variables = new LinkedHashMap<>();
2628

2729

2830

0 commit comments

Comments
 (0)