1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  /**
27   * <a href="LayoutSetUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       LayoutSetPersistence
36   * @see       LayoutSetPersistenceImpl
37   * @generated
38   */
39  public class LayoutSetUtil {
40      public static void cacheResult(com.liferay.portal.model.LayoutSet layoutSet) {
41          getPersistence().cacheResult(layoutSet);
42      }
43  
44      public static void cacheResult(
45          java.util.List<com.liferay.portal.model.LayoutSet> layoutSets) {
46          getPersistence().cacheResult(layoutSets);
47      }
48  
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
54          return getPersistence().create(layoutSetId);
55      }
56  
57      public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
58          throws com.liferay.portal.NoSuchLayoutSetException,
59              com.liferay.portal.SystemException {
60          return getPersistence().remove(layoutSetId);
61      }
62  
63      public static com.liferay.portal.model.LayoutSet remove(
64          com.liferay.portal.model.LayoutSet layoutSet)
65          throws com.liferay.portal.SystemException {
66          return getPersistence().remove(layoutSet);
67      }
68  
69      /**
70       * @deprecated Use {@link #update(LayoutSet, boolean merge)}.
71       */
72      public static com.liferay.portal.model.LayoutSet update(
73          com.liferay.portal.model.LayoutSet layoutSet)
74          throws com.liferay.portal.SystemException {
75          return getPersistence().update(layoutSet);
76      }
77  
78      /**
79       * Add, update, or merge, the entity. This method also calls the model
80       * listeners to trigger the proper events associated with adding, deleting,
81       * or updating an entity.
82       *
83       * @param  layoutSet the entity to add, update, or merge
84       * @param  merge boolean value for whether to merge the entity. The default
85       *         value is false. Setting merge to true is more expensive and
86       *         should only be true when layoutSet is transient. See
87       *         LEP-5473 for a detailed discussion of this method.
88       * @return the entity that was added, updated, or merged
89       */
90      public static com.liferay.portal.model.LayoutSet update(
91          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().update(layoutSet, merge);
94      }
95  
96      public static com.liferay.portal.model.LayoutSet updateImpl(
97          com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
98          throws com.liferay.portal.SystemException {
99          return getPersistence().updateImpl(layoutSet, merge);
100     }
101 
102     public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
103         long layoutSetId)
104         throws com.liferay.portal.NoSuchLayoutSetException,
105             com.liferay.portal.SystemException {
106         return getPersistence().findByPrimaryKey(layoutSetId);
107     }
108 
109     public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
110         long layoutSetId) throws com.liferay.portal.SystemException {
111         return getPersistence().fetchByPrimaryKey(layoutSetId);
112     }
113 
114     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
115         long groupId) throws com.liferay.portal.SystemException {
116         return getPersistence().findByGroupId(groupId);
117     }
118 
119     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
120         long groupId, int start, int end)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByGroupId(groupId, start, end);
123     }
124 
125     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
126         long groupId, int start, int end,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().findByGroupId(groupId, start, end, obc);
130     }
131 
132     public static com.liferay.portal.model.LayoutSet findByGroupId_First(
133         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchLayoutSetException,
135             com.liferay.portal.SystemException {
136         return getPersistence().findByGroupId_First(groupId, obc);
137     }
138 
139     public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
140         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.NoSuchLayoutSetException,
142             com.liferay.portal.SystemException {
143         return getPersistence().findByGroupId_Last(groupId, obc);
144     }
145 
146     public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
147         long layoutSetId, long groupId,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.NoSuchLayoutSetException,
150             com.liferay.portal.SystemException {
151         return getPersistence()
152                    .findByGroupId_PrevAndNext(layoutSetId, groupId, obc);
153     }
154 
155     public static com.liferay.portal.model.LayoutSet findByVirtualHost(
156         java.lang.String virtualHost)
157         throws com.liferay.portal.NoSuchLayoutSetException,
158             com.liferay.portal.SystemException {
159         return getPersistence().findByVirtualHost(virtualHost);
160     }
161 
162     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
163         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
164         return getPersistence().fetchByVirtualHost(virtualHost);
165     }
166 
167     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
168         java.lang.String virtualHost, boolean retrieveFromCache)
169         throws com.liferay.portal.SystemException {
170         return getPersistence()
171                    .fetchByVirtualHost(virtualHost, retrieveFromCache);
172     }
173 
174     public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
175         boolean privateLayout)
176         throws com.liferay.portal.NoSuchLayoutSetException,
177             com.liferay.portal.SystemException {
178         return getPersistence().findByG_P(groupId, privateLayout);
179     }
180 
181     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
182         boolean privateLayout) throws com.liferay.portal.SystemException {
183         return getPersistence().fetchByG_P(groupId, privateLayout);
184     }
185 
186     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
187         boolean privateLayout, boolean retrieveFromCache)
188         throws com.liferay.portal.SystemException {
189         return getPersistence()
190                    .fetchByG_P(groupId, privateLayout, retrieveFromCache);
191     }
192 
193     public static java.util.List<Object> findWithDynamicQuery(
194         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
195         throws com.liferay.portal.SystemException {
196         return getPersistence().findWithDynamicQuery(dynamicQuery);
197     }
198 
199     public static java.util.List<Object> findWithDynamicQuery(
200         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
201         int end) throws com.liferay.portal.SystemException {
202         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
203     }
204 
205     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findAll();
208     }
209 
210     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
211         int start, int end) throws com.liferay.portal.SystemException {
212         return getPersistence().findAll(start, end);
213     }
214 
215     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
216         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException {
218         return getPersistence().findAll(start, end, obc);
219     }
220 
221     public static void removeByGroupId(long groupId)
222         throws com.liferay.portal.SystemException {
223         getPersistence().removeByGroupId(groupId);
224     }
225 
226     public static void removeByVirtualHost(java.lang.String virtualHost)
227         throws com.liferay.portal.NoSuchLayoutSetException,
228             com.liferay.portal.SystemException {
229         getPersistence().removeByVirtualHost(virtualHost);
230     }
231 
232     public static void removeByG_P(long groupId, boolean privateLayout)
233         throws com.liferay.portal.NoSuchLayoutSetException,
234             com.liferay.portal.SystemException {
235         getPersistence().removeByG_P(groupId, privateLayout);
236     }
237 
238     public static void removeAll() throws com.liferay.portal.SystemException {
239         getPersistence().removeAll();
240     }
241 
242     public static int countByGroupId(long groupId)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().countByGroupId(groupId);
245     }
246 
247     public static int countByVirtualHost(java.lang.String virtualHost)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().countByVirtualHost(virtualHost);
250     }
251 
252     public static int countByG_P(long groupId, boolean privateLayout)
253         throws com.liferay.portal.SystemException {
254         return getPersistence().countByG_P(groupId, privateLayout);
255     }
256 
257     public static int countAll() throws com.liferay.portal.SystemException {
258         return getPersistence().countAll();
259     }
260 
261     public static LayoutSetPersistence getPersistence() {
262         return _persistence;
263     }
264 
265     public void setPersistence(LayoutSetPersistence persistence) {
266         _persistence = persistence;
267     }
268 
269     private static LayoutSetPersistence _persistence;
270 }