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