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 @Override 086 public com.liferay.counter.kernel.model.Counter fetchCounter( 087 java.lang.String name) { 088 return _counterLocalService.fetchCounter(name); 089 } 090 091 /** 092 * Returns the counter with the primary key. 093 * 094 * @param name the primary key of the counter 095 * @return the counter 096 * @throws PortalException if a counter with the primary key could not be found 097 */ 098 @Override 099 public com.liferay.counter.kernel.model.Counter getCounter( 100 java.lang.String name) 101 throws com.liferay.portal.kernel.exception.PortalException { 102 return _counterLocalService.getCounter(name); 103 } 104 105 /** 106 * Updates the counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 107 * 108 * @param counter the counter 109 * @return the counter that was updated 110 */ 111 @Override 112 public com.liferay.counter.kernel.model.Counter updateCounter( 113 com.liferay.counter.kernel.model.Counter counter) { 114 return _counterLocalService.updateCounter(counter); 115 } 116 117 @Override 118 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 119 return _counterLocalService.dynamicQuery(); 120 } 121 122 /** 123 * @throws PortalException 124 */ 125 @Override 126 public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 127 com.liferay.portal.kernel.model.PersistedModel persistedModel) 128 throws com.liferay.portal.kernel.exception.PortalException { 129 return _counterLocalService.deletePersistedModel(persistedModel); 130 } 131 132 @Override 133 public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 134 java.io.Serializable primaryKeyObj) 135 throws com.liferay.portal.kernel.exception.PortalException { 136 return _counterLocalService.getPersistedModel(primaryKeyObj); 137 } 138 139 /** 140 * Returns the number of counters. 141 * 142 * @return the number of counters 143 */ 144 @Override 145 public int getCountersCount() { 146 return _counterLocalService.getCountersCount(); 147 } 148 149 /** 150 * Returns the OSGi service identifier. 151 * 152 * @return the OSGi service identifier 153 */ 154 @Override 155 public java.lang.String getOSGiServiceIdentifier() { 156 return _counterLocalService.getOSGiServiceIdentifier(); 157 } 158 159 /** 160 * Performs a dynamic query on the database and returns the matching rows. 161 * 162 * @param dynamicQuery the dynamic query 163 * @return the matching rows 164 */ 165 @Override 166 public <T> java.util.List<T> dynamicQuery( 167 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 168 return _counterLocalService.dynamicQuery(dynamicQuery); 169 } 170 171 /** 172 * Performs a dynamic query on the database and returns a range of the matching rows. 173 * 174 * <p> 175 * 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. 176 * </p> 177 * 178 * @param dynamicQuery the dynamic query 179 * @param start the lower bound of the range of model instances 180 * @param end the upper bound of the range of model instances (not inclusive) 181 * @return the range of matching rows 182 */ 183 @Override 184 public <T> java.util.List<T> dynamicQuery( 185 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 186 int end) { 187 return _counterLocalService.dynamicQuery(dynamicQuery, start, end); 188 } 189 190 /** 191 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 192 * 193 * <p> 194 * 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. 195 * </p> 196 * 197 * @param dynamicQuery the dynamic query 198 * @param start the lower bound of the range of model instances 199 * @param end the upper bound of the range of model instances (not inclusive) 200 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 201 * @return the ordered range of matching rows 202 */ 203 @Override 204 public <T> java.util.List<T> dynamicQuery( 205 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 206 int end, 207 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 208 return _counterLocalService.dynamicQuery(dynamicQuery, start, end, 209 orderByComparator); 210 } 211 212 /** 213 * Returns a range of all the counters. 214 * 215 * <p> 216 * 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. 217 * </p> 218 * 219 * @param start the lower bound of the range of counters 220 * @param end the upper bound of the range of counters (not inclusive) 221 * @return the range of counters 222 */ 223 @Override 224 public java.util.List<com.liferay.counter.kernel.model.Counter> getCounters( 225 int start, int end) { 226 return _counterLocalService.getCounters(start, end); 227 } 228 229 @Override 230 public java.util.List<java.lang.String> getNames() { 231 return _counterLocalService.getNames(); 232 } 233 234 /** 235 * Returns the number of rows matching the dynamic query. 236 * 237 * @param dynamicQuery the dynamic query 238 * @return the number of rows matching the dynamic query 239 */ 240 @Override 241 public long dynamicQueryCount( 242 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 243 return _counterLocalService.dynamicQueryCount(dynamicQuery); 244 } 245 246 /** 247 * Returns the number of rows matching the dynamic query. 248 * 249 * @param dynamicQuery the dynamic query 250 * @param projection the projection to apply to the query 251 * @return the number of rows matching the dynamic query 252 */ 253 @Override 254 public long dynamicQueryCount( 255 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 256 com.liferay.portal.kernel.dao.orm.Projection projection) { 257 return _counterLocalService.dynamicQueryCount(dynamicQuery, projection); 258 } 259 260 @Override 261 public long increment() { 262 return _counterLocalService.increment(); 263 } 264 265 @Override 266 public long increment(java.lang.String name) { 267 return _counterLocalService.increment(name); 268 } 269 270 @Override 271 public long increment(java.lang.String name, int size) { 272 return _counterLocalService.increment(name, size); 273 } 274 275 @Override 276 public void rename(java.lang.String oldName, java.lang.String newName) { 277 _counterLocalService.rename(oldName, newName); 278 } 279 280 @Override 281 public void reset(java.lang.String name) { 282 _counterLocalService.reset(name); 283 } 284 285 @Override 286 public void reset(java.lang.String name, long size) { 287 _counterLocalService.reset(name, size); 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 }