class SecretDAO {

  public List<SecretSeriesAndContent> getSecretsByName(List<String> names) {
    checkArgument(!names.isEmpty());

    SecretContentDAO secretContentDAO = secretContentDAOFactory.using(dslContext.configuration());
    SecretSeriesDAO secretSeriesDAO = secretSeriesDAOFactory.using(dslContext.configuration());

    List<SecretSeries> multipleSeries = secretSeriesDAO.getMultipleSecretSeriesByName(names);

    List<SecretSeriesAndContent> ret = new ArrayList<SecretSeriesAndContent>();

    for (SecretSeries series : multipleSeries) {
      if (series.currentVersion().isPresent()) {
        long secretContentId = series.currentVersion().get();
        Optional<SecretContent> secretContent =
                secretContentDAO.getSecretContentById(secretContentId);
        if (secretContent.isPresent()) {
          ret.add(SecretSeriesAndContent.of(series, secretContent.get()));
        } else {
          throw new NotFoundException("Secret not found.");
        }
      }
    }
    return ret;
  }

  public  SecretDAO(DSLContext dslContext, SecretContentDAOFactory secretContentDAOFactory,
      SecretSeriesDAOFactory secretSeriesDAOFactory, ContentCryptographer cryptographer);

}