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.portal.service.persistence;
24  
25  /**
26   * <a href="LayoutSetUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class LayoutSetUtil {
32      public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
33          return getPersistence().create(layoutSetId);
34      }
35  
36      public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
37          throws com.liferay.portal.NoSuchLayoutSetException,
38              com.liferay.portal.SystemException {
39          return getPersistence().remove(layoutSetId);
40      }
41  
42      public static com.liferay.portal.model.LayoutSet remove(
43          com.liferay.portal.model.LayoutSet layoutSet)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(layoutSet);
46      }
47  
48      /**
49       * @deprecated Use <code>update(LayoutSet layoutSet, boolean merge)</code>.
50       */
51      public static com.liferay.portal.model.LayoutSet update(
52          com.liferay.portal.model.LayoutSet layoutSet)
53          throws com.liferay.portal.SystemException {
54          return getPersistence().update(layoutSet);
55      }
56  
57      /**
58       * Add, update, or merge, the entity. This method also calls the model
59       * listeners to trigger the proper events associated with adding, deleting,
60       * or updating an entity.
61       *
62       * @param        layoutSet the entity to add, update, or merge
63       * @param        merge boolean value for whether to merge the entity. The
64       *                default value is false. Setting merge to true is more
65       *                expensive and should only be true when layoutSet is
66       *                transient. See LEP-5473 for a detailed discussion of this
67       *                method.
68       * @return        true if the portlet can be displayed via Ajax
69       */
70      public static com.liferay.portal.model.LayoutSet update(
71          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
72          throws com.liferay.portal.SystemException {
73          return getPersistence().update(layoutSet, merge);
74      }
75  
76      public static com.liferay.portal.model.LayoutSet updateImpl(
77          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
78          throws com.liferay.portal.SystemException {
79          return getPersistence().updateImpl(layoutSet, merge);
80      }
81  
82      public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
83          long layoutSetId)
84          throws com.liferay.portal.NoSuchLayoutSetException,
85              com.liferay.portal.SystemException {
86          return getPersistence().findByPrimaryKey(layoutSetId);
87      }
88  
89      public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
90          long layoutSetId) throws com.liferay.portal.SystemException {
91          return getPersistence().fetchByPrimaryKey(layoutSetId);
92      }
93  
94      public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
95          long groupId) throws com.liferay.portal.SystemException {
96          return getPersistence().findByGroupId(groupId);
97      }
98  
99      public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
100         long groupId, int start, int end)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().findByGroupId(groupId, start, end);
103     }
104 
105     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
106         long groupId, int start, int end,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().findByGroupId(groupId, start, end, obc);
110     }
111 
112     public static com.liferay.portal.model.LayoutSet findByGroupId_First(
113         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.NoSuchLayoutSetException,
115             com.liferay.portal.SystemException {
116         return getPersistence().findByGroupId_First(groupId, obc);
117     }
118 
119     public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
120         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.NoSuchLayoutSetException,
122             com.liferay.portal.SystemException {
123         return getPersistence().findByGroupId_Last(groupId, obc);
124     }
125 
126     public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
127         long layoutSetId, long groupId,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.NoSuchLayoutSetException,
130             com.liferay.portal.SystemException {
131         return getPersistence()
132                    .findByGroupId_PrevAndNext(layoutSetId, groupId, obc);
133     }
134 
135     public static com.liferay.portal.model.LayoutSet findByVirtualHost(
136         java.lang.String virtualHost)
137         throws com.liferay.portal.NoSuchLayoutSetException,
138             com.liferay.portal.SystemException {
139         return getPersistence().findByVirtualHost(virtualHost);
140     }
141 
142     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
143         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
144         return getPersistence().fetchByVirtualHost(virtualHost);
145     }
146 
147     public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
148         boolean privateLayout)
149         throws com.liferay.portal.NoSuchLayoutSetException,
150             com.liferay.portal.SystemException {
151         return getPersistence().findByG_P(groupId, privateLayout);
152     }
153 
154     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
155         boolean privateLayout) throws com.liferay.portal.SystemException {
156         return getPersistence().fetchByG_P(groupId, privateLayout);
157     }
158 
159     public static java.util.List<Object> findWithDynamicQuery(
160         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findWithDynamicQuery(dynamicQuery);
163     }
164 
165     public static java.util.List<Object> findWithDynamicQuery(
166         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
167         int end) throws com.liferay.portal.SystemException {
168         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
172         throws com.liferay.portal.SystemException {
173         return getPersistence().findAll();
174     }
175 
176     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
177         int start, int end) throws com.liferay.portal.SystemException {
178         return getPersistence().findAll(start, end);
179     }
180 
181     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
182         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException {
184         return getPersistence().findAll(start, end, obc);
185     }
186 
187     public static void removeByGroupId(long groupId)
188         throws com.liferay.portal.SystemException {
189         getPersistence().removeByGroupId(groupId);
190     }
191 
192     public static void removeByVirtualHost(java.lang.String virtualHost)
193         throws com.liferay.portal.NoSuchLayoutSetException,
194             com.liferay.portal.SystemException {
195         getPersistence().removeByVirtualHost(virtualHost);
196     }
197 
198     public static void removeByG_P(long groupId, boolean privateLayout)
199         throws com.liferay.portal.NoSuchLayoutSetException,
200             com.liferay.portal.SystemException {
201         getPersistence().removeByG_P(groupId, privateLayout);
202     }
203 
204     public static void removeAll() throws com.liferay.portal.SystemException {
205         getPersistence().removeAll();
206     }
207 
208     public static int countByGroupId(long groupId)
209         throws com.liferay.portal.SystemException {
210         return getPersistence().countByGroupId(groupId);
211     }
212 
213     public static int countByVirtualHost(java.lang.String virtualHost)
214         throws com.liferay.portal.SystemException {
215         return getPersistence().countByVirtualHost(virtualHost);
216     }
217 
218     public static int countByG_P(long groupId, boolean privateLayout)
219         throws com.liferay.portal.SystemException {
220         return getPersistence().countByG_P(groupId, privateLayout);
221     }
222 
223     public static int countAll() throws com.liferay.portal.SystemException {
224         return getPersistence().countAll();
225     }
226 
227     public static LayoutSetPersistence getPersistence() {
228         return _persistence;
229     }
230 
231     public void setPersistence(LayoutSetPersistence persistence) {
232         _persistence = persistence;
233     }
234 
235     private static LayoutSetPersistence _persistence;
236 }