1   /**
2    * Copyright (c) 2000-2009 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.tasks.service.persistence;
24  
25  /**
26   * <a href="TasksProposalUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class TasksProposalUtil {
32      public static com.liferay.portlet.tasks.model.TasksProposal create(
33          long proposalId) {
34          return getPersistence().create(proposalId);
35      }
36  
37      public static com.liferay.portlet.tasks.model.TasksProposal remove(
38          long proposalId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.tasks.NoSuchProposalException {
41          return getPersistence().remove(proposalId);
42      }
43  
44      public static com.liferay.portlet.tasks.model.TasksProposal remove(
45          com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(tasksProposal);
48      }
49  
50      /**
51       * @deprecated Use <code>update(TasksProposal tasksProposal, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.tasks.model.TasksProposal update(
54          com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(tasksProposal);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        tasksProposal the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when tasksProposal is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.tasks.model.TasksProposal update(
73          com.liferay.portlet.tasks.model.TasksProposal tasksProposal,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(tasksProposal, merge);
76      }
77  
78      public static com.liferay.portlet.tasks.model.TasksProposal updateImpl(
79          com.liferay.portlet.tasks.model.TasksProposal tasksProposal,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(tasksProposal, merge);
82      }
83  
84      public static com.liferay.portlet.tasks.model.TasksProposal findByPrimaryKey(
85          long proposalId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.tasks.NoSuchProposalException {
88          return getPersistence().findByPrimaryKey(proposalId);
89      }
90  
91      public static com.liferay.portlet.tasks.model.TasksProposal fetchByPrimaryKey(
92          long proposalId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(proposalId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByGroupId(
97          long groupId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByGroupId(groupId);
99      }
100 
101     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByGroupId(
102         long groupId, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByGroupId(
108         long groupId, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, start, end, obc);
112     }
113 
114     public static com.liferay.portlet.tasks.model.TasksProposal findByGroupId_First(
115         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.tasks.NoSuchProposalException {
118         return getPersistence().findByGroupId_First(groupId, obc);
119     }
120 
121     public static com.liferay.portlet.tasks.model.TasksProposal findByGroupId_Last(
122         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.tasks.NoSuchProposalException {
125         return getPersistence().findByGroupId_Last(groupId, obc);
126     }
127 
128     public static com.liferay.portlet.tasks.model.TasksProposal[] findByGroupId_PrevAndNext(
129         long proposalId, long groupId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.tasks.NoSuchProposalException {
133         return getPersistence()
134                    .findByGroupId_PrevAndNext(proposalId, groupId, obc);
135     }
136 
137     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByG_U(
138         long groupId, long userId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByG_U(groupId, userId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByG_U(
143         long groupId, long userId, int start, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByG_U(groupId, userId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByG_U(
149         long groupId, long userId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByG_U(groupId, userId, start, end, obc);
153     }
154 
155     public static com.liferay.portlet.tasks.model.TasksProposal findByG_U_First(
156         long groupId, long userId,
157         com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.SystemException,
159             com.liferay.portlet.tasks.NoSuchProposalException {
160         return getPersistence().findByG_U_First(groupId, userId, obc);
161     }
162 
163     public static com.liferay.portlet.tasks.model.TasksProposal findByG_U_Last(
164         long groupId, long userId,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException,
167             com.liferay.portlet.tasks.NoSuchProposalException {
168         return getPersistence().findByG_U_Last(groupId, userId, obc);
169     }
170 
171     public static com.liferay.portlet.tasks.model.TasksProposal[] findByG_U_PrevAndNext(
172         long proposalId, long groupId, long userId,
173         com.liferay.portal.kernel.util.OrderByComparator obc)
174         throws com.liferay.portal.SystemException,
175             com.liferay.portlet.tasks.NoSuchProposalException {
176         return getPersistence()
177                    .findByG_U_PrevAndNext(proposalId, groupId, userId, obc);
178     }
179 
180     public static com.liferay.portlet.tasks.model.TasksProposal findByC_C(
181         long classNameId, java.lang.String classPK)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.tasks.NoSuchProposalException {
184         return getPersistence().findByC_C(classNameId, classPK);
185     }
186 
187     public static com.liferay.portlet.tasks.model.TasksProposal fetchByC_C(
188         long classNameId, java.lang.String classPK)
189         throws com.liferay.portal.SystemException {
190         return getPersistence().fetchByC_C(classNameId, classPK);
191     }
192 
193     public static java.util.List<Object> findWithDynamicQuery(
194         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
195         throws com.liferay.portal.SystemException {
196         return getPersistence().findWithDynamicQuery(dynamicQuery);
197     }
198 
199     public static java.util.List<Object> findWithDynamicQuery(
200         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
201         int end) throws com.liferay.portal.SystemException {
202         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
203     }
204 
205     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll()
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findAll();
208     }
209 
210     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll(
211         int start, int end) throws com.liferay.portal.SystemException {
212         return getPersistence().findAll(start, end);
213     }
214 
215     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll(
216         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException {
218         return getPersistence().findAll(start, end, obc);
219     }
220 
221     public static void removeByGroupId(long groupId)
222         throws com.liferay.portal.SystemException {
223         getPersistence().removeByGroupId(groupId);
224     }
225 
226     public static void removeByG_U(long groupId, long userId)
227         throws com.liferay.portal.SystemException {
228         getPersistence().removeByG_U(groupId, userId);
229     }
230 
231     public static void removeByC_C(long classNameId, java.lang.String classPK)
232         throws com.liferay.portal.SystemException,
233             com.liferay.portlet.tasks.NoSuchProposalException {
234         getPersistence().removeByC_C(classNameId, classPK);
235     }
236 
237     public static void removeAll() throws com.liferay.portal.SystemException {
238         getPersistence().removeAll();
239     }
240 
241     public static int countByGroupId(long groupId)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().countByGroupId(groupId);
244     }
245 
246     public static int countByG_U(long groupId, long userId)
247         throws com.liferay.portal.SystemException {
248         return getPersistence().countByG_U(groupId, userId);
249     }
250 
251     public static int countByC_C(long classNameId, java.lang.String classPK)
252         throws com.liferay.portal.SystemException {
253         return getPersistence().countByC_C(classNameId, classPK);
254     }
255 
256     public static int countAll() throws com.liferay.portal.SystemException {
257         return getPersistence().countAll();
258     }
259 
260     public static TasksProposalPersistence getPersistence() {
261         return _persistence;
262     }
263 
264     public void setPersistence(TasksProposalPersistence persistence) {
265         _persistence = persistence;
266     }
267 
268     private static TasksProposalPersistence _persistence;
269 }