com.liferay.portlet.polls.service.persistence
Interface PollsVotePersistence

All Superinterfaces:
BasePersistence

@Transactional(rollbackFor={com.liferay.portal.PortalException.class,com.liferay.portal.SystemException.class})
public interface PollsVotePersistence
extends BasePersistence

View Source

Author:
Brian Wing Shun Chan

Method Summary
 int countAll()
           
 int countByChoiceId(long choiceId)
           
 int countByQ_U(long questionId, long userId)
           
 int countByQuestionId(long questionId)
           
 PollsVote create(long voteId)
           
 PollsVote fetchByPrimaryKey(long voteId)
           
 PollsVote fetchByQ_U(long questionId, long userId)
           
 java.util.List<PollsVote> findAll()
           
 java.util.List<PollsVote> findAll(int start, int end)
           
 java.util.List<PollsVote> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 PollsVote findByChoiceId_First(long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 PollsVote findByChoiceId_Last(long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 PollsVote[] findByChoiceId_PrevAndNext(long voteId, long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 java.util.List<PollsVote> findByChoiceId(long choiceId)
           
 java.util.List<PollsVote> findByChoiceId(long choiceId, int start, int end)
           
 java.util.List<PollsVote> findByChoiceId(long choiceId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 PollsVote findByPrimaryKey(long voteId)
           
 PollsVote findByQ_U(long questionId, long userId)
           
 PollsVote findByQuestionId_First(long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 PollsVote findByQuestionId_Last(long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 PollsVote[] findByQuestionId_PrevAndNext(long voteId, long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 java.util.List<PollsVote> findByQuestionId(long questionId)
           
 java.util.List<PollsVote> findByQuestionId(long questionId, int start, int end)
           
 java.util.List<PollsVote> findByQuestionId(long questionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
           
 java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
           
 PollsVote remove(long voteId)
           
 PollsVote remove(PollsVote pollsVote)
           
 void removeAll()
           
 void removeByChoiceId(long choiceId)
           
 void removeByQ_U(long questionId, long userId)
           
 void removeByQuestionId(long questionId)
           
 PollsVote update(PollsVote pollsVote)
          Deprecated. Use update(PollsVote pollsVote, boolean merge).
 PollsVote update(PollsVote pollsVote, boolean merge)
          Add, update, or merge, the entity.
 PollsVote updateImpl(PollsVote pollsVote, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
getListeners, registerListener, unregisterListener
 

Method Detail

create

PollsVote create(long voteId)

remove

PollsVote remove(long voteId)
                 throws com.liferay.portal.SystemException,
                        NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

remove

PollsVote remove(PollsVote pollsVote)
                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

update

PollsVote update(PollsVote pollsVote)
                 throws com.liferay.portal.SystemException
Deprecated. Use update(PollsVote pollsVote, boolean merge).

Throws:
com.liferay.portal.SystemException

update

PollsVote update(PollsVote pollsVote,
                 boolean merge)
                 throws com.liferay.portal.SystemException
Add, update, or merge, the entity. This method also calls the model listeners to trigger the proper events associated with adding, deleting, or updating an entity.

Parameters:
pollsVote - the entity to add, update, or merge
merge - boolean value for whether to merge the entity. The default value is false. Setting merge to true is more expensive and should only be true when pollsVote is transient. See LEP-5473 for a detailed discussion of this method.
Returns:
true if the portlet can be displayed via Ajax
Throws:
com.liferay.portal.SystemException

updateImpl

PollsVote updateImpl(PollsVote pollsVote,
                     boolean merge)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByPrimaryKey

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote findByPrimaryKey(long voteId)
                           throws com.liferay.portal.SystemException,
                                  NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

fetchByPrimaryKey

PollsVote fetchByPrimaryKey(long voteId)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByQuestionId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findByQuestionId(long questionId)
                                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByQuestionId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findByQuestionId(long questionId,
                                                         int start,
                                                         int end)
                                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByQuestionId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findByQuestionId(long questionId,
                                                         int start,
                                                         int end,
                                                         com.liferay.portal.kernel.util.OrderByComparator obc)
                                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByQuestionId_First

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote findByQuestionId_First(long questionId,
                                               com.liferay.portal.kernel.util.OrderByComparator obc)
                                 throws com.liferay.portal.SystemException,
                                        NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

findByQuestionId_Last

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote findByQuestionId_Last(long questionId,
                                              com.liferay.portal.kernel.util.OrderByComparator obc)
                                throws com.liferay.portal.SystemException,
                                       NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

findByQuestionId_PrevAndNext

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote[] findByQuestionId_PrevAndNext(long voteId,
                                                       long questionId,
                                                       com.liferay.portal.kernel.util.OrderByComparator obc)
                                         throws com.liferay.portal.SystemException,
                                                NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

findByChoiceId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findByChoiceId(long choiceId)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByChoiceId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findByChoiceId(long choiceId,
                                                       int start,
                                                       int end)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByChoiceId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findByChoiceId(long choiceId,
                                                       int start,
                                                       int end,
                                                       com.liferay.portal.kernel.util.OrderByComparator obc)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByChoiceId_First

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote findByChoiceId_First(long choiceId,
                                             com.liferay.portal.kernel.util.OrderByComparator obc)
                               throws com.liferay.portal.SystemException,
                                      NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

findByChoiceId_Last

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote findByChoiceId_Last(long choiceId,
                                            com.liferay.portal.kernel.util.OrderByComparator obc)
                              throws com.liferay.portal.SystemException,
                                     NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

findByChoiceId_PrevAndNext

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote[] findByChoiceId_PrevAndNext(long voteId,
                                                     long choiceId,
                                                     com.liferay.portal.kernel.util.OrderByComparator obc)
                                       throws com.liferay.portal.SystemException,
                                              NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

findByQ_U

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PollsVote findByQ_U(long questionId,
                                  long userId)
                    throws com.liferay.portal.SystemException,
                           NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

fetchByQ_U

PollsVote fetchByQ_U(long questionId,
                     long userId)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
                                                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
                                                                    int start,
                                                                    int end)
                                                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findAll()
                                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findAll(int start,
                                                int end)
                                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<PollsVote> findAll(int start,
                                                int end,
                                                com.liferay.portal.kernel.util.OrderByComparator obc)
                                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByQuestionId

void removeByQuestionId(long questionId)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByChoiceId

void removeByChoiceId(long choiceId)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByQ_U

void removeByQ_U(long questionId,
                 long userId)
                 throws com.liferay.portal.SystemException,
                        NoSuchVoteException
Throws:
com.liferay.portal.SystemException
NoSuchVoteException

removeAll

void removeAll()
               throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByQuestionId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countByQuestionId(long questionId)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByChoiceId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countByChoiceId(long choiceId)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByQ_U

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countByQ_U(long questionId,
                             long userId)
               throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countAll

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int countAll()
             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException