001    /**
002     * Copyright (c) 2000-2012 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 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#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static WebDAVProps update(WebDAVProps webDAVProps, boolean merge)
100                    throws SystemException {
101                    return getPersistence().update(webDAVProps, merge);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
106             */
107            public static WebDAVProps update(WebDAVProps webDAVProps, boolean merge,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(webDAVProps, merge, serviceContext);
110            }
111    
112            /**
113            * Caches the web d a v props in the entity cache if it is enabled.
114            *
115            * @param webDAVProps the web d a v props
116            */
117            public static void cacheResult(
118                    com.liferay.portal.model.WebDAVProps webDAVProps) {
119                    getPersistence().cacheResult(webDAVProps);
120            }
121    
122            /**
123            * Caches the web d a v propses in the entity cache if it is enabled.
124            *
125            * @param webDAVPropses the web d a v propses
126            */
127            public static void cacheResult(
128                    java.util.List<com.liferay.portal.model.WebDAVProps> webDAVPropses) {
129                    getPersistence().cacheResult(webDAVPropses);
130            }
131    
132            /**
133            * Creates a new web d a v props with the primary key. Does not add the web d a v props to the database.
134            *
135            * @param webDavPropsId the primary key for the new web d a v props
136            * @return the new web d a v props
137            */
138            public static com.liferay.portal.model.WebDAVProps create(
139                    long webDavPropsId) {
140                    return getPersistence().create(webDavPropsId);
141            }
142    
143            /**
144            * Removes the web d a v props with the primary key from the database. Also notifies the appropriate model listeners.
145            *
146            * @param webDavPropsId the primary key of the web d a v props
147            * @return the web d a v props that was removed
148            * @throws com.liferay.portal.NoSuchWebDAVPropsException if a web d a v props with the primary key could not be found
149            * @throws SystemException if a system exception occurred
150            */
151            public static com.liferay.portal.model.WebDAVProps remove(
152                    long webDavPropsId)
153                    throws com.liferay.portal.NoSuchWebDAVPropsException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getPersistence().remove(webDavPropsId);
156            }
157    
158            public static com.liferay.portal.model.WebDAVProps updateImpl(
159                    com.liferay.portal.model.WebDAVProps webDAVProps, boolean merge)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence().updateImpl(webDAVProps, merge);
162            }
163    
164            /**
165            * 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.
166            *
167            * @param webDavPropsId the primary key of the web d a v props
168            * @return the web d a v props
169            * @throws com.liferay.portal.NoSuchWebDAVPropsException if a web d a v props with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portal.model.WebDAVProps findByPrimaryKey(
173                    long webDavPropsId)
174                    throws com.liferay.portal.NoSuchWebDAVPropsException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return getPersistence().findByPrimaryKey(webDavPropsId);
177            }
178    
179            /**
180            * Returns the web d a v props with the primary key or returns <code>null</code> if it could not be found.
181            *
182            * @param webDavPropsId the primary key of the web d a v props
183            * @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
184            * @throws SystemException if a system exception occurred
185            */
186            public static com.liferay.portal.model.WebDAVProps fetchByPrimaryKey(
187                    long webDavPropsId)
188                    throws com.liferay.portal.kernel.exception.SystemException {
189                    return getPersistence().fetchByPrimaryKey(webDavPropsId);
190            }
191    
192            /**
193            * Returns the web d a v props where classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchWebDAVPropsException} if it could not be found.
194            *
195            * @param classNameId the class name ID
196            * @param classPK the class p k
197            * @return the matching web d a v props
198            * @throws com.liferay.portal.NoSuchWebDAVPropsException if a matching web d a v props could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            public static com.liferay.portal.model.WebDAVProps findByC_C(
202                    long classNameId, long classPK)
203                    throws com.liferay.portal.NoSuchWebDAVPropsException,
204                            com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByC_C(classNameId, classPK);
206            }
207    
208            /**
209            * Returns the web d a v props where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
210            *
211            * @param classNameId the class name ID
212            * @param classPK the class p k
213            * @return the matching web d a v props, or <code>null</code> if a matching web d a v props could not be found
214            * @throws SystemException if a system exception occurred
215            */
216            public static com.liferay.portal.model.WebDAVProps fetchByC_C(
217                    long classNameId, long classPK)
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return getPersistence().fetchByC_C(classNameId, classPK);
220            }
221    
222            /**
223            * Returns the web d a v props where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
224            *
225            * @param classNameId the class name ID
226            * @param classPK the class p k
227            * @param retrieveFromCache whether to use the finder cache
228            * @return the matching web d a v props, or <code>null</code> if a matching web d a v props could not be found
229            * @throws SystemException if a system exception occurred
230            */
231            public static com.liferay.portal.model.WebDAVProps fetchByC_C(
232                    long classNameId, long classPK, boolean retrieveFromCache)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getPersistence()
235                                       .fetchByC_C(classNameId, classPK, retrieveFromCache);
236            }
237    
238            /**
239            * Returns all the web d a v propses.
240            *
241            * @return the web d a v propses
242            * @throws SystemException if a system exception occurred
243            */
244            public static java.util.List<com.liferay.portal.model.WebDAVProps> findAll()
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getPersistence().findAll();
247            }
248    
249            /**
250            * Returns a range of all the web d a v propses.
251            *
252            * <p>
253            * 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.
254            * </p>
255            *
256            * @param start the lower bound of the range of web d a v propses
257            * @param end the upper bound of the range of web d a v propses (not inclusive)
258            * @return the range of web d a v propses
259            * @throws SystemException if a system exception occurred
260            */
261            public static java.util.List<com.liferay.portal.model.WebDAVProps> findAll(
262                    int start, int end)
263                    throws com.liferay.portal.kernel.exception.SystemException {
264                    return getPersistence().findAll(start, end);
265            }
266    
267            /**
268            * Returns an ordered range of all the web d a v propses.
269            *
270            * <p>
271            * 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.
272            * </p>
273            *
274            * @param start the lower bound of the range of web d a v propses
275            * @param end the upper bound of the range of web d a v propses (not inclusive)
276            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
277            * @return the ordered range of web d a v propses
278            * @throws SystemException if a system exception occurred
279            */
280            public static java.util.List<com.liferay.portal.model.WebDAVProps> findAll(
281                    int start, int end,
282                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283                    throws com.liferay.portal.kernel.exception.SystemException {
284                    return getPersistence().findAll(start, end, orderByComparator);
285            }
286    
287            /**
288            * Removes the web d a v props where classNameId = &#63; and classPK = &#63; from the database.
289            *
290            * @param classNameId the class name ID
291            * @param classPK the class p k
292            * @throws SystemException if a system exception occurred
293            */
294            public static void removeByC_C(long classNameId, long classPK)
295                    throws com.liferay.portal.NoSuchWebDAVPropsException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    getPersistence().removeByC_C(classNameId, classPK);
298            }
299    
300            /**
301            * Removes all the web d a v propses from the database.
302            *
303            * @throws SystemException if a system exception occurred
304            */
305            public static void removeAll()
306                    throws com.liferay.portal.kernel.exception.SystemException {
307                    getPersistence().removeAll();
308            }
309    
310            /**
311            * Returns the number of web d a v propses where classNameId = &#63; and classPK = &#63;.
312            *
313            * @param classNameId the class name ID
314            * @param classPK the class p k
315            * @return the number of matching web d a v propses
316            * @throws SystemException if a system exception occurred
317            */
318            public static int countByC_C(long classNameId, long classPK)
319                    throws com.liferay.portal.kernel.exception.SystemException {
320                    return getPersistence().countByC_C(classNameId, classPK);
321            }
322    
323            /**
324            * Returns the number of web d a v propses.
325            *
326            * @return the number of web d a v propses
327            * @throws SystemException if a system exception occurred
328            */
329            public static int countAll()
330                    throws com.liferay.portal.kernel.exception.SystemException {
331                    return getPersistence().countAll();
332            }
333    
334            public static WebDAVPropsPersistence getPersistence() {
335                    if (_persistence == null) {
336                            _persistence = (WebDAVPropsPersistence)PortalBeanLocatorUtil.locate(WebDAVPropsPersistence.class.getName());
337    
338                            ReferenceRegistry.registerReference(WebDAVPropsUtil.class,
339                                    "_persistence");
340                    }
341    
342                    return _persistence;
343            }
344    
345            public void setPersistence(WebDAVPropsPersistence persistence) {
346                    _persistence = persistence;
347    
348                    ReferenceRegistry.registerReference(WebDAVPropsUtil.class,
349                            "_persistence");
350            }
351    
352            private static WebDAVPropsPersistence _persistence;
353    }