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