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