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.softwarecatalog.service.persistence;
24  
25  /**
26   * <a href="SCProductVersionUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class SCProductVersionUtil {
32      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion create(
33          long productVersionId) {
34          return getPersistence().create(productVersionId);
35      }
36  
37      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
38          long productVersionId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
41          return getPersistence().remove(productVersionId);
42      }
43  
44      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
45          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(scProductVersion);
48      }
49  
50      /**
51       * @deprecated Use <code>update(SCProductVersion scProductVersion, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion update(
54          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(scProductVersion);
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        scProductVersion 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 scProductVersion 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.softwarecatalog.model.SCProductVersion update(
73          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(scProductVersion, merge);
76      }
77  
78      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateImpl(
79          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(scProductVersion, merge);
82      }
83  
84      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion findByPrimaryKey(
85          long productVersionId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
88          return getPersistence().findByPrimaryKey(productVersionId);
89      }
90  
91      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByPrimaryKey(
92          long productVersionId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(productVersionId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
97          long productEntryId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByProductEntryId(productEntryId);
99      }
100 
101     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
102         long productEntryId, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByProductEntryId(productEntryId, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
108         long productEntryId, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence()
112                    .findByProductEntryId(productEntryId, start, end, obc);
113     }
114 
115     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion findByProductEntryId_First(
116         long productEntryId,
117         com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException,
119             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
120         return getPersistence().findByProductEntryId_First(productEntryId, obc);
121     }
122 
123     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion findByProductEntryId_Last(
124         long productEntryId,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException,
127             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
128         return getPersistence().findByProductEntryId_Last(productEntryId, obc);
129     }
130 
131     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion[] findByProductEntryId_PrevAndNext(
132         long productVersionId, long productEntryId,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
136         return getPersistence()
137                    .findByProductEntryId_PrevAndNext(productVersionId,
138             productEntryId, obc);
139     }
140 
141     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion findByDirectDownloadURL(
142         java.lang.String directDownloadURL)
143         throws com.liferay.portal.SystemException,
144             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
145         return getPersistence().findByDirectDownloadURL(directDownloadURL);
146     }
147 
148     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByDirectDownloadURL(
149         java.lang.String directDownloadURL)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().fetchByDirectDownloadURL(directDownloadURL);
152     }
153 
154     public static java.util.List<Object> findWithDynamicQuery(
155         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
156         throws com.liferay.portal.SystemException {
157         return getPersistence().findWithDynamicQuery(dynamicQuery);
158     }
159 
160     public static 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         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
164     }
165 
166     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll()
167         throws com.liferay.portal.SystemException {
168         return getPersistence().findAll();
169     }
170 
171     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
172         int start, int end) throws com.liferay.portal.SystemException {
173         return getPersistence().findAll(start, end);
174     }
175 
176     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
177         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findAll(start, end, obc);
180     }
181 
182     public static void removeByProductEntryId(long productEntryId)
183         throws com.liferay.portal.SystemException {
184         getPersistence().removeByProductEntryId(productEntryId);
185     }
186 
187     public static void removeByDirectDownloadURL(
188         java.lang.String directDownloadURL)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
191         getPersistence().removeByDirectDownloadURL(directDownloadURL);
192     }
193 
194     public static void removeAll() throws com.liferay.portal.SystemException {
195         getPersistence().removeAll();
196     }
197 
198     public static int countByProductEntryId(long productEntryId)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().countByProductEntryId(productEntryId);
201     }
202 
203     public static int countByDirectDownloadURL(
204         java.lang.String directDownloadURL)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().countByDirectDownloadURL(directDownloadURL);
207     }
208 
209     public static int countAll() throws com.liferay.portal.SystemException {
210         return getPersistence().countAll();
211     }
212 
213     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
214         long pk) throws com.liferay.portal.SystemException {
215         return getPersistence().getSCFrameworkVersions(pk);
216     }
217 
218     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
219         long pk, int start, int end) throws com.liferay.portal.SystemException {
220         return getPersistence().getSCFrameworkVersions(pk, start, end);
221     }
222 
223     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
224         long pk, int start, int end,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().getSCFrameworkVersions(pk, start, end, obc);
228     }
229 
230     public static int getSCFrameworkVersionsSize(long pk)
231         throws com.liferay.portal.SystemException {
232         return getPersistence().getSCFrameworkVersionsSize(pk);
233     }
234 
235     public static boolean containsSCFrameworkVersion(long pk,
236         long scFrameworkVersionPK) throws com.liferay.portal.SystemException {
237         return getPersistence()
238                    .containsSCFrameworkVersion(pk, scFrameworkVersionPK);
239     }
240 
241     public static boolean containsSCFrameworkVersions(long pk)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().containsSCFrameworkVersions(pk);
244     }
245 
246     public static void addSCFrameworkVersion(long pk, long scFrameworkVersionPK)
247         throws com.liferay.portal.SystemException {
248         getPersistence().addSCFrameworkVersion(pk, scFrameworkVersionPK);
249     }
250 
251     public static void addSCFrameworkVersion(long pk,
252         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
253         throws com.liferay.portal.SystemException {
254         getPersistence().addSCFrameworkVersion(pk, scFrameworkVersion);
255     }
256 
257     public static void addSCFrameworkVersions(long pk,
258         long[] scFrameworkVersionPKs) throws com.liferay.portal.SystemException {
259         getPersistence().addSCFrameworkVersions(pk, scFrameworkVersionPKs);
260     }
261 
262     public static void addSCFrameworkVersions(long pk,
263         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
264         throws com.liferay.portal.SystemException {
265         getPersistence().addSCFrameworkVersions(pk, scFrameworkVersions);
266     }
267 
268     public static void clearSCFrameworkVersions(long pk)
269         throws com.liferay.portal.SystemException {
270         getPersistence().clearSCFrameworkVersions(pk);
271     }
272 
273     public static void removeSCFrameworkVersion(long pk,
274         long scFrameworkVersionPK) throws com.liferay.portal.SystemException {
275         getPersistence().removeSCFrameworkVersion(pk, scFrameworkVersionPK);
276     }
277 
278     public static void removeSCFrameworkVersion(long pk,
279         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
280         throws com.liferay.portal.SystemException {
281         getPersistence().removeSCFrameworkVersion(pk, scFrameworkVersion);
282     }
283 
284     public static void removeSCFrameworkVersions(long pk,
285         long[] scFrameworkVersionPKs) throws com.liferay.portal.SystemException {
286         getPersistence().removeSCFrameworkVersions(pk, scFrameworkVersionPKs);
287     }
288 
289     public static void removeSCFrameworkVersions(long pk,
290         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
291         throws com.liferay.portal.SystemException {
292         getPersistence().removeSCFrameworkVersions(pk, scFrameworkVersions);
293     }
294 
295     public static void setSCFrameworkVersions(long pk,
296         long[] scFrameworkVersionPKs) throws com.liferay.portal.SystemException {
297         getPersistence().setSCFrameworkVersions(pk, scFrameworkVersionPKs);
298     }
299 
300     public static void setSCFrameworkVersions(long pk,
301         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
302         throws com.liferay.portal.SystemException {
303         getPersistence().setSCFrameworkVersions(pk, scFrameworkVersions);
304     }
305 
306     public static SCProductVersionPersistence getPersistence() {
307         return _persistence;
308     }
309 
310     public void setPersistence(SCProductVersionPersistence persistence) {
311         _persistence = persistence;
312     }
313 
314     private static SCProductVersionPersistence _persistence;
315 }