1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.polls.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="PollsChoicePersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface PollsChoicePersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.polls.model.PollsChoice pollsChoice);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.polls.model.PollsChoice> pollsChoices);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.polls.model.PollsChoice create(long choiceId);
40  
41      public com.liferay.portlet.polls.model.PollsChoice remove(long choiceId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.polls.NoSuchChoiceException;
44  
45      public com.liferay.portlet.polls.model.PollsChoice remove(
46          com.liferay.portlet.polls.model.PollsChoice pollsChoice)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(PollsChoice pollsChoice, boolean merge)</code>.
51       */
52      public com.liferay.portlet.polls.model.PollsChoice update(
53          com.liferay.portlet.polls.model.PollsChoice pollsChoice)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        pollsChoice the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when pollsChoice is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public com.liferay.portlet.polls.model.PollsChoice update(
70          com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.polls.model.PollsChoice updateImpl(
74          com.liferay.portlet.polls.model.PollsChoice pollsChoice, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portlet.polls.model.PollsChoice findByPrimaryKey(
78          long choiceId)
79          throws com.liferay.portal.SystemException,
80              com.liferay.portlet.polls.NoSuchChoiceException;
81  
82      public com.liferay.portlet.polls.model.PollsChoice fetchByPrimaryKey(
83          long choiceId) throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
86          java.lang.String uuid) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
89          java.lang.String uuid, int start, int end)
90          throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByUuid(
93          java.lang.String uuid, int start, int end,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portlet.polls.model.PollsChoice findByUuid_First(
98          java.lang.String uuid,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.polls.NoSuchChoiceException;
102 
103     public com.liferay.portlet.polls.model.PollsChoice findByUuid_Last(
104         java.lang.String uuid,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.polls.NoSuchChoiceException;
108 
109     public com.liferay.portlet.polls.model.PollsChoice[] findByUuid_PrevAndNext(
110         long choiceId, java.lang.String uuid,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.polls.NoSuchChoiceException;
114 
115     public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
116         long questionId) throws com.liferay.portal.SystemException;
117 
118     public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
119         long questionId, int start, int end)
120         throws com.liferay.portal.SystemException;
121 
122     public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findByQuestionId(
123         long questionId, int start, int end,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException;
126 
127     public com.liferay.portlet.polls.model.PollsChoice findByQuestionId_First(
128         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException,
130             com.liferay.portlet.polls.NoSuchChoiceException;
131 
132     public com.liferay.portlet.polls.model.PollsChoice findByQuestionId_Last(
133         long questionId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.polls.NoSuchChoiceException;
136 
137     public com.liferay.portlet.polls.model.PollsChoice[] findByQuestionId_PrevAndNext(
138         long choiceId, long questionId,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.polls.NoSuchChoiceException;
142 
143     public com.liferay.portlet.polls.model.PollsChoice findByQ_N(
144         long questionId, java.lang.String name)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.polls.NoSuchChoiceException;
147 
148     public com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
149         long questionId, java.lang.String name)
150         throws com.liferay.portal.SystemException;
151 
152     public com.liferay.portlet.polls.model.PollsChoice fetchByQ_N(
153         long questionId, java.lang.String name, boolean retrieveFromCache)
154         throws com.liferay.portal.SystemException;
155 
156     public java.util.List<Object> findWithDynamicQuery(
157         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158         throws com.liferay.portal.SystemException;
159 
160     public java.util.List<Object> findWithDynamicQuery(
161         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
162         int end) throws com.liferay.portal.SystemException;
163 
164     public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll()
165         throws com.liferay.portal.SystemException;
166 
167     public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
168         int start, int end) throws com.liferay.portal.SystemException;
169 
170     public java.util.List<com.liferay.portlet.polls.model.PollsChoice> findAll(
171         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException;
173 
174     public void removeByUuid(java.lang.String uuid)
175         throws com.liferay.portal.SystemException;
176 
177     public void removeByQuestionId(long questionId)
178         throws com.liferay.portal.SystemException;
179 
180     public void removeByQ_N(long questionId, java.lang.String name)
181         throws com.liferay.portal.SystemException,
182             com.liferay.portlet.polls.NoSuchChoiceException;
183 
184     public void removeAll() throws com.liferay.portal.SystemException;
185 
186     public int countByUuid(java.lang.String uuid)
187         throws com.liferay.portal.SystemException;
188 
189     public int countByQuestionId(long questionId)
190         throws com.liferay.portal.SystemException;
191 
192     public int countByQ_N(long questionId, java.lang.String name)
193         throws com.liferay.portal.SystemException;
194 
195     public int countAll() throws com.liferay.portal.SystemException;
196 }