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.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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static LayoutSet remove(LayoutSet layoutSet)
65          throws SystemException {
66          return getPersistence().remove(layoutSet);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static LayoutSet update(LayoutSet layoutSet, boolean merge)
73          throws SystemException {
74          return getPersistence().update(layoutSet, merge);
75      }
76  
77      public static void cacheResult(com.liferay.portal.model.LayoutSet layoutSet) {
78          getPersistence().cacheResult(layoutSet);
79      }
80  
81      public static void cacheResult(
82          java.util.List<com.liferay.portal.model.LayoutSet> layoutSets) {
83          getPersistence().cacheResult(layoutSets);
84      }
85  
86      public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
87          return getPersistence().create(layoutSetId);
88      }
89  
90      public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
91          throws com.liferay.portal.NoSuchLayoutSetException,
92              com.liferay.portal.SystemException {
93          return getPersistence().remove(layoutSetId);
94      }
95  
96      /**
97       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
98       */
99      public static com.liferay.portal.model.LayoutSet update(
100         com.liferay.portal.model.LayoutSet layoutSet)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().update(layoutSet);
103     }
104 
105     public static com.liferay.portal.model.LayoutSet updateImpl(
106         com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().updateImpl(layoutSet, merge);
109     }
110 
111     public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
112         long layoutSetId)
113         throws com.liferay.portal.NoSuchLayoutSetException,
114             com.liferay.portal.SystemException {
115         return getPersistence().findByPrimaryKey(layoutSetId);
116     }
117 
118     public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
119         long layoutSetId) throws com.liferay.portal.SystemException {
120         return getPersistence().fetchByPrimaryKey(layoutSetId);
121     }
122 
123     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
124         long groupId) throws com.liferay.portal.SystemException {
125         return getPersistence().findByGroupId(groupId);
126     }
127 
128     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
129         long groupId, int start, int end)
130         throws com.liferay.portal.SystemException {
131         return getPersistence().findByGroupId(groupId, start, end);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
135         long groupId, int start, int end,
136         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
137         throws com.liferay.portal.SystemException {
138         return getPersistence()
139                    .findByGroupId(groupId, start, end, orderByComparator);
140     }
141 
142     public static com.liferay.portal.model.LayoutSet findByGroupId_First(
143         long groupId,
144         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145         throws com.liferay.portal.NoSuchLayoutSetException,
146             com.liferay.portal.SystemException {
147         return getPersistence().findByGroupId_First(groupId, orderByComparator);
148     }
149 
150     public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
151         long groupId,
152         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153         throws com.liferay.portal.NoSuchLayoutSetException,
154             com.liferay.portal.SystemException {
155         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
156     }
157 
158     public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
159         long layoutSetId, long groupId,
160         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161         throws com.liferay.portal.NoSuchLayoutSetException,
162             com.liferay.portal.SystemException {
163         return getPersistence()
164                    .findByGroupId_PrevAndNext(layoutSetId, groupId,
165             orderByComparator);
166     }
167 
168     public static com.liferay.portal.model.LayoutSet findByVirtualHost(
169         java.lang.String virtualHost)
170         throws com.liferay.portal.NoSuchLayoutSetException,
171             com.liferay.portal.SystemException {
172         return getPersistence().findByVirtualHost(virtualHost);
173     }
174 
175     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
176         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
177         return getPersistence().fetchByVirtualHost(virtualHost);
178     }
179 
180     public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
181         java.lang.String virtualHost, boolean retrieveFromCache)
182         throws com.liferay.portal.SystemException {
183         return getPersistence()
184                    .fetchByVirtualHost(virtualHost, retrieveFromCache);
185     }
186 
187     public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
188         boolean privateLayout)
189         throws com.liferay.portal.NoSuchLayoutSetException,
190             com.liferay.portal.SystemException {
191         return getPersistence().findByG_P(groupId, privateLayout);
192     }
193 
194     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
195         boolean privateLayout) throws com.liferay.portal.SystemException {
196         return getPersistence().fetchByG_P(groupId, privateLayout);
197     }
198 
199     public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
200         boolean privateLayout, boolean retrieveFromCache)
201         throws com.liferay.portal.SystemException {
202         return getPersistence()
203                    .fetchByG_P(groupId, privateLayout, retrieveFromCache);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findAll();
209     }
210 
211     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
212         int start, int end) throws com.liferay.portal.SystemException {
213         return getPersistence().findAll(start, end);
214     }
215 
216     public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
217         int start, int end,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.SystemException {
220         return getPersistence().findAll(start, end, orderByComparator);
221     }
222 
223     public static void removeByGroupId(long groupId)
224         throws com.liferay.portal.SystemException {
225         getPersistence().removeByGroupId(groupId);
226     }
227 
228     public static void removeByVirtualHost(java.lang.String virtualHost)
229         throws com.liferay.portal.NoSuchLayoutSetException,
230             com.liferay.portal.SystemException {
231         getPersistence().removeByVirtualHost(virtualHost);
232     }
233 
234     public static void removeByG_P(long groupId, boolean privateLayout)
235         throws com.liferay.portal.NoSuchLayoutSetException,
236             com.liferay.portal.SystemException {
237         getPersistence().removeByG_P(groupId, privateLayout);
238     }
239 
240     public static void removeAll() throws com.liferay.portal.SystemException {
241         getPersistence().removeAll();
242     }
243 
244     public static int countByGroupId(long groupId)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().countByGroupId(groupId);
247     }
248 
249     public static int countByVirtualHost(java.lang.String virtualHost)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().countByVirtualHost(virtualHost);
252     }
253 
254     public static int countByG_P(long groupId, boolean privateLayout)
255         throws com.liferay.portal.SystemException {
256         return getPersistence().countByG_P(groupId, privateLayout);
257     }
258 
259     public static int countAll() throws com.liferay.portal.SystemException {
260         return getPersistence().countAll();
261     }
262 
263     public static LayoutSetPersistence getPersistence() {
264         if (_persistence == null) {
265             _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName());
266         }
267 
268         return _persistence;
269     }
270 
271     public void setPersistence(LayoutSetPersistence persistence) {
272         _persistence = persistence;
273     }
274 
275     private static LayoutSetPersistence _persistence;
276 }