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.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.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.model.Counter addCounter( 043 com.liferay.counter.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.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.model.Counter deleteCounter( 067 com.liferay.counter.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.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.model.PersistedModel deletePersistedModel( 090 com.liferay.portal.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.model.Counter fetchCounter(java.lang.String name) { 181 return _counterLocalService.fetchCounter(name); 182 } 183 184 /** 185 * Returns the counter with the primary key. 186 * 187 * @param name the primary key of the counter 188 * @return the counter 189 * @throws PortalException if a counter with the primary key could not be found 190 */ 191 @Override 192 public com.liferay.counter.model.Counter getCounter(java.lang.String name) 193 throws com.liferay.portal.kernel.exception.PortalException { 194 return _counterLocalService.getCounter(name); 195 } 196 197 /** 198 * Returns a range of all the counters. 199 * 200 * <p> 201 * 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. 202 * </p> 203 * 204 * @param start the lower bound of the range of counters 205 * @param end the upper bound of the range of counters (not inclusive) 206 * @return the range of counters 207 */ 208 @Override 209 public java.util.List<com.liferay.counter.model.Counter> getCounters( 210 int start, int end) { 211 return _counterLocalService.getCounters(start, end); 212 } 213 214 /** 215 * Returns the number of counters. 216 * 217 * @return the number of counters 218 */ 219 @Override 220 public int getCountersCount() { 221 return _counterLocalService.getCountersCount(); 222 } 223 224 @Override 225 public java.util.List<java.lang.String> getNames() { 226 return _counterLocalService.getNames(); 227 } 228 229 /** 230 * Returns the OSGi service identifier. 231 * 232 * @return the OSGi service identifier 233 */ 234 @Override 235 public java.lang.String getOSGiServiceIdentifier() { 236 return _counterLocalService.getOSGiServiceIdentifier(); 237 } 238 239 @Override 240 public com.liferay.portal.model.PersistedModel getPersistedModel( 241 java.io.Serializable primaryKeyObj) 242 throws com.liferay.portal.kernel.exception.PortalException { 243 return _counterLocalService.getPersistedModel(primaryKeyObj); 244 } 245 246 @Override 247 public long increment() { 248 return _counterLocalService.increment(); 249 } 250 251 @Override 252 public long increment(java.lang.String name) { 253 return _counterLocalService.increment(name); 254 } 255 256 @Override 257 public long increment(java.lang.String name, int size) { 258 return _counterLocalService.increment(name, size); 259 } 260 261 @Override 262 public void rename(java.lang.String oldName, java.lang.String newName) { 263 _counterLocalService.rename(oldName, newName); 264 } 265 266 @Override 267 public void reset(java.lang.String name) { 268 _counterLocalService.reset(name); 269 } 270 271 @Override 272 public void reset(java.lang.String name, long size) { 273 _counterLocalService.reset(name, size); 274 } 275 276 /** 277 * Updates the counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 278 * 279 * @param counter the counter 280 * @return the counter that was updated 281 */ 282 @Override 283 public com.liferay.counter.model.Counter updateCounter( 284 com.liferay.counter.model.Counter counter) { 285 return _counterLocalService.updateCounter(counter); 286 } 287 288 @Override 289 public CounterLocalService getWrappedService() { 290 return _counterLocalService; 291 } 292 293 @Override 294 public void setWrappedService(CounterLocalService counterLocalService) { 295 _counterLocalService = counterLocalService; 296 } 297 298 private CounterLocalService _counterLocalService; 299 }