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.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.model.Lock;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       LockPersistence
029     * @see       LockPersistenceImpl
030     * @generated
031     */
032    public class LockUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(Lock lock) {
044                    getPersistence().clearCache(lock);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery)
059                    throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery,
067                    int start, int end) throws SystemException {
068                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
073             */
074            public static List<Lock> findWithDynamicQuery(DynamicQuery dynamicQuery,
075                    int start, int end, OrderByComparator orderByComparator)
076                    throws SystemException {
077                    return getPersistence()
078                                       .findWithDynamicQuery(dynamicQuery, start, end,
079                            orderByComparator);
080            }
081    
082            /**
083             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
084             */
085            public static Lock remove(Lock lock) throws SystemException {
086                    return getPersistence().remove(lock);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
091             */
092            public static Lock update(Lock lock, boolean merge)
093                    throws SystemException {
094                    return getPersistence().update(lock, merge);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
099             */
100            public static Lock update(Lock lock, boolean merge,
101                    ServiceContext serviceContext) throws SystemException {
102                    return getPersistence().update(lock, merge, serviceContext);
103            }
104    
105            public static void cacheResult(com.liferay.portal.model.Lock lock) {
106                    getPersistence().cacheResult(lock);
107            }
108    
109            public static void cacheResult(
110                    java.util.List<com.liferay.portal.model.Lock> locks) {
111                    getPersistence().cacheResult(locks);
112            }
113    
114            public static com.liferay.portal.model.Lock create(long lockId) {
115                    return getPersistence().create(lockId);
116            }
117    
118            public static com.liferay.portal.model.Lock remove(long lockId)
119                    throws com.liferay.portal.NoSuchLockException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getPersistence().remove(lockId);
122            }
123    
124            public static com.liferay.portal.model.Lock updateImpl(
125                    com.liferay.portal.model.Lock lock, boolean merge)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getPersistence().updateImpl(lock, merge);
128            }
129    
130            public static com.liferay.portal.model.Lock findByPrimaryKey(long lockId)
131                    throws com.liferay.portal.NoSuchLockException,
132                            com.liferay.portal.kernel.exception.SystemException {
133                    return getPersistence().findByPrimaryKey(lockId);
134            }
135    
136            public static com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getPersistence().fetchByPrimaryKey(lockId);
139            }
140    
141            public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
142                    java.lang.String uuid)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getPersistence().findByUuid(uuid);
145            }
146    
147            public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
148                    java.lang.String uuid, int start, int end)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return getPersistence().findByUuid(uuid, start, end);
151            }
152    
153            public static java.util.List<com.liferay.portal.model.Lock> findByUuid(
154                    java.lang.String uuid, int start, int end,
155                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
158            }
159    
160            public static com.liferay.portal.model.Lock findByUuid_First(
161                    java.lang.String uuid,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.NoSuchLockException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    return getPersistence().findByUuid_First(uuid, orderByComparator);
166            }
167    
168            public static com.liferay.portal.model.Lock findByUuid_Last(
169                    java.lang.String uuid,
170                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171                    throws com.liferay.portal.NoSuchLockException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
174            }
175    
176            public static com.liferay.portal.model.Lock[] findByUuid_PrevAndNext(
177                    long lockId, java.lang.String uuid,
178                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179                    throws com.liferay.portal.NoSuchLockException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getPersistence()
182                                       .findByUuid_PrevAndNext(lockId, uuid, orderByComparator);
183            }
184    
185            public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate(
186                    java.util.Date expirationDate)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return getPersistence().findByLtExpirationDate(expirationDate);
189            }
190    
191            public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate(
192                    java.util.Date expirationDate, int start, int end)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence()
195                                       .findByLtExpirationDate(expirationDate, start, end);
196            }
197    
198            public static java.util.List<com.liferay.portal.model.Lock> findByLtExpirationDate(
199                    java.util.Date expirationDate, int start, int end,
200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence()
203                                       .findByLtExpirationDate(expirationDate, start, end,
204                            orderByComparator);
205            }
206    
207            public static com.liferay.portal.model.Lock findByLtExpirationDate_First(
208                    java.util.Date expirationDate,
209                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210                    throws com.liferay.portal.NoSuchLockException,
211                            com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence()
213                                       .findByLtExpirationDate_First(expirationDate,
214                            orderByComparator);
215            }
216    
217            public static com.liferay.portal.model.Lock findByLtExpirationDate_Last(
218                    java.util.Date expirationDate,
219                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220                    throws com.liferay.portal.NoSuchLockException,
221                            com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence()
223                                       .findByLtExpirationDate_Last(expirationDate,
224                            orderByComparator);
225            }
226    
227            public static com.liferay.portal.model.Lock[] findByLtExpirationDate_PrevAndNext(
228                    long lockId, java.util.Date expirationDate,
229                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230                    throws com.liferay.portal.NoSuchLockException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    return getPersistence()
233                                       .findByLtExpirationDate_PrevAndNext(lockId, expirationDate,
234                            orderByComparator);
235            }
236    
237            public static com.liferay.portal.model.Lock findByC_K(
238                    java.lang.String className, java.lang.String key)
239                    throws com.liferay.portal.NoSuchLockException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    return getPersistence().findByC_K(className, key);
242            }
243    
244            public static com.liferay.portal.model.Lock fetchByC_K(
245                    java.lang.String className, java.lang.String key)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence().fetchByC_K(className, key);
248            }
249    
250            public static com.liferay.portal.model.Lock fetchByC_K(
251                    java.lang.String className, java.lang.String key,
252                    boolean retrieveFromCache)
253                    throws com.liferay.portal.kernel.exception.SystemException {
254                    return getPersistence().fetchByC_K(className, key, retrieveFromCache);
255            }
256    
257            public static java.util.List<com.liferay.portal.model.Lock> findAll()
258                    throws com.liferay.portal.kernel.exception.SystemException {
259                    return getPersistence().findAll();
260            }
261    
262            public static java.util.List<com.liferay.portal.model.Lock> findAll(
263                    int start, int end)
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence().findAll(start, end);
266            }
267    
268            public static java.util.List<com.liferay.portal.model.Lock> findAll(
269                    int start, int end,
270                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    return getPersistence().findAll(start, end, orderByComparator);
273            }
274    
275            public static void removeByUuid(java.lang.String uuid)
276                    throws com.liferay.portal.kernel.exception.SystemException {
277                    getPersistence().removeByUuid(uuid);
278            }
279    
280            public static void removeByLtExpirationDate(java.util.Date expirationDate)
281                    throws com.liferay.portal.kernel.exception.SystemException {
282                    getPersistence().removeByLtExpirationDate(expirationDate);
283            }
284    
285            public static void removeByC_K(java.lang.String className,
286                    java.lang.String key)
287                    throws com.liferay.portal.NoSuchLockException,
288                            com.liferay.portal.kernel.exception.SystemException {
289                    getPersistence().removeByC_K(className, key);
290            }
291    
292            public static void removeAll()
293                    throws com.liferay.portal.kernel.exception.SystemException {
294                    getPersistence().removeAll();
295            }
296    
297            public static int countByUuid(java.lang.String uuid)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence().countByUuid(uuid);
300            }
301    
302            public static int countByLtExpirationDate(java.util.Date expirationDate)
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    return getPersistence().countByLtExpirationDate(expirationDate);
305            }
306    
307            public static int countByC_K(java.lang.String className,
308                    java.lang.String key)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence().countByC_K(className, key);
311            }
312    
313            public static int countAll()
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    return getPersistence().countAll();
316            }
317    
318            public static LockPersistence getPersistence() {
319                    if (_persistence == null) {
320                            _persistence = (LockPersistence)PortalBeanLocatorUtil.locate(LockPersistence.class.getName());
321                    }
322    
323                    return _persistence;
324            }
325    
326            public void setPersistence(LockPersistence persistence) {
327                    _persistence = persistence;
328            }
329    
330            private static LockPersistence _persistence;
331    }