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