private void executeVersionTtlUpdateStatement(PreparedStatement statement, int accountId, int containerId,
      String datasetName, long versionValue) throws SQLException, AccountServiceException {
    statement.setInt(1, accountId);
    statement.setInt(2, containerId);
    statement.setString(3, datasetName);
    statement.setLong(4, versionValue);
    //only update ttl against a ready status record.
    statement.setInt(5, DatasetVersionState.READY.ordinal());
    int count = statement.executeUpdate();
    if (count <= 0) {
      throw new AccountServiceException(
          "Dataset can not be ttl updated for account: " + accountId + " container: " + containerId + " dataset: "
              + datasetName + " version: " + versionValue, AccountServiceErrorCode.NotFound);
    }
  }
Execute version ttl update statement.
@param statement the updateDatasetVersionTtlSql statement.
@param accountId the id for the parent account.
@param containerId the id of the container.
@param datasetName the name of the dataset.
@param versionValue the version value of the dataset.
@throws SQLException
@throws AccountServiceException
ambry-account/src/main/java/com/github/ambry/account/mysql/DatasetDao.java