PollStore.java
/*
* Copyright © 2026 The CTAN Team and individual authors
*
* This file is distributed under the 3-clause BSD license.
* See file LICENSE for details.
*/
package org.ctan.site.stores;
import org.ctan.site.domain.poll.Poll;
import org.hibernate.SessionFactory;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.dropwizard.hibernate.AbstractDAO;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
/**
* The class <code>PollStore</code> contains the repository for polls.
*
* @author <a href="mailto:gene@ctan.org">Gerd Neugebauer</a>
*/
@Slf4j
public class PollStore extends AbstractDAO<Poll> {
/**
* This is the constructor for the <code>PkgStore</code>.
*
* @param sessionFactory the session factory
*/
@SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW")
public PollStore(@NonNull SessionFactory sessionFactory) {
super(sessionFactory);
}
/**
* The method <code>save</code> provides means to persist a poll.
*
* @param poll the poll to save
* @return the ticket
*/
public Poll save(Poll poll) {
return persist(poll);
}
}