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.portlet.social.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.social.model.SocialEquityGroupSetting; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the social equity group setting service. This utility wraps {@link SocialEquityGroupSettingPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see SocialEquityGroupSettingPersistence 037 * @see SocialEquityGroupSettingPersistenceImpl 038 * @generated 039 */ 040 public class SocialEquityGroupSettingUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache( 058 SocialEquityGroupSetting socialEquityGroupSetting) { 059 getPersistence().clearCache(socialEquityGroupSetting); 060 } 061 062 /** 063 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 064 */ 065 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 066 throws SystemException { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<SocialEquityGroupSetting> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) throws SystemException { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<SocialEquityGroupSetting> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) 083 throws SystemException { 084 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 085 } 086 087 /** 088 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 089 */ 090 public static List<SocialEquityGroupSetting> findWithDynamicQuery( 091 DynamicQuery dynamicQuery, int start, int end, 092 OrderByComparator orderByComparator) throws SystemException { 093 return getPersistence() 094 .findWithDynamicQuery(dynamicQuery, start, end, 095 orderByComparator); 096 } 097 098 /** 099 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 100 */ 101 public static SocialEquityGroupSetting remove( 102 SocialEquityGroupSetting socialEquityGroupSetting) 103 throws SystemException { 104 return getPersistence().remove(socialEquityGroupSetting); 105 } 106 107 /** 108 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 109 */ 110 public static SocialEquityGroupSetting update( 111 SocialEquityGroupSetting socialEquityGroupSetting, boolean merge) 112 throws SystemException { 113 return getPersistence().update(socialEquityGroupSetting, merge); 114 } 115 116 /** 117 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 118 */ 119 public static SocialEquityGroupSetting update( 120 SocialEquityGroupSetting socialEquityGroupSetting, boolean merge, 121 ServiceContext serviceContext) throws SystemException { 122 return getPersistence() 123 .update(socialEquityGroupSetting, merge, serviceContext); 124 } 125 126 /** 127 * Caches the social equity group setting in the entity cache if it is enabled. 128 * 129 * @param socialEquityGroupSetting the social equity group setting 130 */ 131 public static void cacheResult( 132 com.liferay.portlet.social.model.SocialEquityGroupSetting socialEquityGroupSetting) { 133 getPersistence().cacheResult(socialEquityGroupSetting); 134 } 135 136 /** 137 * Caches the social equity group settings in the entity cache if it is enabled. 138 * 139 * @param socialEquityGroupSettings the social equity group settings 140 */ 141 public static void cacheResult( 142 java.util.List<com.liferay.portlet.social.model.SocialEquityGroupSetting> socialEquityGroupSettings) { 143 getPersistence().cacheResult(socialEquityGroupSettings); 144 } 145 146 /** 147 * Creates a new social equity group setting with the primary key. Does not add the social equity group setting to the database. 148 * 149 * @param equityGroupSettingId the primary key for the new social equity group setting 150 * @return the new social equity group setting 151 */ 152 public static com.liferay.portlet.social.model.SocialEquityGroupSetting create( 153 long equityGroupSettingId) { 154 return getPersistence().create(equityGroupSettingId); 155 } 156 157 /** 158 * Removes the social equity group setting with the primary key from the database. Also notifies the appropriate model listeners. 159 * 160 * @param equityGroupSettingId the primary key of the social equity group setting 161 * @return the social equity group setting that was removed 162 * @throws com.liferay.portlet.social.NoSuchEquityGroupSettingException if a social equity group setting with the primary key could not be found 163 * @throws SystemException if a system exception occurred 164 */ 165 public static com.liferay.portlet.social.model.SocialEquityGroupSetting remove( 166 long equityGroupSettingId) 167 throws com.liferay.portal.kernel.exception.SystemException, 168 com.liferay.portlet.social.NoSuchEquityGroupSettingException { 169 return getPersistence().remove(equityGroupSettingId); 170 } 171 172 public static com.liferay.portlet.social.model.SocialEquityGroupSetting updateImpl( 173 com.liferay.portlet.social.model.SocialEquityGroupSetting socialEquityGroupSetting, 174 boolean merge) 175 throws com.liferay.portal.kernel.exception.SystemException { 176 return getPersistence().updateImpl(socialEquityGroupSetting, merge); 177 } 178 179 /** 180 * Returns the social equity group setting with the primary key or throws a {@link com.liferay.portlet.social.NoSuchEquityGroupSettingException} if it could not be found. 181 * 182 * @param equityGroupSettingId the primary key of the social equity group setting 183 * @return the social equity group setting 184 * @throws com.liferay.portlet.social.NoSuchEquityGroupSettingException if a social equity group setting with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portlet.social.model.SocialEquityGroupSetting findByPrimaryKey( 188 long equityGroupSettingId) 189 throws com.liferay.portal.kernel.exception.SystemException, 190 com.liferay.portlet.social.NoSuchEquityGroupSettingException { 191 return getPersistence().findByPrimaryKey(equityGroupSettingId); 192 } 193 194 /** 195 * Returns the social equity group setting with the primary key or returns <code>null</code> if it could not be found. 196 * 197 * @param equityGroupSettingId the primary key of the social equity group setting 198 * @return the social equity group setting, or <code>null</code> if a social equity group setting with the primary key could not be found 199 * @throws SystemException if a system exception occurred 200 */ 201 public static com.liferay.portlet.social.model.SocialEquityGroupSetting fetchByPrimaryKey( 202 long equityGroupSettingId) 203 throws com.liferay.portal.kernel.exception.SystemException { 204 return getPersistence().fetchByPrimaryKey(equityGroupSettingId); 205 } 206 207 /** 208 * Returns the social equity group setting where groupId = ? and classNameId = ? and type = ? or throws a {@link com.liferay.portlet.social.NoSuchEquityGroupSettingException} if it could not be found. 209 * 210 * @param groupId the group ID 211 * @param classNameId the class name ID 212 * @param type the type 213 * @return the matching social equity group setting 214 * @throws com.liferay.portlet.social.NoSuchEquityGroupSettingException if a matching social equity group setting could not be found 215 * @throws SystemException if a system exception occurred 216 */ 217 public static com.liferay.portlet.social.model.SocialEquityGroupSetting findByG_C_T( 218 long groupId, long classNameId, int type) 219 throws com.liferay.portal.kernel.exception.SystemException, 220 com.liferay.portlet.social.NoSuchEquityGroupSettingException { 221 return getPersistence().findByG_C_T(groupId, classNameId, type); 222 } 223 224 /** 225 * Returns the social equity group setting where groupId = ? and classNameId = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 226 * 227 * @param groupId the group ID 228 * @param classNameId the class name ID 229 * @param type the type 230 * @return the matching social equity group setting, or <code>null</code> if a matching social equity group setting could not be found 231 * @throws SystemException if a system exception occurred 232 */ 233 public static com.liferay.portlet.social.model.SocialEquityGroupSetting fetchByG_C_T( 234 long groupId, long classNameId, int type) 235 throws com.liferay.portal.kernel.exception.SystemException { 236 return getPersistence().fetchByG_C_T(groupId, classNameId, type); 237 } 238 239 /** 240 * Returns the social equity group setting where groupId = ? and classNameId = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 241 * 242 * @param groupId the group ID 243 * @param classNameId the class name ID 244 * @param type the type 245 * @param retrieveFromCache whether to use the finder cache 246 * @return the matching social equity group setting, or <code>null</code> if a matching social equity group setting could not be found 247 * @throws SystemException if a system exception occurred 248 */ 249 public static com.liferay.portlet.social.model.SocialEquityGroupSetting fetchByG_C_T( 250 long groupId, long classNameId, int type, boolean retrieveFromCache) 251 throws com.liferay.portal.kernel.exception.SystemException { 252 return getPersistence() 253 .fetchByG_C_T(groupId, classNameId, type, retrieveFromCache); 254 } 255 256 /** 257 * Returns all the social equity group settings. 258 * 259 * @return the social equity group settings 260 * @throws SystemException if a system exception occurred 261 */ 262 public static java.util.List<com.liferay.portlet.social.model.SocialEquityGroupSetting> findAll() 263 throws com.liferay.portal.kernel.exception.SystemException { 264 return getPersistence().findAll(); 265 } 266 267 /** 268 * Returns a range of all the social equity group settings. 269 * 270 * <p> 271 * 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. 272 * </p> 273 * 274 * @param start the lower bound of the range of social equity group settings 275 * @param end the upper bound of the range of social equity group settings (not inclusive) 276 * @return the range of social equity group settings 277 * @throws SystemException if a system exception occurred 278 */ 279 public static java.util.List<com.liferay.portlet.social.model.SocialEquityGroupSetting> findAll( 280 int start, int end) 281 throws com.liferay.portal.kernel.exception.SystemException { 282 return getPersistence().findAll(start, end); 283 } 284 285 /** 286 * Returns an ordered range of all the social equity group settings. 287 * 288 * <p> 289 * 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. 290 * </p> 291 * 292 * @param start the lower bound of the range of social equity group settings 293 * @param end the upper bound of the range of social equity group settings (not inclusive) 294 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 295 * @return the ordered range of social equity group settings 296 * @throws SystemException if a system exception occurred 297 */ 298 public static java.util.List<com.liferay.portlet.social.model.SocialEquityGroupSetting> findAll( 299 int start, int end, 300 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 301 throws com.liferay.portal.kernel.exception.SystemException { 302 return getPersistence().findAll(start, end, orderByComparator); 303 } 304 305 /** 306 * Removes the social equity group setting where groupId = ? and classNameId = ? and type = ? from the database. 307 * 308 * @param groupId the group ID 309 * @param classNameId the class name ID 310 * @param type the type 311 * @throws SystemException if a system exception occurred 312 */ 313 public static void removeByG_C_T(long groupId, long classNameId, int type) 314 throws com.liferay.portal.kernel.exception.SystemException, 315 com.liferay.portlet.social.NoSuchEquityGroupSettingException { 316 getPersistence().removeByG_C_T(groupId, classNameId, type); 317 } 318 319 /** 320 * Removes all the social equity group settings from the database. 321 * 322 * @throws SystemException if a system exception occurred 323 */ 324 public static void removeAll() 325 throws com.liferay.portal.kernel.exception.SystemException { 326 getPersistence().removeAll(); 327 } 328 329 /** 330 * Returns the number of social equity group settings where groupId = ? and classNameId = ? and type = ?. 331 * 332 * @param groupId the group ID 333 * @param classNameId the class name ID 334 * @param type the type 335 * @return the number of matching social equity group settings 336 * @throws SystemException if a system exception occurred 337 */ 338 public static int countByG_C_T(long groupId, long classNameId, int type) 339 throws com.liferay.portal.kernel.exception.SystemException { 340 return getPersistence().countByG_C_T(groupId, classNameId, type); 341 } 342 343 /** 344 * Returns the number of social equity group settings. 345 * 346 * @return the number of social equity group settings 347 * @throws SystemException if a system exception occurred 348 */ 349 public static int countAll() 350 throws com.liferay.portal.kernel.exception.SystemException { 351 return getPersistence().countAll(); 352 } 353 354 public static SocialEquityGroupSettingPersistence getPersistence() { 355 if (_persistence == null) { 356 _persistence = (SocialEquityGroupSettingPersistence)PortalBeanLocatorUtil.locate(SocialEquityGroupSettingPersistence.class.getName()); 357 358 ReferenceRegistry.registerReference(SocialEquityGroupSettingUtil.class, 359 "_persistence"); 360 } 361 362 return _persistence; 363 } 364 365 public void setPersistence(SocialEquityGroupSettingPersistence persistence) { 366 _persistence = persistence; 367 368 ReferenceRegistry.registerReference(SocialEquityGroupSettingUtil.class, 369 "_persistence"); 370 } 371 372 private static SocialEquityGroupSettingPersistence _persistence; 373 }