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.ResourceAction;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       ResourceActionPersistence
029     * @see       ResourceActionPersistenceImpl
030     * @generated
031     */
032    public class ResourceActionUtil {
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(ResourceAction resourceAction) {
044                    getPersistence().clearCache(resourceAction);
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<ResourceAction> 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<ResourceAction> 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<ResourceAction> 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 ResourceAction remove(ResourceAction resourceAction)
087                    throws SystemException {
088                    return getPersistence().remove(resourceAction);
089            }
090    
091            /**
092             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
093             */
094            public static ResourceAction update(ResourceAction resourceAction,
095                    boolean merge) throws SystemException {
096                    return getPersistence().update(resourceAction, merge);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
101             */
102            public static ResourceAction update(ResourceAction resourceAction,
103                    boolean merge, ServiceContext serviceContext) throws SystemException {
104                    return getPersistence().update(resourceAction, merge, serviceContext);
105            }
106    
107            public static void cacheResult(
108                    com.liferay.portal.model.ResourceAction resourceAction) {
109                    getPersistence().cacheResult(resourceAction);
110            }
111    
112            public static void cacheResult(
113                    java.util.List<com.liferay.portal.model.ResourceAction> resourceActions) {
114                    getPersistence().cacheResult(resourceActions);
115            }
116    
117            public static com.liferay.portal.model.ResourceAction create(
118                    long resourceActionId) {
119                    return getPersistence().create(resourceActionId);
120            }
121    
122            public static com.liferay.portal.model.ResourceAction remove(
123                    long resourceActionId)
124                    throws com.liferay.portal.NoSuchResourceActionException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    return getPersistence().remove(resourceActionId);
127            }
128    
129            public static com.liferay.portal.model.ResourceAction updateImpl(
130                    com.liferay.portal.model.ResourceAction resourceAction, boolean merge)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return getPersistence().updateImpl(resourceAction, merge);
133            }
134    
135            public static com.liferay.portal.model.ResourceAction findByPrimaryKey(
136                    long resourceActionId)
137                    throws com.liferay.portal.NoSuchResourceActionException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getPersistence().findByPrimaryKey(resourceActionId);
140            }
141    
142            public static com.liferay.portal.model.ResourceAction fetchByPrimaryKey(
143                    long resourceActionId)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getPersistence().fetchByPrimaryKey(resourceActionId);
146            }
147    
148            public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
149                    java.lang.String name)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return getPersistence().findByName(name);
152            }
153    
154            public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
155                    java.lang.String name, int start, int end)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().findByName(name, start, end);
158            }
159    
160            public static java.util.List<com.liferay.portal.model.ResourceAction> findByName(
161                    java.lang.String name, int start, int end,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().findByName(name, start, end, orderByComparator);
165            }
166    
167            public static com.liferay.portal.model.ResourceAction findByName_First(
168                    java.lang.String name,
169                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
170                    throws com.liferay.portal.NoSuchResourceActionException,
171                            com.liferay.portal.kernel.exception.SystemException {
172                    return getPersistence().findByName_First(name, orderByComparator);
173            }
174    
175            public static com.liferay.portal.model.ResourceAction findByName_Last(
176                    java.lang.String name,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.NoSuchResourceActionException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getPersistence().findByName_Last(name, orderByComparator);
181            }
182    
183            public static com.liferay.portal.model.ResourceAction[] findByName_PrevAndNext(
184                    long resourceActionId, java.lang.String name,
185                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186                    throws com.liferay.portal.NoSuchResourceActionException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return getPersistence()
189                                       .findByName_PrevAndNext(resourceActionId, name,
190                            orderByComparator);
191            }
192    
193            public static com.liferay.portal.model.ResourceAction findByN_A(
194                    java.lang.String name, java.lang.String actionId)
195                    throws com.liferay.portal.NoSuchResourceActionException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    return getPersistence().findByN_A(name, actionId);
198            }
199    
200            public static com.liferay.portal.model.ResourceAction fetchByN_A(
201                    java.lang.String name, java.lang.String actionId)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().fetchByN_A(name, actionId);
204            }
205    
206            public static com.liferay.portal.model.ResourceAction fetchByN_A(
207                    java.lang.String name, java.lang.String actionId,
208                    boolean retrieveFromCache)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getPersistence().fetchByN_A(name, actionId, retrieveFromCache);
211            }
212    
213            public static java.util.List<com.liferay.portal.model.ResourceAction> findAll()
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return getPersistence().findAll();
216            }
217    
218            public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
219                    int start, int end)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findAll(start, end);
222            }
223    
224            public static java.util.List<com.liferay.portal.model.ResourceAction> findAll(
225                    int start, int end,
226                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getPersistence().findAll(start, end, orderByComparator);
229            }
230    
231            public static void removeByName(java.lang.String name)
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    getPersistence().removeByName(name);
234            }
235    
236            public static void removeByN_A(java.lang.String name,
237                    java.lang.String actionId)
238                    throws com.liferay.portal.NoSuchResourceActionException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    getPersistence().removeByN_A(name, actionId);
241            }
242    
243            public static void removeAll()
244                    throws com.liferay.portal.kernel.exception.SystemException {
245                    getPersistence().removeAll();
246            }
247    
248            public static int countByName(java.lang.String name)
249                    throws com.liferay.portal.kernel.exception.SystemException {
250                    return getPersistence().countByName(name);
251            }
252    
253            public static int countByN_A(java.lang.String name,
254                    java.lang.String actionId)
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    return getPersistence().countByN_A(name, actionId);
257            }
258    
259            public static int countAll()
260                    throws com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence().countAll();
262            }
263    
264            public static ResourceActionPersistence getPersistence() {
265                    if (_persistence == null) {
266                            _persistence = (ResourceActionPersistence)PortalBeanLocatorUtil.locate(ResourceActionPersistence.class.getName());
267                    }
268    
269                    return _persistence;
270            }
271    
272            public void setPersistence(ResourceActionPersistence persistence) {
273                    _persistence = persistence;
274            }
275    
276            private static ResourceActionPersistence _persistence;
277    }