final NamedParameterJdbcOperations namedJdbc = getDbConnector().getJdbcTemplate();
// Get version metadata from the data-points and set up a Manageable HTS accordingly
// While the HTS doc itself might have been deleted, the data-points can still be retrieved here
final String sqlVersion = getElSqlBundle().getSql("SelectDataPointsVersion", args);
ManageableHistoricalTimeSeries result = namedJdbc.query(sqlVersion, args, new ManageableHTSExtractor(oid));
if (result == null) {
// No data-points were found, check if the time-series doc exists or existed at some point
final String sqlExists = getElSqlBundle().getSql("SelectExistential", args);
result = namedJdbc.query(sqlExists, args, new ManageableHTSExtractor(oid));
if (result != null) {