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="PollsQuestionPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface PollsQuestionPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.polls.model.PollsQuestion> pollsQuestions);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.polls.model.PollsQuestion create(long questionId);
40  
41      public com.liferay.portlet.polls.model.PollsQuestion remove(long questionId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.polls.NoSuchQuestionException;
44  
45      public com.liferay.portlet.polls.model.PollsQuestion remove(
46          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(PollsQuestion pollsQuestion, boolean merge)</code>.
51       */
52      public com.liferay.portlet.polls.model.PollsQuestion update(
53          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
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        pollsQuestion 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 pollsQuestion 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.PollsQuestion update(
70          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
71          boolean merge) throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.polls.model.PollsQuestion updateImpl(
74          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion,
75          boolean merge) throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portlet.polls.model.PollsQuestion findByPrimaryKey(
78          long questionId)
79          throws com.liferay.portal.SystemException,
80              com.liferay.portlet.polls.NoSuchQuestionException;
81  
82      public com.liferay.portlet.polls.model.PollsQuestion fetchByPrimaryKey(
83          long questionId) throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByUuid(
86          java.lang.String uuid) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> 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.PollsQuestion> 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.PollsQuestion 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.NoSuchQuestionException;
102 
103     public com.liferay.portlet.polls.model.PollsQuestion 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.NoSuchQuestionException;
108 
109     public com.liferay.portlet.polls.model.PollsQuestion[] findByUuid_PrevAndNext(
110         long questionId, java.lang.String uuid,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.polls.NoSuchQuestionException;
114 
115     public com.liferay.portlet.polls.model.PollsQuestion findByUUID_G(
116         java.lang.String uuid, long groupId)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.polls.NoSuchQuestionException;
119 
120     public com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
121         java.lang.String uuid, long groupId)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portlet.polls.model.PollsQuestion fetchByUUID_G(
125         java.lang.String uuid, long groupId, boolean retrieveFromCache)
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
129         long groupId) throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
132         long groupId, int start, int end)
133         throws com.liferay.portal.SystemException;
134 
135     public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findByGroupId(
136         long groupId, int start, int end,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException;
139 
140     public com.liferay.portlet.polls.model.PollsQuestion findByGroupId_First(
141         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.polls.NoSuchQuestionException;
144 
145     public com.liferay.portlet.polls.model.PollsQuestion findByGroupId_Last(
146         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.polls.NoSuchQuestionException;
149 
150     public com.liferay.portlet.polls.model.PollsQuestion[] findByGroupId_PrevAndNext(
151         long questionId, long groupId,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.polls.NoSuchQuestionException;
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.PollsQuestion> findAll()
165         throws com.liferay.portal.SystemException;
166 
167     public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> findAll(
168         int start, int end) throws com.liferay.portal.SystemException;
169 
170     public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> 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 removeByUUID_G(java.lang.String uuid, long groupId)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.polls.NoSuchQuestionException;
180 
181     public void removeByGroupId(long groupId)
182         throws com.liferay.portal.SystemException;
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 countByUUID_G(java.lang.String uuid, long groupId)
190         throws com.liferay.portal.SystemException;
191 
192     public int countByGroupId(long groupId)
193         throws com.liferay.portal.SystemException;
194 
195     public int countAll() throws com.liferay.portal.SystemException;
196 }