* @param uniqueId the unique identifier, not null
* @param series the time-series data points, not empty, not null
*/
protected void insertDataPointsCheckMaxDate(final UniqueId uniqueId, final LocalDateDoubleTimeSeries series) {
final Long docOid = extractOid(uniqueId);
final VersionCorrection vc = getMaster().extractTimeSeriesInstants(uniqueId);
final DbMapSqlParameterSource queryArgs = new DbMapSqlParameterSource()
.addValue("doc_oid", docOid)
.addTimestamp("ver_instant", vc.getVersionAsOf())
.addTimestamp("corr_instant", vc.getCorrectedTo());
final String sql = getElSqlBundle().getSql("SelectMaxPointDate", queryArgs);
Date result = getDbConnector().getJdbcTemplate().queryForObject(sql, queryArgs, Date.class);
if (result != null) {
LocalDate maxDate = DbDateUtils.fromSqlDateAllowNull(result);
if (series.getEarliestTime().isAfter(maxDate) == false) {