Conversation
| builder.addAllDescriptions(bulletin.descriptions); | ||
| builder.addAllUrls(bulletin.urls); | ||
|
|
||
| builder.addAllAffectedDisruptionRoutes(disruptionRoutes); |
There was a problem hiding this comment.
builder.addAllAffectedDisruptionRoutes takes a list of strings as argument. Maybe there should be DisruptionRoute message in the protobuf? What are we trying to do here?
| this.pollIntervalInSeconds = pollIntervalInSeconds; | ||
| this.queryAllModifiedAlerts = queryAllModifiedAlerts; |
There was a problem hiding this comment.
These values are not used for anything
| String queryString; | ||
| String queryLinksString; | ||
| String timezone; | ||
| int pollIntervalInSeconds; | ||
| boolean queryAllModifiedAlerts; |
There was a problem hiding this comment.
These should be private final
| String preparedString = queryString.replace("VAR_DATE_FROM", "1970-03-07"); | ||
| try (PreparedStatement statement = connection.prepareStatement(preparedString)) { | ||
| ResultSet resultSet = statement.executeQuery(); | ||
| HashMap<String, Stop> stopsByGid = new HashMap<String, Stop>(); |
There was a problem hiding this comment.
This HashMap is empty, so stop IDs in DisruptionRoute will be null. Is this a problem?
| public List<DisruptionRoute> getActiveDisruptions() throws SQLException { | ||
| log.info("Querying disruption route links from database"); | ||
| String dateFrom = localDateAsString(Instant.now(), timezone); | ||
| String preparedString = queryString.replace("VAR_DATE_FROM", "1970-03-07"); |
There was a problem hiding this comment.
Is the date intentionally hardcoded here?
| @Override | ||
| public List<DisruptionRoute> getActiveDisruptions() throws SQLException { | ||
| log.info("Querying disruption route links from database"); | ||
| String dateFrom = localDateAsString(Instant.now(), timezone); |
There was a problem hiding this comment.
dateFrom is not used for anything
| public final String latitude; | ||
| public final String longitude; |
There was a problem hiding this comment.
double should be used for coordinates
| public final String deviationId; | ||
| public final String startStopId; | ||
| public final String endStopId; | ||
| public final String sequenceNumber; |
There was a problem hiding this comment.
Sequence number should be int
| DC.last_modified, | ||
| DC.valid_from AS DC_VALID_FROM, | ||
| DC.valid_to AS DC_VALID_TO, | ||
| B.valid_from AS B_VALID_FROM, |
There was a problem hiding this comment.
B.bulletins_id should also be queried so that disruption route can be matched with the corresponding bulletin returned by BulletinDAO
No description provided.