1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  import com.liferay.portlet.polls.model.PollsVote;
28  
29  /**
30   * <a href="PollsVotePersistence.java.html"><b><i>View Source</i></b></a>
31   *
32   * <p>
33   * ServiceBuilder generated this class. Modifications in this class will be
34   * overwritten the next time is generated.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       PollsVotePersistenceImpl
39   * @see       PollsVoteUtil
40   * @generated
41   */
42  public interface PollsVotePersistence extends BasePersistence<PollsVote> {
43      public void cacheResult(com.liferay.portlet.polls.model.PollsVote pollsVote);
44  
45      public void cacheResult(
46          java.util.List<com.liferay.portlet.polls.model.PollsVote> pollsVotes);
47  
48      public com.liferay.portlet.polls.model.PollsVote create(long voteId);
49  
50      public com.liferay.portlet.polls.model.PollsVote remove(long voteId)
51          throws com.liferay.portal.SystemException,
52              com.liferay.portlet.polls.NoSuchVoteException;
53  
54      /**
55       * @deprecated Use {@link BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)}.
56       */
57      public com.liferay.portlet.polls.model.PollsVote update(
58          com.liferay.portlet.polls.model.PollsVote pollsVote)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portlet.polls.model.PollsVote updateImpl(
62          com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
63          throws com.liferay.portal.SystemException;
64  
65      public com.liferay.portlet.polls.model.PollsVote findByPrimaryKey(
66          long voteId)
67          throws com.liferay.portal.SystemException,
68              com.liferay.portlet.polls.NoSuchVoteException;
69  
70      public com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey(
71          long voteId) throws com.liferay.portal.SystemException;
72  
73      public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
74          long questionId) throws com.liferay.portal.SystemException;
75  
76      public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
77          long questionId, int start, int end)
78          throws com.liferay.portal.SystemException;
79  
80      public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
81          long questionId, int start, int end,
82          com.liferay.portal.kernel.util.OrderByComparator obc)
83          throws com.liferay.portal.SystemException;
84  
85      public com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
86          long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
87          throws com.liferay.portal.SystemException,
88              com.liferay.portlet.polls.NoSuchVoteException;
89  
90      public com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last(
91          long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException,
93              com.liferay.portlet.polls.NoSuchVoteException;
94  
95      public com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
96          long voteId, long questionId,
97          com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException,
99              com.liferay.portlet.polls.NoSuchVoteException;
100 
101     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
102         long choiceId) throws com.liferay.portal.SystemException;
103 
104     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
105         long choiceId, int start, int end)
106         throws com.liferay.portal.SystemException;
107 
108     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
109         long choiceId, int start, int end,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException;
112 
113     public com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
114         long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.polls.NoSuchVoteException;
117 
118     public com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
119         long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.polls.NoSuchVoteException;
122 
123     public com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
124         long voteId, long choiceId,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException,
127             com.liferay.portlet.polls.NoSuchVoteException;
128 
129     public com.liferay.portlet.polls.model.PollsVote findByQ_U(
130         long questionId, long userId)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.polls.NoSuchVoteException;
133 
134     public com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
135         long questionId, long userId) throws com.liferay.portal.SystemException;
136 
137     public com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
138         long questionId, long userId, boolean retrieveFromCache)
139         throws com.liferay.portal.SystemException;
140 
141     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll()
142         throws com.liferay.portal.SystemException;
143 
144     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
145         int start, int end) throws com.liferay.portal.SystemException;
146 
147     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
148         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException;
150 
151     public void removeByQuestionId(long questionId)
152         throws com.liferay.portal.SystemException;
153 
154     public void removeByChoiceId(long choiceId)
155         throws com.liferay.portal.SystemException;
156 
157     public void removeByQ_U(long questionId, long userId)
158         throws com.liferay.portal.SystemException,
159             com.liferay.portlet.polls.NoSuchVoteException;
160 
161     public void removeAll() throws com.liferay.portal.SystemException;
162 
163     public int countByQuestionId(long questionId)
164         throws com.liferay.portal.SystemException;
165 
166     public int countByChoiceId(long choiceId)
167         throws com.liferay.portal.SystemException;
168 
169     public int countByQ_U(long questionId, long userId)
170         throws com.liferay.portal.SystemException;
171 
172     public int countAll() throws com.liferay.portal.SystemException;
173 }