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