1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.LayoutSet;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="LayoutSetUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       LayoutSetPersistence
35   * @see       LayoutSetPersistenceImpl
36   * @generated
37   */
38  public class LayoutSetUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(LayoutSet)
48       */
49      public static void clearCache(LayoutSet layoutSet) {
50          getPersistence().clearCache(layoutSet);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static LayoutSet remove(LayoutSet layoutSet)
81          throws SystemException {
82          return getPersistence().remove(layoutSet);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static LayoutSet update(LayoutSet layoutSet, boolean merge)
89          throws SystemException {
90          return getPersistence().update(layoutSet, merge);
91      }
92  
93      public static void cacheResult(com.liferay.portal.model.LayoutSet layoutSet) {
94          getPersistence().cacheResult(layoutSet);
95      }
96  
97      public static void cacheResult(
98          java.util.List<com.liferay.portal.model.LayoutSet> layoutSets) {
99          getPersistence().cacheResult(layoutSets);
100     }
101 
102     public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
103         return getPersistence().create(layoutSetId);
104     }
105 
106     public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
107         throws com.liferay.portal.NoSuchLayoutSetException,
108             com.liferay.portal.SystemException {
109         return getPersistence().remove(layoutSetId);
110     }
111 
112     /**
113      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
114      */
115     public static com.liferay.portal.model.LayoutSet update(
116         com.liferay.portal.model.LayoutSet layoutSet)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().update(layoutSet);
119     }
120 
121     public static com.liferay.portal.model.LayoutSet updateImpl(
122         com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
123         throws com.liferay.portal.SystemException {
124         return getPersistence().updateImpl(layoutSet, merge);
125     }
126 
127     public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
128         long layoutSetId)
129         throws com.liferay.portal.NoSuchLayoutSetException,
130             com.liferay.portal.SystemException {
131         return getPersistence().findByPrimaryKey(layoutSetId);
132     }
133 
134     public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
135         long layoutSetId) throws com.liferay.portal.SystemException {
136         return getPersistence().fetchByPrimaryKey(layoutSetId);
137     }
138 
139     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
140         long groupId) throws com.liferay.portal.SystemException {
141         return getPersistence().findByGroupId(groupId);
142     }
143 
144     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
145         long groupId, int start, int end)
146         throws com.liferay.portal.SystemException {
147         return getPersistence().findByGroupId(groupId, start, end);
148     }
149 
150     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
151         long groupId, int start, int end,
152         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153         throws com.liferay.portal.SystemException {
154         return getPersistence()
155                    .findByGroupId(groupId, start, end, orderByComparator);
156     }
157 
158     public static com.liferay.portal.model.LayoutSet findByGroupId_First(
159         long groupId,
160         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161         throws com.liferay.portal.NoSuchLayoutSetException,
162             com.liferay.portal.SystemException {
163         return getPersistence().findByGroupId_First(groupId, orderByComparator);
164     }
165 
166     public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
167         long groupId,
168         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169         throws com.liferay.portal.NoSuchLayoutSetException,
170             com.liferay.portal.SystemException {
171         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
172     }
173 
174     public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
175         long layoutSetId, long groupId,
176         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177         throws com.liferay.portal.NoSuchLayoutSetException,
178             com.liferay.portal.SystemException {
179         return getPersistence()
180                    .findByGroupId_PrevAndNext(layoutSetId, groupId,
181             orderByComparator);
182     }
183 
184     public static com.liferay.portal.model.LayoutSet findByVirtualHost(
185         java.lang.String virtualHost)
186         throws com.liferay.portal.NoSuchLayoutSetException,
187             com.liferay.portal.SystemException {
188         return getPersistence().findByVirtualHost(virtualHost);
189     }
190 
191     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
192         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
193         return getPersistence().fetchByVirtualHost(virtualHost);
194     }
195 
196     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
197         java.lang.String virtualHost, boolean retrieveFromCache)
198         throws com.liferay.portal.SystemException {
199         return getPersistence()
200                    .fetchByVirtualHost(virtualHost, retrieveFromCache);
201     }
202 
203     public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
204         boolean privateLayout)
205         throws com.liferay.portal.NoSuchLayoutSetException,
206             com.liferay.portal.SystemException {
207         return getPersistence().findByG_P(groupId, privateLayout);
208     }
209 
210     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
211         boolean privateLayout) throws com.liferay.portal.SystemException {
212         return getPersistence().fetchByG_P(groupId, privateLayout);
213     }
214 
215     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
216         boolean privateLayout, boolean retrieveFromCache)
217         throws com.liferay.portal.SystemException {
218         return getPersistence()
219                    .fetchByG_P(groupId, privateLayout, retrieveFromCache);
220     }
221 
222     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
223         throws com.liferay.portal.SystemException {
224         return getPersistence().findAll();
225     }
226 
227     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
228         int start, int end) throws com.liferay.portal.SystemException {
229         return getPersistence().findAll(start, end);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
233         int start, int end,
234         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
235         throws com.liferay.portal.SystemException {
236         return getPersistence().findAll(start, end, orderByComparator);
237     }
238 
239     public static void removeByGroupId(long groupId)
240         throws com.liferay.portal.SystemException {
241         getPersistence().removeByGroupId(groupId);
242     }
243 
244     public static void removeByVirtualHost(java.lang.String virtualHost)
245         throws com.liferay.portal.NoSuchLayoutSetException,
246             com.liferay.portal.SystemException {
247         getPersistence().removeByVirtualHost(virtualHost);
248     }
249 
250     public static void removeByG_P(long groupId, boolean privateLayout)
251         throws com.liferay.portal.NoSuchLayoutSetException,
252             com.liferay.portal.SystemException {
253         getPersistence().removeByG_P(groupId, privateLayout);
254     }
255 
256     public static void removeAll() throws com.liferay.portal.SystemException {
257         getPersistence().removeAll();
258     }
259 
260     public static int countByGroupId(long groupId)
261         throws com.liferay.portal.SystemException {
262         return getPersistence().countByGroupId(groupId);
263     }
264 
265     public static int countByVirtualHost(java.lang.String virtualHost)
266         throws com.liferay.portal.SystemException {
267         return getPersistence().countByVirtualHost(virtualHost);
268     }
269 
270     public static int countByG_P(long groupId, boolean privateLayout)
271         throws com.liferay.portal.SystemException {
272         return getPersistence().countByG_P(groupId, privateLayout);
273     }
274 
275     public static int countAll() throws com.liferay.portal.SystemException {
276         return getPersistence().countAll();
277     }
278 
279     public static LayoutSetPersistence getPersistence() {
280         if (_persistence == null) {
281             _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName());
282 
283             ReferenceRegistry.registerReference(LayoutSetUtil.class,
284                 "_persistence");
285         }
286 
287         return _persistence;
288     }
289 
290     public void setPersistence(LayoutSetPersistence persistence) {
291         _persistence = persistence;
292 
293         ReferenceRegistry.registerReference(LayoutSetUtil.class, "_persistence");
294     }
295 
296     private static LayoutSetPersistence _persistence;
297 }