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.ResourceCode;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       ResourceCodePersistence
029     * @see       ResourceCodePersistenceImpl
030     * @generated
031     */
032    public class ResourceCodeUtil {
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(ResourceCode resourceCode) {
044                    getPersistence().clearCache(resourceCode);
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<ResourceCode> 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<ResourceCode> 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<ResourceCode> 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 ResourceCode remove(ResourceCode resourceCode)
087                    throws SystemException {
088                    return getPersistence().remove(resourceCode);
089            }
090    
091            /**
092             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
093             */
094            public static ResourceCode update(ResourceCode resourceCode, boolean merge)
095                    throws SystemException {
096                    return getPersistence().update(resourceCode, merge);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
101             */
102            public static ResourceCode update(ResourceCode resourceCode, boolean merge,
103                    ServiceContext serviceContext) throws SystemException {
104                    return getPersistence().update(resourceCode, merge, serviceContext);
105            }
106    
107            public static void cacheResult(
108                    com.liferay.portal.model.ResourceCode resourceCode) {
109                    getPersistence().cacheResult(resourceCode);
110            }
111    
112            public static void cacheResult(
113                    java.util.List<com.liferay.portal.model.ResourceCode> resourceCodes) {
114                    getPersistence().cacheResult(resourceCodes);
115            }
116    
117            public static com.liferay.portal.model.ResourceCode create(long codeId) {
118                    return getPersistence().create(codeId);
119            }
120    
121            public static com.liferay.portal.model.ResourceCode remove(long codeId)
122                    throws com.liferay.portal.NoSuchResourceCodeException,
123                            com.liferay.portal.kernel.exception.SystemException {
124                    return getPersistence().remove(codeId);
125            }
126    
127            public static com.liferay.portal.model.ResourceCode updateImpl(
128                    com.liferay.portal.model.ResourceCode resourceCode, boolean merge)
129                    throws com.liferay.portal.kernel.exception.SystemException {
130                    return getPersistence().updateImpl(resourceCode, merge);
131            }
132    
133            public static com.liferay.portal.model.ResourceCode findByPrimaryKey(
134                    long codeId)
135                    throws com.liferay.portal.NoSuchResourceCodeException,
136                            com.liferay.portal.kernel.exception.SystemException {
137                    return getPersistence().findByPrimaryKey(codeId);
138            }
139    
140            public static com.liferay.portal.model.ResourceCode fetchByPrimaryKey(
141                    long codeId) throws com.liferay.portal.kernel.exception.SystemException {
142                    return getPersistence().fetchByPrimaryKey(codeId);
143            }
144    
145            public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
146                    long companyId)
147                    throws com.liferay.portal.kernel.exception.SystemException {
148                    return getPersistence().findByCompanyId(companyId);
149            }
150    
151            public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
152                    long companyId, int start, int end)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getPersistence().findByCompanyId(companyId, start, end);
155            }
156    
157            public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
158                    long companyId, int start, int end,
159                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence()
162                                       .findByCompanyId(companyId, start, end, orderByComparator);
163            }
164    
165            public static com.liferay.portal.model.ResourceCode findByCompanyId_First(
166                    long companyId,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.NoSuchResourceCodeException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getPersistence()
171                                       .findByCompanyId_First(companyId, orderByComparator);
172            }
173    
174            public static com.liferay.portal.model.ResourceCode findByCompanyId_Last(
175                    long companyId,
176                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177                    throws com.liferay.portal.NoSuchResourceCodeException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getPersistence()
180                                       .findByCompanyId_Last(companyId, orderByComparator);
181            }
182    
183            public static com.liferay.portal.model.ResourceCode[] findByCompanyId_PrevAndNext(
184                    long codeId, long companyId,
185                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186                    throws com.liferay.portal.NoSuchResourceCodeException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return getPersistence()
189                                       .findByCompanyId_PrevAndNext(codeId, companyId,
190                            orderByComparator);
191            }
192    
193            public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
194                    java.lang.String name)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getPersistence().findByName(name);
197            }
198    
199            public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
200                    java.lang.String name, int start, int end)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence().findByName(name, start, end);
203            }
204    
205            public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
206                    java.lang.String name, int start, int end,
207                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getPersistence().findByName(name, start, end, orderByComparator);
210            }
211    
212            public static com.liferay.portal.model.ResourceCode findByName_First(
213                    java.lang.String name,
214                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
215                    throws com.liferay.portal.NoSuchResourceCodeException,
216                            com.liferay.portal.kernel.exception.SystemException {
217                    return getPersistence().findByName_First(name, orderByComparator);
218            }
219    
220            public static com.liferay.portal.model.ResourceCode findByName_Last(
221                    java.lang.String name,
222                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223                    throws com.liferay.portal.NoSuchResourceCodeException,
224                            com.liferay.portal.kernel.exception.SystemException {
225                    return getPersistence().findByName_Last(name, orderByComparator);
226            }
227    
228            public static com.liferay.portal.model.ResourceCode[] findByName_PrevAndNext(
229                    long codeId, java.lang.String name,
230                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
231                    throws com.liferay.portal.NoSuchResourceCodeException,
232                            com.liferay.portal.kernel.exception.SystemException {
233                    return getPersistence()
234                                       .findByName_PrevAndNext(codeId, name, orderByComparator);
235            }
236    
237            public static com.liferay.portal.model.ResourceCode findByC_N_S(
238                    long companyId, java.lang.String name, int scope)
239                    throws com.liferay.portal.NoSuchResourceCodeException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    return getPersistence().findByC_N_S(companyId, name, scope);
242            }
243    
244            public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
245                    long companyId, java.lang.String name, int scope)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence().fetchByC_N_S(companyId, name, scope);
248            }
249    
250            public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
251                    long companyId, java.lang.String name, int scope,
252                    boolean retrieveFromCache)
253                    throws com.liferay.portal.kernel.exception.SystemException {
254                    return getPersistence()
255                                       .fetchByC_N_S(companyId, name, scope, retrieveFromCache);
256            }
257    
258            public static java.util.List<com.liferay.portal.model.ResourceCode> findAll()
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return getPersistence().findAll();
261            }
262    
263            public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
264                    int start, int end)
265                    throws com.liferay.portal.kernel.exception.SystemException {
266                    return getPersistence().findAll(start, end);
267            }
268    
269            public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
270                    int start, int end,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getPersistence().findAll(start, end, orderByComparator);
274            }
275    
276            public static void removeByCompanyId(long companyId)
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    getPersistence().removeByCompanyId(companyId);
279            }
280    
281            public static void removeByName(java.lang.String name)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    getPersistence().removeByName(name);
284            }
285    
286            public static void removeByC_N_S(long companyId, java.lang.String name,
287                    int scope)
288                    throws com.liferay.portal.NoSuchResourceCodeException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    getPersistence().removeByC_N_S(companyId, name, scope);
291            }
292    
293            public static void removeAll()
294                    throws com.liferay.portal.kernel.exception.SystemException {
295                    getPersistence().removeAll();
296            }
297    
298            public static int countByCompanyId(long companyId)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return getPersistence().countByCompanyId(companyId);
301            }
302    
303            public static int countByName(java.lang.String name)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    return getPersistence().countByName(name);
306            }
307    
308            public static int countByC_N_S(long companyId, java.lang.String name,
309                    int scope) throws com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence().countByC_N_S(companyId, name, scope);
311            }
312    
313            public static int countAll()
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    return getPersistence().countAll();
316            }
317    
318            public static ResourceCodePersistence getPersistence() {
319                    if (_persistence == null) {
320                            _persistence = (ResourceCodePersistence)PortalBeanLocatorUtil.locate(ResourceCodePersistence.class.getName());
321                    }
322    
323                    return _persistence;
324            }
325    
326            public void setPersistence(ResourceCodePersistence persistence) {
327                    _persistence = persistence;
328            }
329    
330            private static ResourceCodePersistence _persistence;
331    }