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  /**
28   * <a href="PollsVotePersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       PollsVotePersistenceImpl
37   * @see       PollsVoteUtil
38   * @generated
39   */
40  public interface PollsVotePersistence extends BasePersistence {
41      public void cacheResult(com.liferay.portlet.polls.model.PollsVote pollsVote);
42  
43      public void cacheResult(
44          java.util.List<com.liferay.portlet.polls.model.PollsVote> pollsVotes);
45  
46      public void clearCache();
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      public com.liferay.portlet.polls.model.PollsVote remove(
55          com.liferay.portlet.polls.model.PollsVote pollsVote)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * @deprecated Use {@link #update(PollsVote, boolean merge)}.
60       */
61      public com.liferay.portlet.polls.model.PollsVote update(
62          com.liferay.portlet.polls.model.PollsVote pollsVote)
63          throws com.liferay.portal.SystemException;
64  
65      /**
66       * Add, update, or merge, the entity. This method also calls the model
67       * listeners to trigger the proper events associated with adding, deleting,
68       * or updating an entity.
69       *
70       * @param  pollsVote the entity to add, update, or merge
71       * @param  merge boolean value for whether to merge the entity. The default
72       *         value is false. Setting merge to true is more expensive and
73       *         should only be true when pollsVote is transient. See
74       *         LEP-5473 for a detailed discussion of this method.
75       * @return the entity that was added, updated, or merged
76       */
77      public com.liferay.portlet.polls.model.PollsVote update(
78          com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
79          throws com.liferay.portal.SystemException;
80  
81      public com.liferay.portlet.polls.model.PollsVote updateImpl(
82          com.liferay.portlet.polls.model.PollsVote pollsVote, boolean merge)
83          throws com.liferay.portal.SystemException;
84  
85      public com.liferay.portlet.polls.model.PollsVote findByPrimaryKey(
86          long voteId)
87          throws com.liferay.portal.SystemException,
88              com.liferay.portlet.polls.NoSuchVoteException;
89  
90      public com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey(
91          long voteId) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
94          long questionId) throws com.liferay.portal.SystemException;
95  
96      public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
97          long questionId, int start, int end)
98          throws com.liferay.portal.SystemException;
99  
100     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByQuestionId(
101         long questionId, int start, int end,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException;
104 
105     public com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
106         long questionId, 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 findByQuestionId_Last(
111         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.polls.NoSuchVoteException;
114 
115     public com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
116         long voteId, long questionId,
117         com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException,
119             com.liferay.portlet.polls.NoSuchVoteException;
120 
121     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
122         long choiceId) throws com.liferay.portal.SystemException;
123 
124     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
125         long choiceId, int start, int end)
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findByChoiceId(
129         long choiceId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException;
132 
133     public com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
134         long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException,
136             com.liferay.portlet.polls.NoSuchVoteException;
137 
138     public com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
139         long choiceId, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.polls.NoSuchVoteException;
142 
143     public com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
144         long voteId, long choiceId,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.polls.NoSuchVoteException;
148 
149     public com.liferay.portlet.polls.model.PollsVote findByQ_U(
150         long questionId, long userId)
151         throws com.liferay.portal.SystemException,
152             com.liferay.portlet.polls.NoSuchVoteException;
153 
154     public com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
155         long questionId, long userId) throws com.liferay.portal.SystemException;
156 
157     public com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
158         long questionId, long userId, boolean retrieveFromCache)
159         throws com.liferay.portal.SystemException;
160 
161     public java.util.List<Object> findWithDynamicQuery(
162         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
163         throws com.liferay.portal.SystemException;
164 
165     public java.util.List<Object> findWithDynamicQuery(
166         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
167         int end) throws com.liferay.portal.SystemException;
168 
169     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll()
170         throws com.liferay.portal.SystemException;
171 
172     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
173         int start, int end) throws com.liferay.portal.SystemException;
174 
175     public java.util.List<com.liferay.portlet.polls.model.PollsVote> findAll(
176         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException;
178 
179     public void removeByQuestionId(long questionId)
180         throws com.liferay.portal.SystemException;
181 
182     public void removeByChoiceId(long choiceId)
183         throws com.liferay.portal.SystemException;
184 
185     public void removeByQ_U(long questionId, long userId)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.polls.NoSuchVoteException;
188 
189     public void removeAll() throws com.liferay.portal.SystemException;
190 
191     public int countByQuestionId(long questionId)
192         throws com.liferay.portal.SystemException;
193 
194     public int countByChoiceId(long choiceId)
195         throws com.liferay.portal.SystemException;
196 
197     public int countByQ_U(long questionId, long userId)
198         throws com.liferay.portal.SystemException;
199 
200     public int countAll() throws com.liferay.portal.SystemException;
201 }