public class PollHeaderDAO extends PollHeader {
private static final long serialVersionUID = 8955519930189569086L;
public static PollHeader load(String siteId, Long pollHeaderId) throws SecurityException, Exception {
EntityManager em = JpaConnection.getInstance().getCurrentEntityManager();
PollHeader pollheader = (PollHeader) em.find(PollHeader.class, pollHeaderId);
if (!pollheader.getSiteId().equals(siteId)) {
throw new SecurityException();
}
return pollheader;
}