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