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;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link ResourceLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       ResourceLocalService
024     * @generated
025     */
026    public class ResourceLocalServiceWrapper implements ResourceLocalService {
027            public ResourceLocalServiceWrapper(
028                    ResourceLocalService resourceLocalService) {
029                    _resourceLocalService = resourceLocalService;
030            }
031    
032            /**
033            * Adds the resource to the database. Also notifies the appropriate model listeners.
034            *
035            * @param resource the resource to add
036            * @return the resource that was added
037            * @throws SystemException if a system exception occurred
038            */
039            public com.liferay.portal.model.Resource addResource(
040                    com.liferay.portal.model.Resource resource)
041                    throws com.liferay.portal.kernel.exception.SystemException {
042                    return _resourceLocalService.addResource(resource);
043            }
044    
045            /**
046            * Creates a new resource with the primary key. Does not add the resource to the database.
047            *
048            * @param resourceId the primary key for the new resource
049            * @return the new resource
050            */
051            public com.liferay.portal.model.Resource createResource(long resourceId) {
052                    return _resourceLocalService.createResource(resourceId);
053            }
054    
055            /**
056            * Deletes the resource with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param resourceId the primary key of the resource to delete
059            * @throws PortalException if a resource with the primary key could not be found
060            * @throws SystemException if a system exception occurred
061            */
062            public void deleteResource(long resourceId)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    _resourceLocalService.deleteResource(resourceId);
066            }
067    
068            /**
069            * Deletes the resource from the database. Also notifies the appropriate model listeners.
070            *
071            * @param resource the resource to delete
072            * @throws SystemException if a system exception occurred
073            */
074            public void deleteResource(com.liferay.portal.model.Resource resource)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    _resourceLocalService.deleteResource(resource);
077            }
078    
079            /**
080            * Performs a dynamic query on the database and returns the matching rows.
081            *
082            * @param dynamicQuery the dynamic query to search with
083            * @return the matching rows
084            * @throws SystemException if a system exception occurred
085            */
086            @SuppressWarnings("rawtypes")
087            public java.util.List dynamicQuery(
088                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
089                    throws com.liferay.portal.kernel.exception.SystemException {
090                    return _resourceLocalService.dynamicQuery(dynamicQuery);
091            }
092    
093            /**
094            * Performs a dynamic query on the database and returns a range of the matching rows.
095            *
096            * <p>
097            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
098            * </p>
099            *
100            * @param dynamicQuery the dynamic query to search with
101            * @param start the lower bound of the range of model instances to return
102            * @param end the upper bound of the range of model instances to return (not inclusive)
103            * @return the range of matching rows
104            * @throws SystemException if a system exception occurred
105            */
106            @SuppressWarnings("rawtypes")
107            public java.util.List dynamicQuery(
108                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
109                    int end) throws com.liferay.portal.kernel.exception.SystemException {
110                    return _resourceLocalService.dynamicQuery(dynamicQuery, start, end);
111            }
112    
113            /**
114            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
115            *
116            * <p>
117            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
118            * </p>
119            *
120            * @param dynamicQuery the dynamic query to search with
121            * @param start the lower bound of the range of model instances to return
122            * @param end the upper bound of the range of model instances to return (not inclusive)
123            * @param orderByComparator the comparator to order the results by
124            * @return the ordered range of matching rows
125            * @throws SystemException if a system exception occurred
126            */
127            @SuppressWarnings("rawtypes")
128            public java.util.List dynamicQuery(
129                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
130                    int end,
131                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
132                    throws com.liferay.portal.kernel.exception.SystemException {
133                    return _resourceLocalService.dynamicQuery(dynamicQuery, start, end,
134                            orderByComparator);
135            }
136    
137            /**
138            * Counts the number of rows that match the dynamic query.
139            *
140            * @param dynamicQuery the dynamic query to search with
141            * @return the number of rows that match the dynamic query
142            * @throws SystemException if a system exception occurred
143            */
144            public long dynamicQueryCount(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return _resourceLocalService.dynamicQueryCount(dynamicQuery);
148            }
149    
150            /**
151            * Gets the resource with the primary key.
152            *
153            * @param resourceId the primary key of the resource to get
154            * @return the resource
155            * @throws PortalException if a resource with the primary key could not be found
156            * @throws SystemException if a system exception occurred
157            */
158            public com.liferay.portal.model.Resource getResource(long resourceId)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    return _resourceLocalService.getResource(resourceId);
162            }
163    
164            /**
165            * Gets a range of all the resources.
166            *
167            * <p>
168            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
169            * </p>
170            *
171            * @param start the lower bound of the range of resources to return
172            * @param end the upper bound of the range of resources to return (not inclusive)
173            * @return the range of resources
174            * @throws SystemException if a system exception occurred
175            */
176            public java.util.List<com.liferay.portal.model.Resource> getResources(
177                    int start, int end)
178                    throws com.liferay.portal.kernel.exception.SystemException {
179                    return _resourceLocalService.getResources(start, end);
180            }
181    
182            /**
183            * Gets the number of resources.
184            *
185            * @return the number of resources
186            * @throws SystemException if a system exception occurred
187            */
188            public int getResourcesCount()
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return _resourceLocalService.getResourcesCount();
191            }
192    
193            /**
194            * Updates the resource in the database. Also notifies the appropriate model listeners.
195            *
196            * @param resource the resource to update
197            * @return the resource that was updated
198            * @throws SystemException if a system exception occurred
199            */
200            public com.liferay.portal.model.Resource updateResource(
201                    com.liferay.portal.model.Resource resource)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return _resourceLocalService.updateResource(resource);
204            }
205    
206            /**
207            * Updates the resource in the database. Also notifies the appropriate model listeners.
208            *
209            * @param resource the resource to update
210            * @param merge whether to merge the resource with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
211            * @return the resource that was updated
212            * @throws SystemException if a system exception occurred
213            */
214            public com.liferay.portal.model.Resource updateResource(
215                    com.liferay.portal.model.Resource resource, boolean merge)
216                    throws com.liferay.portal.kernel.exception.SystemException {
217                    return _resourceLocalService.updateResource(resource, merge);
218            }
219    
220            public void addModelResources(long companyId, long groupId, long userId,
221                    java.lang.String name, long primKey,
222                    java.lang.String[] communityPermissions,
223                    java.lang.String[] guestPermissions)
224                    throws com.liferay.portal.kernel.exception.PortalException,
225                            com.liferay.portal.kernel.exception.SystemException {
226                    _resourceLocalService.addModelResources(companyId, groupId, userId,
227                            name, primKey, communityPermissions, guestPermissions);
228            }
229    
230            public void addModelResources(long companyId, long groupId, long userId,
231                    java.lang.String name, java.lang.String primKey,
232                    java.lang.String[] communityPermissions,
233                    java.lang.String[] guestPermissions)
234                    throws com.liferay.portal.kernel.exception.PortalException,
235                            com.liferay.portal.kernel.exception.SystemException {
236                    _resourceLocalService.addModelResources(companyId, groupId, userId,
237                            name, primKey, communityPermissions, guestPermissions);
238            }
239    
240            public com.liferay.portal.model.Resource addResource(long companyId,
241                    java.lang.String name, int scope, java.lang.String primKey)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return _resourceLocalService.addResource(companyId, name, scope, primKey);
244            }
245    
246            public void addResources(long companyId, long groupId,
247                    java.lang.String name, boolean portletActions)
248                    throws com.liferay.portal.kernel.exception.PortalException,
249                            com.liferay.portal.kernel.exception.SystemException {
250                    _resourceLocalService.addResources(companyId, groupId, name,
251                            portletActions);
252            }
253    
254            public void addResources(long companyId, long groupId, long userId,
255                    java.lang.String name, long primKey, boolean portletActions,
256                    boolean addCommunityPermissions, boolean addGuestPermissions)
257                    throws com.liferay.portal.kernel.exception.PortalException,
258                            com.liferay.portal.kernel.exception.SystemException {
259                    _resourceLocalService.addResources(companyId, groupId, userId, name,
260                            primKey, portletActions, addCommunityPermissions,
261                            addGuestPermissions);
262            }
263    
264            public void addResources(long companyId, long groupId, long userId,
265                    java.lang.String name, java.lang.String primKey,
266                    boolean portletActions, boolean addCommunityPermissions,
267                    boolean addGuestPermissions)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    _resourceLocalService.addResources(companyId, groupId, userId, name,
271                            primKey, portletActions, addCommunityPermissions,
272                            addGuestPermissions);
273            }
274    
275            public void deleteResource(long companyId, java.lang.String name,
276                    int scope, long primKey)
277                    throws com.liferay.portal.kernel.exception.PortalException,
278                            com.liferay.portal.kernel.exception.SystemException {
279                    _resourceLocalService.deleteResource(companyId, name, scope, primKey);
280            }
281    
282            public void deleteResource(long companyId, java.lang.String name,
283                    int scope, java.lang.String primKey)
284                    throws com.liferay.portal.kernel.exception.PortalException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    _resourceLocalService.deleteResource(companyId, name, scope, primKey);
287            }
288    
289            public void deleteResources(java.lang.String name)
290                    throws com.liferay.portal.kernel.exception.SystemException {
291                    _resourceLocalService.deleteResources(name);
292            }
293    
294            public long getLatestResourceId()
295                    throws com.liferay.portal.kernel.exception.SystemException {
296                    return _resourceLocalService.getLatestResourceId();
297            }
298    
299            public com.liferay.portal.model.Resource getResource(long companyId,
300                    java.lang.String name, int scope, java.lang.String primKey)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    return _resourceLocalService.getResource(companyId, name, scope, primKey);
304            }
305    
306            public java.util.List<com.liferay.portal.model.Resource> getResources()
307                    throws com.liferay.portal.kernel.exception.SystemException {
308                    return _resourceLocalService.getResources();
309            }
310    
311            public void updateResources(long companyId, java.lang.String name,
312                    int scope, java.lang.String primKey, java.lang.String newPrimKey)
313                    throws com.liferay.portal.kernel.exception.PortalException,
314                            com.liferay.portal.kernel.exception.SystemException {
315                    _resourceLocalService.updateResources(companyId, name, scope, primKey,
316                            newPrimKey);
317            }
318    
319            public void updateResources(long companyId, long groupId,
320                    java.lang.String name, long primKey,
321                    java.lang.String[] communityPermissions,
322                    java.lang.String[] guestPermissions)
323                    throws com.liferay.portal.kernel.exception.PortalException,
324                            com.liferay.portal.kernel.exception.SystemException {
325                    _resourceLocalService.updateResources(companyId, groupId, name,
326                            primKey, communityPermissions, guestPermissions);
327            }
328    
329            public void updateResources(long companyId, long groupId,
330                    java.lang.String name, java.lang.String primKey,
331                    java.lang.String[] communityPermissions,
332                    java.lang.String[] guestPermissions)
333                    throws com.liferay.portal.kernel.exception.PortalException,
334                            com.liferay.portal.kernel.exception.SystemException {
335                    _resourceLocalService.updateResources(companyId, groupId, name,
336                            primKey, communityPermissions, guestPermissions);
337            }
338    
339            public ResourceLocalService getWrappedResourceLocalService() {
340                    return _resourceLocalService;
341            }
342    
343            private ResourceLocalService _resourceLocalService;
344    }