001    /**
002     * Copyright (c) 2000-present 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.counter.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.service.ServiceWrapper;
020    
021    /**
022     * Provides a wrapper for {@link CounterLocalService}.
023     *
024     * @author Brian Wing Shun Chan
025     * @see CounterLocalService
026     * @generated
027     */
028    @ProviderType
029    public class CounterLocalServiceWrapper implements CounterLocalService,
030            ServiceWrapper<CounterLocalService> {
031            public CounterLocalServiceWrapper(CounterLocalService counterLocalService) {
032                    _counterLocalService = counterLocalService;
033            }
034    
035            /**
036            * Adds the counter to the database. Also notifies the appropriate model listeners.
037            *
038            * @param counter the counter
039            * @return the counter that was added
040            */
041            @Override
042            public com.liferay.counter.kernel.model.Counter addCounter(
043                    com.liferay.counter.kernel.model.Counter counter) {
044                    return _counterLocalService.addCounter(counter);
045            }
046    
047            /**
048            * Creates a new counter with the primary key. Does not add the counter to the database.
049            *
050            * @param name the primary key for the new counter
051            * @return the new counter
052            */
053            @Override
054            public com.liferay.counter.kernel.model.Counter createCounter(
055                    java.lang.String name) {
056                    return _counterLocalService.createCounter(name);
057            }
058    
059            /**
060            * Deletes the counter from the database. Also notifies the appropriate model listeners.
061            *
062            * @param counter the counter
063            * @return the counter that was removed
064            */
065            @Override
066            public com.liferay.counter.kernel.model.Counter deleteCounter(
067                    com.liferay.counter.kernel.model.Counter counter) {
068                    return _counterLocalService.deleteCounter(counter);
069            }
070    
071            /**
072            * Deletes the counter with the primary key from the database. Also notifies the appropriate model listeners.
073            *
074            * @param name the primary key of the counter
075            * @return the counter that was removed
076            * @throws PortalException if a counter with the primary key could not be found
077            */
078            @Override
079            public com.liferay.counter.kernel.model.Counter deleteCounter(
080                    java.lang.String name)
081                    throws com.liferay.portal.kernel.exception.PortalException {
082                    return _counterLocalService.deleteCounter(name);
083            }
084    
085            /**
086            * @throws PortalException
087            */
088            @Override
089            public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
090                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
091                    throws com.liferay.portal.kernel.exception.PortalException {
092                    return _counterLocalService.deletePersistedModel(persistedModel);
093            }
094    
095            @Override
096            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
097                    return _counterLocalService.dynamicQuery();
098            }
099    
100            /**
101            * Performs a dynamic query on the database and returns the matching rows.
102            *
103            * @param dynamicQuery the dynamic query
104            * @return the matching rows
105            */
106            @Override
107            public <T> java.util.List<T> dynamicQuery(
108                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
109                    return _counterLocalService.dynamicQuery(dynamicQuery);
110            }
111    
112            /**
113            * Performs a dynamic query on the database and returns a range of the matching rows.
114            *
115            * <p>
116            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.counter.model.impl.CounterModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
117            * </p>
118            *
119            * @param dynamicQuery the dynamic query
120            * @param start the lower bound of the range of model instances
121            * @param end the upper bound of the range of model instances (not inclusive)
122            * @return the range of matching rows
123            */
124            @Override
125            public <T> java.util.List<T> dynamicQuery(
126                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
127                    int end) {
128                    return _counterLocalService.dynamicQuery(dynamicQuery, start, end);
129            }
130    
131            /**
132            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
133            *
134            * <p>
135            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.counter.model.impl.CounterModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
136            * </p>
137            *
138            * @param dynamicQuery the dynamic query
139            * @param start the lower bound of the range of model instances
140            * @param end the upper bound of the range of model instances (not inclusive)
141            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
142            * @return the ordered range of matching rows
143            */
144            @Override
145            public <T> java.util.List<T> dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
149                    return _counterLocalService.dynamicQuery(dynamicQuery, start, end,
150                            orderByComparator);
151            }
152    
153            /**
154            * Returns the number of rows matching the dynamic query.
155            *
156            * @param dynamicQuery the dynamic query
157            * @return the number of rows matching the dynamic query
158            */
159            @Override
160            public long dynamicQueryCount(
161                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
162                    return _counterLocalService.dynamicQueryCount(dynamicQuery);
163            }
164    
165            /**
166            * Returns the number of rows matching the dynamic query.
167            *
168            * @param dynamicQuery the dynamic query
169            * @param projection the projection to apply to the query
170            * @return the number of rows matching the dynamic query
171            */
172            @Override
173            public long dynamicQueryCount(
174                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
175                    com.liferay.portal.kernel.dao.orm.Projection projection) {
176                    return _counterLocalService.dynamicQueryCount(dynamicQuery, projection);
177            }
178    
179            @Override
180            public com.liferay.counter.kernel.model.Counter fetchCounter(
181                    java.lang.String name) {
182                    return _counterLocalService.fetchCounter(name);
183            }
184    
185            /**
186            * Returns the counter with the primary key.
187            *
188            * @param name the primary key of the counter
189            * @return the counter
190            * @throws PortalException if a counter with the primary key could not be found
191            */
192            @Override
193            public com.liferay.counter.kernel.model.Counter getCounter(
194                    java.lang.String name)
195                    throws com.liferay.portal.kernel.exception.PortalException {
196                    return _counterLocalService.getCounter(name);
197            }
198    
199            /**
200            * Returns a range of all the counters.
201            *
202            * <p>
203            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.counter.model.impl.CounterModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
204            * </p>
205            *
206            * @param start the lower bound of the range of counters
207            * @param end the upper bound of the range of counters (not inclusive)
208            * @return the range of counters
209            */
210            @Override
211            public java.util.List<com.liferay.counter.kernel.model.Counter> getCounters(
212                    int start, int end) {
213                    return _counterLocalService.getCounters(start, end);
214            }
215    
216            /**
217            * Returns the number of counters.
218            *
219            * @return the number of counters
220            */
221            @Override
222            public int getCountersCount() {
223                    return _counterLocalService.getCountersCount();
224            }
225    
226            @Override
227            public java.util.List<java.lang.String> getNames() {
228                    return _counterLocalService.getNames();
229            }
230    
231            /**
232            * Returns the OSGi service identifier.
233            *
234            * @return the OSGi service identifier
235            */
236            @Override
237            public java.lang.String getOSGiServiceIdentifier() {
238                    return _counterLocalService.getOSGiServiceIdentifier();
239            }
240    
241            @Override
242            public com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
243                    java.io.Serializable primaryKeyObj)
244                    throws com.liferay.portal.kernel.exception.PortalException {
245                    return _counterLocalService.getPersistedModel(primaryKeyObj);
246            }
247    
248            @Override
249            public long increment() {
250                    return _counterLocalService.increment();
251            }
252    
253            @Override
254            public long increment(java.lang.String name) {
255                    return _counterLocalService.increment(name);
256            }
257    
258            @Override
259            public long increment(java.lang.String name, int size) {
260                    return _counterLocalService.increment(name, size);
261            }
262    
263            @Override
264            public void rename(java.lang.String oldName, java.lang.String newName) {
265                    _counterLocalService.rename(oldName, newName);
266            }
267    
268            @Override
269            public void reset(java.lang.String name) {
270                    _counterLocalService.reset(name);
271            }
272    
273            @Override
274            public void reset(java.lang.String name, long size) {
275                    _counterLocalService.reset(name, size);
276            }
277    
278            /**
279            * Updates the counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
280            *
281            * @param counter the counter
282            * @return the counter that was updated
283            */
284            @Override
285            public com.liferay.counter.kernel.model.Counter updateCounter(
286                    com.liferay.counter.kernel.model.Counter counter) {
287                    return _counterLocalService.updateCounter(counter);
288            }
289    
290            @Override
291            public CounterLocalService getWrappedService() {
292                    return _counterLocalService;
293            }
294    
295            @Override
296            public void setWrappedService(CounterLocalService counterLocalService) {
297                    _counterLocalService = counterLocalService;
298            }
299    
300            private CounterLocalService _counterLocalService;
301    }