001 /** 002 * Copyright (c) 2000-2011 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 /** 018 * <p> 019 * This class is a wrapper for {@link CounterLocalService}. 020 * </p> 021 * 022 * @author Brian Wing Shun Chan 023 * @see CounterLocalService 024 * @generated 025 */ 026 public class CounterLocalServiceWrapper implements CounterLocalService { 027 public CounterLocalServiceWrapper(CounterLocalService counterLocalService) { 028 _counterLocalService = counterLocalService; 029 } 030 031 /** 032 * Adds the counter to the database. Also notifies the appropriate model listeners. 033 * 034 * @param counter the counter 035 * @return the counter that was added 036 * @throws SystemException if a system exception occurred 037 */ 038 public com.liferay.counter.model.Counter addCounter( 039 com.liferay.counter.model.Counter counter) 040 throws com.liferay.portal.kernel.exception.SystemException { 041 return _counterLocalService.addCounter(counter); 042 } 043 044 /** 045 * Creates a new counter with the primary key. Does not add the counter to the database. 046 * 047 * @param name the primary key for the new counter 048 * @return the new counter 049 */ 050 public com.liferay.counter.model.Counter createCounter( 051 java.lang.String name) { 052 return _counterLocalService.createCounter(name); 053 } 054 055 /** 056 * Deletes the counter with the primary key from the database. Also notifies the appropriate model listeners. 057 * 058 * @param name the primary key of the counter 059 * @throws PortalException if a counter with the primary key could not be found 060 * @throws SystemException if a system exception occurred 061 */ 062 public void deleteCounter(java.lang.String name) 063 throws com.liferay.portal.kernel.exception.PortalException, 064 com.liferay.portal.kernel.exception.SystemException { 065 _counterLocalService.deleteCounter(name); 066 } 067 068 /** 069 * Deletes the counter from the database. Also notifies the appropriate model listeners. 070 * 071 * @param counter the counter 072 * @throws SystemException if a system exception occurred 073 */ 074 public void deleteCounter(com.liferay.counter.model.Counter counter) 075 throws com.liferay.portal.kernel.exception.SystemException { 076 _counterLocalService.deleteCounter(counter); 077 } 078 079 /** 080 * Performs a dynamic query on the database and returns the matching rows. 081 * 082 * @param dynamicQuery the dynamic query 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 _counterLocalService.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 101 * @param start the lower bound of the range of model instances 102 * @param end the upper bound of the range of model instances (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 _counterLocalService.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 121 * @param start the lower bound of the range of model instances 122 * @param end the upper bound of the range of model instances (not inclusive) 123 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 _counterLocalService.dynamicQuery(dynamicQuery, start, end, 134 orderByComparator); 135 } 136 137 /** 138 * Returns the number of rows that match the dynamic query. 139 * 140 * @param dynamicQuery the dynamic query 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 _counterLocalService.dynamicQueryCount(dynamicQuery); 148 } 149 150 /** 151 * Returns the counter with the primary key. 152 * 153 * @param name the primary key of the counter 154 * @return the counter 155 * @throws PortalException if a counter with the primary key could not be found 156 * @throws SystemException if a system exception occurred 157 */ 158 public com.liferay.counter.model.Counter getCounter(java.lang.String name) 159 throws com.liferay.portal.kernel.exception.PortalException, 160 com.liferay.portal.kernel.exception.SystemException { 161 return _counterLocalService.getCounter(name); 162 } 163 164 public com.liferay.portal.model.PersistedModel getPersistedModel( 165 java.io.Serializable primaryKeyObj) 166 throws com.liferay.portal.kernel.exception.PortalException, 167 com.liferay.portal.kernel.exception.SystemException { 168 return _counterLocalService.getPersistedModel(primaryKeyObj); 169 } 170 171 /** 172 * Returns a range of all the counters. 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. 176 * </p> 177 * 178 * @param start the lower bound of the range of counters 179 * @param end the upper bound of the range of counters (not inclusive) 180 * @return the range of counters 181 * @throws SystemException if a system exception occurred 182 */ 183 public java.util.List<com.liferay.counter.model.Counter> getCounters( 184 int start, int end) 185 throws com.liferay.portal.kernel.exception.SystemException { 186 return _counterLocalService.getCounters(start, end); 187 } 188 189 /** 190 * Returns the number of counters. 191 * 192 * @return the number of counters 193 * @throws SystemException if a system exception occurred 194 */ 195 public int getCountersCount() 196 throws com.liferay.portal.kernel.exception.SystemException { 197 return _counterLocalService.getCountersCount(); 198 } 199 200 /** 201 * Updates the counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 202 * 203 * @param counter the counter 204 * @return the counter that was updated 205 * @throws SystemException if a system exception occurred 206 */ 207 public com.liferay.counter.model.Counter updateCounter( 208 com.liferay.counter.model.Counter counter) 209 throws com.liferay.portal.kernel.exception.SystemException { 210 return _counterLocalService.updateCounter(counter); 211 } 212 213 /** 214 * Updates the counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 215 * 216 * @param counter the counter 217 * @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. 218 * @return the counter that was updated 219 * @throws SystemException if a system exception occurred 220 */ 221 public com.liferay.counter.model.Counter updateCounter( 222 com.liferay.counter.model.Counter counter, boolean merge) 223 throws com.liferay.portal.kernel.exception.SystemException { 224 return _counterLocalService.updateCounter(counter, merge); 225 } 226 227 /** 228 * Returns the Spring bean ID for this bean. 229 * 230 * @return the Spring bean ID for this bean 231 */ 232 public java.lang.String getBeanIdentifier() { 233 return _counterLocalService.getBeanIdentifier(); 234 } 235 236 /** 237 * Sets the Spring bean ID for this bean. 238 * 239 * @param beanIdentifier the Spring bean ID for this bean 240 */ 241 public void setBeanIdentifier(java.lang.String beanIdentifier) { 242 _counterLocalService.setBeanIdentifier(beanIdentifier); 243 } 244 245 public java.util.List<java.lang.String> getNames() 246 throws com.liferay.portal.kernel.exception.SystemException { 247 return _counterLocalService.getNames(); 248 } 249 250 public long increment() 251 throws com.liferay.portal.kernel.exception.SystemException { 252 return _counterLocalService.increment(); 253 } 254 255 public long increment(java.lang.String name) 256 throws com.liferay.portal.kernel.exception.SystemException { 257 return _counterLocalService.increment(name); 258 } 259 260 public long increment(java.lang.String name, int size) 261 throws com.liferay.portal.kernel.exception.SystemException { 262 return _counterLocalService.increment(name, size); 263 } 264 265 public void rename(java.lang.String oldName, java.lang.String newName) 266 throws com.liferay.portal.kernel.exception.SystemException { 267 _counterLocalService.rename(oldName, newName); 268 } 269 270 public void reset(java.lang.String name) 271 throws com.liferay.portal.kernel.exception.SystemException { 272 _counterLocalService.reset(name); 273 } 274 275 public void reset(java.lang.String name, long size) 276 throws com.liferay.portal.kernel.exception.SystemException { 277 _counterLocalService.reset(name, size); 278 } 279 280 public CounterLocalService getWrappedCounterLocalService() { 281 return _counterLocalService; 282 } 283 284 public void setWrappedCounterLocalService( 285 CounterLocalService counterLocalService) { 286 _counterLocalService = counterLocalService; 287 } 288 289 private CounterLocalService _counterLocalService; 290 }