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.portal.service.persistence;
24  
25  /**
26   * <a href="ReleaseUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class ReleaseUtil {
32      public static com.liferay.portal.model.Release create(long releaseId) {
33          return getPersistence().create(releaseId);
34      }
35  
36      public static com.liferay.portal.model.Release remove(long releaseId)
37          throws com.liferay.portal.NoSuchReleaseException, 
38              com.liferay.portal.SystemException {
39          return getPersistence().remove(releaseId);
40      }
41  
42      public static com.liferay.portal.model.Release remove(
43          com.liferay.portal.model.Release release)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(release);
46      }
47  
48      public static com.liferay.portal.model.Release update(
49          com.liferay.portal.model.Release release)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(release);
52      }
53  
54      public static com.liferay.portal.model.Release update(
55          com.liferay.portal.model.Release release, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(release, merge);
58      }
59  
60      public static com.liferay.portal.model.Release updateImpl(
61          com.liferay.portal.model.Release release, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(release, merge);
64      }
65  
66      public static com.liferay.portal.model.Release findByPrimaryKey(
67          long releaseId)
68          throws com.liferay.portal.NoSuchReleaseException, 
69              com.liferay.portal.SystemException {
70          return getPersistence().findByPrimaryKey(releaseId);
71      }
72  
73      public static com.liferay.portal.model.Release fetchByPrimaryKey(
74          long releaseId) throws com.liferay.portal.SystemException {
75          return getPersistence().fetchByPrimaryKey(releaseId);
76      }
77  
78      public static java.util.List findWithDynamicQuery(
79          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
80          throws com.liferay.portal.SystemException {
81          return getPersistence().findWithDynamicQuery(queryInitializer);
82      }
83  
84      public static java.util.List findWithDynamicQuery(
85          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
86          int begin, int end) throws com.liferay.portal.SystemException {
87          return getPersistence().findWithDynamicQuery(queryInitializer, begin,
88              end);
89      }
90  
91      public static java.util.List findAll()
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findAll();
94      }
95  
96      public static java.util.List findAll(int begin, int end)
97          throws com.liferay.portal.SystemException {
98          return getPersistence().findAll(begin, end);
99      }
100 
101     public static java.util.List findAll(int begin, int end,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findAll(begin, end, obc);
105     }
106 
107     public static void removeAll() throws com.liferay.portal.SystemException {
108         getPersistence().removeAll();
109     }
110 
111     public static int countAll() throws com.liferay.portal.SystemException {
112         return getPersistence().countAll();
113     }
114 
115     public static ReleasePersistence getPersistence() {
116         return _getUtil()._persistence;
117     }
118 
119     public void setPersistence(ReleasePersistence persistence) {
120         _persistence = persistence;
121     }
122 
123     private static ReleaseUtil _getUtil() {
124         if (_util == null) {
125             _util = (ReleaseUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
126         }
127 
128         return _util;
129     }
130 
131     private static final String _UTIL = ReleaseUtil.class.getName();
132     private static ReleaseUtil _util;
133     private ReleasePersistence _persistence;
134 }