1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  
26  /**
27   * <a href="LockPersistence.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       LockPersistenceImpl
36   * @see       LockUtil
37   * @generated
38   */
39  public interface LockPersistence extends BasePersistence {
40      public void cacheResult(com.liferay.portal.model.Lock lock);
41  
42      public void cacheResult(java.util.List<com.liferay.portal.model.Lock> locks);
43  
44      public void clearCache();
45  
46      public com.liferay.portal.model.Lock create(long lockId);
47  
48      public com.liferay.portal.model.Lock remove(long lockId)
49          throws com.liferay.portal.NoSuchLockException,
50              com.liferay.portal.SystemException;
51  
52      public com.liferay.portal.model.Lock remove(
53          com.liferay.portal.model.Lock lock)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * @deprecated Use {@link #update(Lock, boolean merge)}.
58       */
59      public com.liferay.portal.model.Lock update(
60          com.liferay.portal.model.Lock lock)
61          throws com.liferay.portal.SystemException;
62  
63      /**
64       * Add, update, or merge, the entity. This method also calls the model
65       * listeners to trigger the proper events associated with adding, deleting,
66       * or updating an entity.
67       *
68       * @param  lock the entity to add, update, or merge
69       * @param  merge boolean value for whether to merge the entity. The default
70       *         value is false. Setting merge to true is more expensive and
71       *         should only be true when lock is transient. See
72       *         LEP-5473 for a detailed discussion of this method.
73       * @return the entity that was added, updated, or merged
74       */
75      public com.liferay.portal.model.Lock update(
76          com.liferay.portal.model.Lock lock, boolean merge)
77          throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portal.model.Lock updateImpl(
80          com.liferay.portal.model.Lock lock, boolean merge)
81          throws com.liferay.portal.SystemException;
82  
83      public com.liferay.portal.model.Lock findByPrimaryKey(long lockId)
84          throws com.liferay.portal.NoSuchLockException,
85              com.liferay.portal.SystemException;
86  
87      public com.liferay.portal.model.Lock fetchByPrimaryKey(long lockId)
88          throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portal.model.Lock> findByUuid(
91          java.lang.String uuid) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portal.model.Lock> findByUuid(
94          java.lang.String uuid, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portal.model.Lock> findByUuid(
98          java.lang.String uuid, int start, int end,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException;
101 
102     public com.liferay.portal.model.Lock findByUuid_First(
103         java.lang.String uuid,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.NoSuchLockException,
106             com.liferay.portal.SystemException;
107 
108     public com.liferay.portal.model.Lock findByUuid_Last(
109         java.lang.String uuid,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.NoSuchLockException,
112             com.liferay.portal.SystemException;
113 
114     public com.liferay.portal.model.Lock[] findByUuid_PrevAndNext(long lockId,
115         java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.NoSuchLockException,
118             com.liferay.portal.SystemException;
119 
120     public java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
121         java.util.Date expirationDate)
122         throws com.liferay.portal.SystemException;
123 
124     public java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
125         java.util.Date expirationDate, int start, int end)
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portal.model.Lock> findByExpirationDate(
129         java.util.Date expirationDate, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException;
132 
133     public com.liferay.portal.model.Lock findByExpirationDate_First(
134         java.util.Date expirationDate,
135         com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.NoSuchLockException,
137             com.liferay.portal.SystemException;
138 
139     public com.liferay.portal.model.Lock findByExpirationDate_Last(
140         java.util.Date expirationDate,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchLockException,
143             com.liferay.portal.SystemException;
144 
145     public com.liferay.portal.model.Lock[] findByExpirationDate_PrevAndNext(
146         long lockId, java.util.Date expirationDate,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.NoSuchLockException,
149             com.liferay.portal.SystemException;
150 
151     public com.liferay.portal.model.Lock findByC_K(java.lang.String className,
152         java.lang.String key)
153         throws com.liferay.portal.NoSuchLockException,
154             com.liferay.portal.SystemException;
155 
156     public com.liferay.portal.model.Lock fetchByC_K(
157         java.lang.String className, java.lang.String key)
158         throws com.liferay.portal.SystemException;
159 
160     public com.liferay.portal.model.Lock fetchByC_K(
161         java.lang.String className, java.lang.String key,
162         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
163 
164     public java.util.List<Object> findWithDynamicQuery(
165         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
166         throws com.liferay.portal.SystemException;
167 
168     public java.util.List<Object> findWithDynamicQuery(
169         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
170         int end) throws com.liferay.portal.SystemException;
171 
172     public java.util.List<com.liferay.portal.model.Lock> findAll()
173         throws com.liferay.portal.SystemException;
174 
175     public java.util.List<com.liferay.portal.model.Lock> findAll(int start,
176         int end) throws com.liferay.portal.SystemException;
177 
178     public java.util.List<com.liferay.portal.model.Lock> findAll(int start,
179         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException;
181 
182     public void removeByUuid(java.lang.String uuid)
183         throws com.liferay.portal.SystemException;
184 
185     public void removeByExpirationDate(java.util.Date expirationDate)
186         throws com.liferay.portal.SystemException;
187 
188     public void removeByC_K(java.lang.String className, java.lang.String key)
189         throws com.liferay.portal.NoSuchLockException,
190             com.liferay.portal.SystemException;
191 
192     public void removeAll() throws com.liferay.portal.SystemException;
193 
194     public int countByUuid(java.lang.String uuid)
195         throws com.liferay.portal.SystemException;
196 
197     public int countByExpirationDate(java.util.Date expirationDate)
198         throws com.liferay.portal.SystemException;
199 
200     public int countByC_K(java.lang.String className, java.lang.String key)
201         throws com.liferay.portal.SystemException;
202 
203     public int countAll() throws com.liferay.portal.SystemException;
204 }