1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.polls.service.persistence;
24  
25  /**
26   * <a href="PollsVotePersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface PollsVotePersistence {
32      public com.liferay.portlet.polls.model.PollsVote create(long voteId);
33  
34      public com.liferay.portlet.polls.model.PollsVote remove(long voteId)
35          throws com.liferay.portal.SystemException, 
36              com.liferay.portlet.polls.NoSuchVoteException;
37  
38      public com.liferay.portlet.polls.model.PollsVote remove(
39          com.liferay.portlet.polls.model.PollsVote pollsVote)
40          throws com.liferay.portal.SystemException;
41  
42      public com.liferay.portlet.polls.model.PollsVote update(
43          com.liferay.portlet.polls.model.PollsVote pollsVote)
44          throws com.liferay.portal.SystemException;
45  
46      public com.liferay.portlet.polls.model.PollsVote update(
47          com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
48          throws com.liferay.portal.SystemException;
49  
50      public com.liferay.portlet.polls.model.PollsVote findByPrimaryKey(
51          long voteId)
52          throws com.liferay.portal.SystemException, 
53              com.liferay.portlet.polls.NoSuchVoteException;
54  
55      public com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey(
56          long voteId) throws com.liferay.portal.SystemException;
57  
58      public java.util.List findByQuestionId(long questionId)
59          throws com.liferay.portal.SystemException;
60  
61      public java.util.List findByQuestionId(long questionId, int begin, int end)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List findByQuestionId(long questionId, int begin, int end,
65          com.liferay.portal.kernel.util.OrderByComparator obc)
66          throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
69          long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.polls.NoSuchVoteException;
72  
73      public com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last(
74          long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
75          throws com.liferay.portal.SystemException, 
76              com.liferay.portlet.polls.NoSuchVoteException;
77  
78      public com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
79          long voteId, long questionId,
80          com.liferay.portal.kernel.util.OrderByComparator obc)
81          throws com.liferay.portal.SystemException, 
82              com.liferay.portlet.polls.NoSuchVoteException;
83  
84      public java.util.List findByChoiceId(long choiceId)
85          throws com.liferay.portal.SystemException;
86  
87      public java.util.List findByChoiceId(long choiceId, int begin, int end)
88          throws com.liferay.portal.SystemException;
89  
90      public java.util.List findByChoiceId(long choiceId, int begin, int end,
91          com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException;
93  
94      public com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
95          long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException, 
97              com.liferay.portlet.polls.NoSuchVoteException;
98  
99      public com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
100         long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException, 
102             com.liferay.portlet.polls.NoSuchVoteException;
103 
104     public com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
105         long voteId, long choiceId,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException, 
108             com.liferay.portlet.polls.NoSuchVoteException;
109 
110     public com.liferay.portlet.polls.model.PollsVote findByQ_U(
111         long questionId, long userId)
112         throws com.liferay.portal.SystemException, 
113             com.liferay.portlet.polls.NoSuchVoteException;
114 
115     public com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
116         long questionId, long userId) throws com.liferay.portal.SystemException;
117 
118     public java.util.List findWithDynamicQuery(
119         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
120         throws com.liferay.portal.SystemException;
121 
122     public java.util.List findWithDynamicQuery(
123         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
124         int begin, int end) throws com.liferay.portal.SystemException;
125 
126     public java.util.List findAll() throws com.liferay.portal.SystemException;
127 
128     public java.util.List findAll(int begin, int end)
129         throws com.liferay.portal.SystemException;
130 
131     public java.util.List findAll(int begin, int end,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException;
134 
135     public void removeByQuestionId(long questionId)
136         throws com.liferay.portal.SystemException;
137 
138     public void removeByChoiceId(long choiceId)
139         throws com.liferay.portal.SystemException;
140 
141     public void removeByQ_U(long questionId, long userId)
142         throws com.liferay.portal.SystemException, 
143             com.liferay.portlet.polls.NoSuchVoteException;
144 
145     public void removeAll() throws com.liferay.portal.SystemException;
146 
147     public int countByQuestionId(long questionId)
148         throws com.liferay.portal.SystemException;
149 
150     public int countByChoiceId(long choiceId)
151         throws com.liferay.portal.SystemException;
152 
153     public int countByQ_U(long questionId, long userId)
154         throws com.liferay.portal.SystemException;
155 
156     public int countAll() throws com.liferay.portal.SystemException;
157 }