1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.LayoutSet;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="LayoutSetUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       LayoutSetPersistence
34   * @see       LayoutSetPersistenceImpl
35   * @generated
36   */
37  public class LayoutSetUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(LayoutSet)
47       */
48      public static void clearCache(LayoutSet layoutSet) {
49          getPersistence().clearCache(layoutSet);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<LayoutSet> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<LayoutSet> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          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.kernel.exception.SystemException {
109         return getPersistence().remove(layoutSetId);
110     }
111 
112     public static com.liferay.portal.model.LayoutSet updateImpl(
113         com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getPersistence().updateImpl(layoutSet, merge);
116     }
117 
118     public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
119         long layoutSetId)
120         throws com.liferay.portal.NoSuchLayoutSetException,
121             com.liferay.portal.kernel.exception.SystemException {
122         return getPersistence().findByPrimaryKey(layoutSetId);
123     }
124 
125     public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
126         long layoutSetId)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getPersistence().fetchByPrimaryKey(layoutSetId);
129     }
130 
131     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
132         long groupId)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence().findByGroupId(groupId);
135     }
136 
137     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
138         long groupId, int start, int end)
139         throws com.liferay.portal.kernel.exception.SystemException {
140         return getPersistence().findByGroupId(groupId, start, end);
141     }
142 
143     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
144         long groupId, int start, int end,
145         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146         throws com.liferay.portal.kernel.exception.SystemException {
147         return getPersistence()
148                    .findByGroupId(groupId, start, end, orderByComparator);
149     }
150 
151     public static com.liferay.portal.model.LayoutSet findByGroupId_First(
152         long groupId,
153         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154         throws com.liferay.portal.NoSuchLayoutSetException,
155             com.liferay.portal.kernel.exception.SystemException {
156         return getPersistence().findByGroupId_First(groupId, orderByComparator);
157     }
158 
159     public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
160         long groupId,
161         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162         throws com.liferay.portal.NoSuchLayoutSetException,
163             com.liferay.portal.kernel.exception.SystemException {
164         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
165     }
166 
167     public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
168         long layoutSetId, long groupId,
169         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
170         throws com.liferay.portal.NoSuchLayoutSetException,
171             com.liferay.portal.kernel.exception.SystemException {
172         return getPersistence()
173                    .findByGroupId_PrevAndNext(layoutSetId, groupId,
174             orderByComparator);
175     }
176 
177     public static com.liferay.portal.model.LayoutSet findByVirtualHost(
178         java.lang.String virtualHost)
179         throws com.liferay.portal.NoSuchLayoutSetException,
180             com.liferay.portal.kernel.exception.SystemException {
181         return getPersistence().findByVirtualHost(virtualHost);
182     }
183 
184     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
185         java.lang.String virtualHost)
186         throws com.liferay.portal.kernel.exception.SystemException {
187         return getPersistence().fetchByVirtualHost(virtualHost);
188     }
189 
190     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
191         java.lang.String virtualHost, boolean retrieveFromCache)
192         throws com.liferay.portal.kernel.exception.SystemException {
193         return getPersistence()
194                    .fetchByVirtualHost(virtualHost, retrieveFromCache);
195     }
196 
197     public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
198         boolean privateLayout)
199         throws com.liferay.portal.NoSuchLayoutSetException,
200             com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence().findByG_P(groupId, privateLayout);
202     }
203 
204     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
205         boolean privateLayout)
206         throws com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence().fetchByG_P(groupId, privateLayout);
208     }
209 
210     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
211         boolean privateLayout, boolean retrieveFromCache)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence()
214                    .fetchByG_P(groupId, privateLayout, retrieveFromCache);
215     }
216 
217     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
218         throws com.liferay.portal.kernel.exception.SystemException {
219         return getPersistence().findAll();
220     }
221 
222     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
223         int start, int end)
224         throws com.liferay.portal.kernel.exception.SystemException {
225         return getPersistence().findAll(start, end);
226     }
227 
228     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
229         int start, int end,
230         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
231         throws com.liferay.portal.kernel.exception.SystemException {
232         return getPersistence().findAll(start, end, orderByComparator);
233     }
234 
235     public static void removeByGroupId(long groupId)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         getPersistence().removeByGroupId(groupId);
238     }
239 
240     public static void removeByVirtualHost(java.lang.String virtualHost)
241         throws com.liferay.portal.NoSuchLayoutSetException,
242             com.liferay.portal.kernel.exception.SystemException {
243         getPersistence().removeByVirtualHost(virtualHost);
244     }
245 
246     public static void removeByG_P(long groupId, boolean privateLayout)
247         throws com.liferay.portal.NoSuchLayoutSetException,
248             com.liferay.portal.kernel.exception.SystemException {
249         getPersistence().removeByG_P(groupId, privateLayout);
250     }
251 
252     public static void removeAll()
253         throws com.liferay.portal.kernel.exception.SystemException {
254         getPersistence().removeAll();
255     }
256 
257     public static int countByGroupId(long groupId)
258         throws com.liferay.portal.kernel.exception.SystemException {
259         return getPersistence().countByGroupId(groupId);
260     }
261 
262     public static int countByVirtualHost(java.lang.String virtualHost)
263         throws com.liferay.portal.kernel.exception.SystemException {
264         return getPersistence().countByVirtualHost(virtualHost);
265     }
266 
267     public static int countByG_P(long groupId, boolean privateLayout)
268         throws com.liferay.portal.kernel.exception.SystemException {
269         return getPersistence().countByG_P(groupId, privateLayout);
270     }
271 
272     public static int countAll()
273         throws com.liferay.portal.kernel.exception.SystemException {
274         return getPersistence().countAll();
275     }
276 
277     public static LayoutSetPersistence getPersistence() {
278         if (_persistence == null) {
279             _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName());
280         }
281 
282         return _persistence;
283     }
284 
285     public void setPersistence(LayoutSetPersistence persistence) {
286         _persistence = persistence;
287     }
288 
289     private static LayoutSetPersistence _persistence;
290 }