Skip to content

Commit fd3ebe5

Browse files
add Stub implementation definition & cleanup
1 parent 9338007 commit fd3ebe5

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

src/main/java/fr/insee/genesis/domain/service/surveyunit/SurveyUnitService.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -183,23 +183,6 @@ private List<SurveyUnitModel> extractLatestUpdates(List<SurveyUnitModel> allResp
183183
}
184184
//ELSE -> CASE WHERE THERE ARE MORE THAN ONE VERSION!
185185
else {
186-
187-
/*
188-
//We add all the variables of the LATEST update
189-
latestUpdatesbyVariables.add(surveyUnitModelsSorted.getFirst());
190-
191-
SurveyUnitModel latestUpdate = surveyUnitModelsSorted.getFirst();
192-
if(latestUpdate.getCollectedVariables() == null){
193-
latestUpdate.setCollectedVariables(new ArrayList<>());
194-
}
195-
if(latestUpdate.getExternalVariables() == null){
196-
latestUpdate.setExternalVariables(new ArrayList<>());
197-
}
198-
199-
latestUpdate.getCollectedVariables().forEach(colVar -> addedVariables.add(new VarIdScopeTuple(colVar.varId(), colVar.scope(), colVar.iteration())));
200-
latestUpdate.getExternalVariables().forEach(extVar -> addedVariables.add(new VarIdScopeTuple(extVar.varId(), extVar.scope(), extVar.iteration())));
201-
*/
202-
203186
allResponsesVersionsForSingleInterrId.forEach(surveyUnitModel -> {
204187
List<VariableModel> collectedVariablesToKeep = new ArrayList<>();
205188
List<VariableModel> externalVariablesToKeep = new ArrayList<>();

src/test/java/fr/insee/genesis/stubs/SurveyUnitPersistencePortStub.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,18 @@ public List<SurveyUnitModel> findInterrogationIdsByQuestionnaireId(String questi
9595
* @author Adrien Marchal
9696
*/
9797
public long countInterrogationIdsByQuestionnaireId(String questionnaireId) {
98-
//TODO : TO BE IMPLEMENTED
99-
return 0L;
98+
return mongoStub.size();
10099
}
101100

102101
/**
103102
* @author Adrien Marchal
104103
*/
105104
public List<SurveyUnitModel> findPageableInterrogationIdsByQuestionnaireId(String questionnaireId, Long skip, Long limit) {
106-
//TODO : TO BE IMPLEMENTED
107-
return new ArrayList<SurveyUnitModel>();
105+
List<SurveyUnitModel> surveyUnitModelList = new ArrayList<>();
106+
if(skip < mongoStub.size()) {
107+
108+
}
109+
return surveyUnitModelList;
108110
}
109111
//======= OPTIMISATIONS PERFS (END) =========
110112

0 commit comments

Comments
 (0)