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