private List<DatasetVersionRecord> getDatasetVersionOutOfRetentionByDefault(short accountId, short containerId,
      String datasetName, Integer retentionCount, Dataset.VersionSchema versionSchema) throws SQLException {
    PreparedStatement listAllValidVersionsOrderedByLastModifiedTimeStatement =
        dataAccessor.getPreparedStatement(listVersionByModifiedTimeAndFilterByRetentionSql, true);
    return executeListAllValidVersionsOrderedByLastModifiedTimeStatement(
        listAllValidVersionsOrderedByLastModifiedTimeStatement, accountId, containerId, datasetName, retentionCount,
        versionSchema);
  }
Get dataset version out of retention by default retention policy.
@param accountId the id for the parent account.
@param containerId the id of the container.
@param datasetName the name of the dataset.
@param retentionCount the retention count of the dataset.
@param versionSchema the version schema of the dataset.
@return the list of dataset version out of retention by default retention policy.
@throws SQLException
ambry-account/src/main/java/com/github/ambry/account/mysql/DatasetDao.java