1   /**
2    * Copyright (c) 2000-2008 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 begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByGroupId(
108         long groupId, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, begin, 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 begin, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByG_U(groupId, userId, begin, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByG_U(
149         long groupId, long userId, int begin, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByG_U(groupId, userId, begin, 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<com.liferay.portlet.tasks.model.TasksProposal> findWithDynamicQuery(
194         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
195         throws com.liferay.portal.SystemException {
196         return getPersistence().findWithDynamicQuery(queryInitializer);
197     }
198 
199     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findWithDynamicQuery(
200         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
201         int begin, int end) throws com.liferay.portal.SystemException {
202         return getPersistence()
203                    .findWithDynamicQuery(queryInitializer, begin, end);
204     }
205 
206     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll()
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findAll();
209     }
210 
211     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll(
212         int begin, int end) throws com.liferay.portal.SystemException {
213         return getPersistence().findAll(begin, end);
214     }
215 
216     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll(
217         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().findAll(begin, end, obc);
220     }
221 
222     public static void removeByGroupId(long groupId)
223         throws com.liferay.portal.SystemException {
224         getPersistence().removeByGroupId(groupId);
225     }
226 
227     public static void removeByG_U(long groupId, long userId)
228         throws com.liferay.portal.SystemException {
229         getPersistence().removeByG_U(groupId, userId);
230     }
231 
232     public static void removeByC_C(long classNameId, java.lang.String classPK)
233         throws com.liferay.portal.SystemException,
234             com.liferay.portlet.tasks.NoSuchProposalException {
235         getPersistence().removeByC_C(classNameId, classPK);
236     }
237 
238     public static void removeAll() throws com.liferay.portal.SystemException {
239         getPersistence().removeAll();
240     }
241 
242     public static int countByGroupId(long groupId)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().countByGroupId(groupId);
245     }
246 
247     public static int countByG_U(long groupId, long userId)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().countByG_U(groupId, userId);
250     }
251 
252     public static int countByC_C(long classNameId, java.lang.String classPK)
253         throws com.liferay.portal.SystemException {
254         return getPersistence().countByC_C(classNameId, classPK);
255     }
256 
257     public static int countAll() throws com.liferay.portal.SystemException {
258         return getPersistence().countAll();
259     }
260 
261     public static TasksProposalPersistence getPersistence() {
262         return _getUtil()._persistence;
263     }
264 
265     public void setPersistence(TasksProposalPersistence persistence) {
266         _persistence = persistence;
267     }
268 
269     private static TasksProposalUtil _getUtil() {
270         if (_util == null) {
271             _util = (TasksProposalUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
272         }
273 
274         return _util;
275     }
276 
277     private static final String _UTIL = TasksProposalUtil.class.getName();
278     private static TasksProposalUtil _util;
279     private TasksProposalPersistence _persistence;
280 }