Skip to content

Commit 6623421

Browse files
Leverage enum instead of string.
1 parent b2e8468 commit 6623421

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/src/main/java/ca/bc/gov/educ/api/trax/service/EventHistoryService.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package ca.bc.gov.educ.api.trax.service;
22

3+
import ca.bc.gov.educ.api.trax.constant.EventType;
34
import ca.bc.gov.educ.api.trax.exception.EntityNotFoundException;
45
import ca.bc.gov.educ.api.trax.exception.InvalidParameterException;
56
import ca.bc.gov.educ.api.trax.exception.ServiceException;
@@ -126,7 +127,7 @@ private Specification<EventHistoryEntity> getEventHistorySpecification(List<Sear
126127
}
127128

128129
private Search getDefaultSearchCriteria() {
129-
List<String> ignorableEvents = List.of("CREATE_SCHOOL_CONTACT", "UPDATE_SCHOOL_CONTACT", "DELETE_SCHOOL_CONTACT", "CREATE_DISTRICT_CONTACT", "UPDATE_DISTRICT_CONTACT", "DELETE_DISTRICT_CONTACT");
130+
List<String> ignorableEvents = List.of(EventType.CREATE_SCHOOL_CONTACT.name(), EventType.UPDATE_SCHOOL_CONTACT.name(), EventType.DELETE_SCHOOL_CONTACT.name(), EventType.CREATE_DISTRICT_CONTACT.name(), EventType.UPDATE_DISTRICT_CONTACT.name(), EventType.DELETE_DISTRICT_CONTACT.name());
130131
SearchCriteria searchCriteria = new SearchCriteria();
131132
searchCriteria.setCondition(Condition.AND);
132133
searchCriteria.setValueType(ValueType.STRING);

0 commit comments

Comments
 (0)