001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.LayoutSet;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       LayoutSetPersistence
029     * @see       LayoutSetPersistenceImpl
030     * @generated
031     */
032    public class LayoutSetUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(LayoutSet layoutSet) {
044                    getPersistence().clearCache(layoutSet);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<LayoutSet> findWithDynamicQuery(
059                    DynamicQuery dynamicQuery) throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<LayoutSet> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<LayoutSet> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static LayoutSet remove(LayoutSet layoutSet)
087                    throws SystemException {
088                    return getPersistence().remove(layoutSet);
089            }
090    
091            /**
092             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
093             */
094            public static LayoutSet update(LayoutSet layoutSet, boolean merge)
095                    throws SystemException {
096                    return getPersistence().update(layoutSet, merge);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
101             */
102            public static LayoutSet update(LayoutSet layoutSet, boolean merge,
103                    ServiceContext serviceContext) throws SystemException {
104                    return getPersistence().update(layoutSet, merge, serviceContext);
105            }
106    
107            public static void cacheResult(com.liferay.portal.model.LayoutSet layoutSet) {
108                    getPersistence().cacheResult(layoutSet);
109            }
110    
111            public static void cacheResult(
112                    java.util.List<com.liferay.portal.model.LayoutSet> layoutSets) {
113                    getPersistence().cacheResult(layoutSets);
114            }
115    
116            public static com.liferay.portal.model.LayoutSet create(long layoutSetId) {
117                    return getPersistence().create(layoutSetId);
118            }
119    
120            public static com.liferay.portal.model.LayoutSet remove(long layoutSetId)
121                    throws com.liferay.portal.NoSuchLayoutSetException,
122                            com.liferay.portal.kernel.exception.SystemException {
123                    return getPersistence().remove(layoutSetId);
124            }
125    
126            public static com.liferay.portal.model.LayoutSet updateImpl(
127                    com.liferay.portal.model.LayoutSet layoutSet, boolean merge)
128                    throws com.liferay.portal.kernel.exception.SystemException {
129                    return getPersistence().updateImpl(layoutSet, merge);
130            }
131    
132            public static com.liferay.portal.model.LayoutSet findByPrimaryKey(
133                    long layoutSetId)
134                    throws com.liferay.portal.NoSuchLayoutSetException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    return getPersistence().findByPrimaryKey(layoutSetId);
137            }
138    
139            public static com.liferay.portal.model.LayoutSet fetchByPrimaryKey(
140                    long layoutSetId)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return getPersistence().fetchByPrimaryKey(layoutSetId);
143            }
144    
145            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
146                    long groupId)
147                    throws com.liferay.portal.kernel.exception.SystemException {
148                    return getPersistence().findByGroupId(groupId);
149            }
150    
151            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
152                    long groupId, int start, int end)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getPersistence().findByGroupId(groupId, start, end);
155            }
156    
157            public static java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId(
158                    long groupId, int start, int end,
159                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence()
162                                       .findByGroupId(groupId, start, end, orderByComparator);
163            }
164    
165            public static com.liferay.portal.model.LayoutSet findByGroupId_First(
166                    long groupId,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.NoSuchLayoutSetException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
171            }
172    
173            public static com.liferay.portal.model.LayoutSet findByGroupId_Last(
174                    long groupId,
175                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176                    throws com.liferay.portal.NoSuchLayoutSetException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
179            }
180    
181            public static com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext(
182                    long layoutSetId, long groupId,
183                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
184                    throws com.liferay.portal.NoSuchLayoutSetException,
185                            com.liferay.portal.kernel.exception.SystemException {
186                    return getPersistence()
187                                       .findByGroupId_PrevAndNext(layoutSetId, groupId,
188                            orderByComparator);
189            }
190    
191            public static com.liferay.portal.model.LayoutSet findByVirtualHost(
192                    java.lang.String virtualHost)
193                    throws com.liferay.portal.NoSuchLayoutSetException,
194                            com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().findByVirtualHost(virtualHost);
196            }
197    
198            public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
199                    java.lang.String virtualHost)
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return getPersistence().fetchByVirtualHost(virtualHost);
202            }
203    
204            public static com.liferay.portal.model.LayoutSet fetchByVirtualHost(
205                    java.lang.String virtualHost, boolean retrieveFromCache)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return getPersistence()
208                                       .fetchByVirtualHost(virtualHost, retrieveFromCache);
209            }
210    
211            public static com.liferay.portal.model.LayoutSet findByG_P(long groupId,
212                    boolean privateLayout)
213                    throws com.liferay.portal.NoSuchLayoutSetException,
214                            com.liferay.portal.kernel.exception.SystemException {
215                    return getPersistence().findByG_P(groupId, privateLayout);
216            }
217    
218            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
219                    boolean privateLayout)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().fetchByG_P(groupId, privateLayout);
222            }
223    
224            public static com.liferay.portal.model.LayoutSet fetchByG_P(long groupId,
225                    boolean privateLayout, boolean retrieveFromCache)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence()
228                                       .fetchByG_P(groupId, privateLayout, retrieveFromCache);
229            }
230    
231            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll()
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    return getPersistence().findAll();
234            }
235    
236            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
237                    int start, int end)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return getPersistence().findAll(start, end);
240            }
241    
242            public static java.util.List<com.liferay.portal.model.LayoutSet> findAll(
243                    int start, int end,
244                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getPersistence().findAll(start, end, orderByComparator);
247            }
248    
249            public static void removeByGroupId(long groupId)
250                    throws com.liferay.portal.kernel.exception.SystemException {
251                    getPersistence().removeByGroupId(groupId);
252            }
253    
254            public static void removeByVirtualHost(java.lang.String virtualHost)
255                    throws com.liferay.portal.NoSuchLayoutSetException,
256                            com.liferay.portal.kernel.exception.SystemException {
257                    getPersistence().removeByVirtualHost(virtualHost);
258            }
259    
260            public static void removeByG_P(long groupId, boolean privateLayout)
261                    throws com.liferay.portal.NoSuchLayoutSetException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    getPersistence().removeByG_P(groupId, privateLayout);
264            }
265    
266            public static void removeAll()
267                    throws com.liferay.portal.kernel.exception.SystemException {
268                    getPersistence().removeAll();
269            }
270    
271            public static int countByGroupId(long groupId)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getPersistence().countByGroupId(groupId);
274            }
275    
276            public static int countByVirtualHost(java.lang.String virtualHost)
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    return getPersistence().countByVirtualHost(virtualHost);
279            }
280    
281            public static int countByG_P(long groupId, boolean privateLayout)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    return getPersistence().countByG_P(groupId, privateLayout);
284            }
285    
286            public static int countAll()
287                    throws com.liferay.portal.kernel.exception.SystemException {
288                    return getPersistence().countAll();
289            }
290    
291            public static LayoutSetPersistence getPersistence() {
292                    if (_persistence == null) {
293                            _persistence = (LayoutSetPersistence)PortalBeanLocatorUtil.locate(LayoutSetPersistence.class.getName());
294                    }
295    
296                    return _persistence;
297            }
298    
299            public void setPersistence(LayoutSetPersistence persistence) {
300                    _persistence = persistence;
301            }
302    
303            private static LayoutSetPersistence _persistence;
304    }