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.portal.service.persistence;
21  
22  /**
23   * <a href="ReleaseUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class ReleaseUtil {
29      public static com.liferay.portal.model.Release create(long releaseId) {
30          return getPersistence().create(releaseId);
31      }
32  
33      public static com.liferay.portal.model.Release remove(long releaseId)
34          throws com.liferay.portal.NoSuchReleaseException,
35              com.liferay.portal.SystemException {
36          return getPersistence().remove(releaseId);
37      }
38  
39      public static com.liferay.portal.model.Release remove(
40          com.liferay.portal.model.Release release)
41          throws com.liferay.portal.SystemException {
42          return getPersistence().remove(release);
43      }
44  
45      /**
46       * @deprecated Use <code>update(Release release, boolean merge)</code>.
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      /**
55       * Add, update, or merge, the entity. This method also calls the model
56       * listeners to trigger the proper events associated with adding, deleting,
57       * or updating an entity.
58       *
59       * @param        release the entity to add, update, or merge
60       * @param        merge boolean value for whether to merge the entity. The
61       *                default value is false. Setting merge to true is more
62       *                expensive and should only be true when release is
63       *                transient. See LEP-5473 for a detailed discussion of this
64       *                method.
65       * @return        true if the portlet can be displayed via Ajax
66       */
67      public static com.liferay.portal.model.Release update(
68          com.liferay.portal.model.Release release, boolean merge)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(release, merge);
71      }
72  
73      public static com.liferay.portal.model.Release updateImpl(
74          com.liferay.portal.model.Release release, boolean merge)
75          throws com.liferay.portal.SystemException {
76          return getPersistence().updateImpl(release, merge);
77      }
78  
79      public static com.liferay.portal.model.Release findByPrimaryKey(
80          long releaseId)
81          throws com.liferay.portal.NoSuchReleaseException,
82              com.liferay.portal.SystemException {
83          return getPersistence().findByPrimaryKey(releaseId);
84      }
85  
86      public static com.liferay.portal.model.Release fetchByPrimaryKey(
87          long releaseId) throws com.liferay.portal.SystemException {
88          return getPersistence().fetchByPrimaryKey(releaseId);
89      }
90  
91      public static java.util.List<Object> findWithDynamicQuery(
92          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
93          throws com.liferay.portal.SystemException {
94          return getPersistence().findWithDynamicQuery(dynamicQuery);
95      }
96  
97      public static java.util.List<Object> findWithDynamicQuery(
98          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
99          int end) throws com.liferay.portal.SystemException {
100         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
101     }
102 
103     public static java.util.List<com.liferay.portal.model.Release> findAll()
104         throws com.liferay.portal.SystemException {
105         return getPersistence().findAll();
106     }
107 
108     public static java.util.List<com.liferay.portal.model.Release> findAll(
109         int start, int end) throws com.liferay.portal.SystemException {
110         return getPersistence().findAll(start, end);
111     }
112 
113     public static java.util.List<com.liferay.portal.model.Release> findAll(
114         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException {
116         return getPersistence().findAll(start, end, obc);
117     }
118 
119     public static void removeAll() throws com.liferay.portal.SystemException {
120         getPersistence().removeAll();
121     }
122 
123     public static int countAll() throws com.liferay.portal.SystemException {
124         return getPersistence().countAll();
125     }
126 
127     public static ReleasePersistence getPersistence() {
128         return _persistence;
129     }
130 
131     public void setPersistence(ReleasePersistence persistence) {
132         _persistence = persistence;
133     }
134 
135     private static ReleasePersistence _persistence;
136 }