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.SocialEquityAssetEntry; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the social equity asset entry service. This utility wraps {@link SocialEquityAssetEntryPersistenceImpl} 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 SocialEquityAssetEntryPersistence 037 * @see SocialEquityAssetEntryPersistenceImpl 038 * @generated 039 */ 040 public class SocialEquityAssetEntryUtil { 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(SocialEquityAssetEntry socialEquityAssetEntry) { 058 getPersistence().clearCache(socialEquityAssetEntry); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<SocialEquityAssetEntry> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<SocialEquityAssetEntry> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<SocialEquityAssetEntry> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 099 */ 100 public static SocialEquityAssetEntry remove( 101 SocialEquityAssetEntry socialEquityAssetEntry) 102 throws SystemException { 103 return getPersistence().remove(socialEquityAssetEntry); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 108 */ 109 public static SocialEquityAssetEntry update( 110 SocialEquityAssetEntry socialEquityAssetEntry, boolean merge) 111 throws SystemException { 112 return getPersistence().update(socialEquityAssetEntry, merge); 113 } 114 115 /** 116 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 117 */ 118 public static SocialEquityAssetEntry update( 119 SocialEquityAssetEntry socialEquityAssetEntry, boolean merge, 120 ServiceContext serviceContext) throws SystemException { 121 return getPersistence() 122 .update(socialEquityAssetEntry, merge, serviceContext); 123 } 124 125 /** 126 * Caches the social equity asset entry in the entity cache if it is enabled. 127 * 128 * @param socialEquityAssetEntry the social equity asset entry 129 */ 130 public static void cacheResult( 131 com.liferay.portlet.social.model.SocialEquityAssetEntry socialEquityAssetEntry) { 132 getPersistence().cacheResult(socialEquityAssetEntry); 133 } 134 135 /** 136 * Caches the social equity asset entries in the entity cache if it is enabled. 137 * 138 * @param socialEquityAssetEntries the social equity asset entries 139 */ 140 public static void cacheResult( 141 java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> socialEquityAssetEntries) { 142 getPersistence().cacheResult(socialEquityAssetEntries); 143 } 144 145 /** 146 * Creates a new social equity asset entry with the primary key. Does not add the social equity asset entry to the database. 147 * 148 * @param equityAssetEntryId the primary key for the new social equity asset entry 149 * @return the new social equity asset entry 150 */ 151 public static com.liferay.portlet.social.model.SocialEquityAssetEntry create( 152 long equityAssetEntryId) { 153 return getPersistence().create(equityAssetEntryId); 154 } 155 156 /** 157 * Removes the social equity asset entry with the primary key from the database. Also notifies the appropriate model listeners. 158 * 159 * @param equityAssetEntryId the primary key of the social equity asset entry 160 * @return the social equity asset entry that was removed 161 * @throws com.liferay.portlet.social.NoSuchEquityAssetEntryException if a social equity asset entry with the primary key could not be found 162 * @throws SystemException if a system exception occurred 163 */ 164 public static com.liferay.portlet.social.model.SocialEquityAssetEntry remove( 165 long equityAssetEntryId) 166 throws com.liferay.portal.kernel.exception.SystemException, 167 com.liferay.portlet.social.NoSuchEquityAssetEntryException { 168 return getPersistence().remove(equityAssetEntryId); 169 } 170 171 public static com.liferay.portlet.social.model.SocialEquityAssetEntry updateImpl( 172 com.liferay.portlet.social.model.SocialEquityAssetEntry socialEquityAssetEntry, 173 boolean merge) 174 throws com.liferay.portal.kernel.exception.SystemException { 175 return getPersistence().updateImpl(socialEquityAssetEntry, merge); 176 } 177 178 /** 179 * Returns the social equity asset entry with the primary key or throws a {@link com.liferay.portlet.social.NoSuchEquityAssetEntryException} if it could not be found. 180 * 181 * @param equityAssetEntryId the primary key of the social equity asset entry 182 * @return the social equity asset entry 183 * @throws com.liferay.portlet.social.NoSuchEquityAssetEntryException if a social equity asset entry with the primary key could not be found 184 * @throws SystemException if a system exception occurred 185 */ 186 public static com.liferay.portlet.social.model.SocialEquityAssetEntry findByPrimaryKey( 187 long equityAssetEntryId) 188 throws com.liferay.portal.kernel.exception.SystemException, 189 com.liferay.portlet.social.NoSuchEquityAssetEntryException { 190 return getPersistence().findByPrimaryKey(equityAssetEntryId); 191 } 192 193 /** 194 * Returns the social equity asset entry with the primary key or returns <code>null</code> if it could not be found. 195 * 196 * @param equityAssetEntryId the primary key of the social equity asset entry 197 * @return the social equity asset entry, or <code>null</code> if a social equity asset entry with the primary key could not be found 198 * @throws SystemException if a system exception occurred 199 */ 200 public static com.liferay.portlet.social.model.SocialEquityAssetEntry fetchByPrimaryKey( 201 long equityAssetEntryId) 202 throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().fetchByPrimaryKey(equityAssetEntryId); 204 } 205 206 /** 207 * Returns the social equity asset entry where assetEntryId = ? or throws a {@link com.liferay.portlet.social.NoSuchEquityAssetEntryException} if it could not be found. 208 * 209 * @param assetEntryId the asset entry ID 210 * @return the matching social equity asset entry 211 * @throws com.liferay.portlet.social.NoSuchEquityAssetEntryException if a matching social equity asset entry could not be found 212 * @throws SystemException if a system exception occurred 213 */ 214 public static com.liferay.portlet.social.model.SocialEquityAssetEntry findByAssetEntryId( 215 long assetEntryId) 216 throws com.liferay.portal.kernel.exception.SystemException, 217 com.liferay.portlet.social.NoSuchEquityAssetEntryException { 218 return getPersistence().findByAssetEntryId(assetEntryId); 219 } 220 221 /** 222 * Returns the social equity asset entry where assetEntryId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 223 * 224 * @param assetEntryId the asset entry ID 225 * @return the matching social equity asset entry, or <code>null</code> if a matching social equity asset entry could not be found 226 * @throws SystemException if a system exception occurred 227 */ 228 public static com.liferay.portlet.social.model.SocialEquityAssetEntry fetchByAssetEntryId( 229 long assetEntryId) 230 throws com.liferay.portal.kernel.exception.SystemException { 231 return getPersistence().fetchByAssetEntryId(assetEntryId); 232 } 233 234 /** 235 * Returns the social equity asset entry where assetEntryId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 236 * 237 * @param assetEntryId the asset entry ID 238 * @param retrieveFromCache whether to use the finder cache 239 * @return the matching social equity asset entry, or <code>null</code> if a matching social equity asset entry could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public static com.liferay.portlet.social.model.SocialEquityAssetEntry fetchByAssetEntryId( 243 long assetEntryId, boolean retrieveFromCache) 244 throws com.liferay.portal.kernel.exception.SystemException { 245 return getPersistence() 246 .fetchByAssetEntryId(assetEntryId, retrieveFromCache); 247 } 248 249 /** 250 * Returns all the social equity asset entries. 251 * 252 * @return the social equity asset entries 253 * @throws SystemException if a system exception occurred 254 */ 255 public static java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> findAll() 256 throws com.liferay.portal.kernel.exception.SystemException { 257 return getPersistence().findAll(); 258 } 259 260 /** 261 * Returns a range of all the social equity asset entries. 262 * 263 * <p> 264 * 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. 265 * </p> 266 * 267 * @param start the lower bound of the range of social equity asset entries 268 * @param end the upper bound of the range of social equity asset entries (not inclusive) 269 * @return the range of social equity asset entries 270 * @throws SystemException if a system exception occurred 271 */ 272 public static java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> findAll( 273 int start, int end) 274 throws com.liferay.portal.kernel.exception.SystemException { 275 return getPersistence().findAll(start, end); 276 } 277 278 /** 279 * Returns an ordered range of all the social equity asset entries. 280 * 281 * <p> 282 * 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. 283 * </p> 284 * 285 * @param start the lower bound of the range of social equity asset entries 286 * @param end the upper bound of the range of social equity asset entries (not inclusive) 287 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 288 * @return the ordered range of social equity asset entries 289 * @throws SystemException if a system exception occurred 290 */ 291 public static java.util.List<com.liferay.portlet.social.model.SocialEquityAssetEntry> findAll( 292 int start, int end, 293 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 294 throws com.liferay.portal.kernel.exception.SystemException { 295 return getPersistence().findAll(start, end, orderByComparator); 296 } 297 298 /** 299 * Removes the social equity asset entry where assetEntryId = ? from the database. 300 * 301 * @param assetEntryId the asset entry ID 302 * @throws SystemException if a system exception occurred 303 */ 304 public static void removeByAssetEntryId(long assetEntryId) 305 throws com.liferay.portal.kernel.exception.SystemException, 306 com.liferay.portlet.social.NoSuchEquityAssetEntryException { 307 getPersistence().removeByAssetEntryId(assetEntryId); 308 } 309 310 /** 311 * Removes all the social equity asset entries from the database. 312 * 313 * @throws SystemException if a system exception occurred 314 */ 315 public static void removeAll() 316 throws com.liferay.portal.kernel.exception.SystemException { 317 getPersistence().removeAll(); 318 } 319 320 /** 321 * Returns the number of social equity asset entries where assetEntryId = ?. 322 * 323 * @param assetEntryId the asset entry ID 324 * @return the number of matching social equity asset entries 325 * @throws SystemException if a system exception occurred 326 */ 327 public static int countByAssetEntryId(long assetEntryId) 328 throws com.liferay.portal.kernel.exception.SystemException { 329 return getPersistence().countByAssetEntryId(assetEntryId); 330 } 331 332 /** 333 * Returns the number of social equity asset entries. 334 * 335 * @return the number of social equity asset entries 336 * @throws SystemException if a system exception occurred 337 */ 338 public static int countAll() 339 throws com.liferay.portal.kernel.exception.SystemException { 340 return getPersistence().countAll(); 341 } 342 343 public static SocialEquityAssetEntryPersistence getPersistence() { 344 if (_persistence == null) { 345 _persistence = (SocialEquityAssetEntryPersistence)PortalBeanLocatorUtil.locate(SocialEquityAssetEntryPersistence.class.getName()); 346 347 ReferenceRegistry.registerReference(SocialEquityAssetEntryUtil.class, 348 "_persistence"); 349 } 350 351 return _persistence; 352 } 353 354 public void setPersistence(SocialEquityAssetEntryPersistence persistence) { 355 _persistence = persistence; 356 357 ReferenceRegistry.registerReference(SocialEquityAssetEntryUtil.class, 358 "_persistence"); 359 } 360 361 private static SocialEquityAssetEntryPersistence _persistence; 362 }