1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.imagegallery.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="IGFolderPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface IGFolderPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.imagegallery.model.IGFolder igFolder);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> igFolders);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.imagegallery.model.IGFolder create(long folderId);
40  
41      public com.liferay.portlet.imagegallery.model.IGFolder remove(long folderId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.imagegallery.NoSuchFolderException;
44  
45      public com.liferay.portlet.imagegallery.model.IGFolder remove(
46          com.liferay.portlet.imagegallery.model.IGFolder igFolder)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(IGFolder igFolder, boolean merge)</code>.
51       */
52      public com.liferay.portlet.imagegallery.model.IGFolder update(
53          com.liferay.portlet.imagegallery.model.IGFolder igFolder)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        igFolder the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when igFolder is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public com.liferay.portlet.imagegallery.model.IGFolder update(
70          com.liferay.portlet.imagegallery.model.IGFolder igFolder, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.imagegallery.model.IGFolder updateImpl(
74          com.liferay.portlet.imagegallery.model.IGFolder igFolder, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portlet.imagegallery.model.IGFolder findByPrimaryKey(
78          long folderId)
79          throws com.liferay.portal.SystemException,
80              com.liferay.portlet.imagegallery.NoSuchFolderException;
81  
82      public com.liferay.portlet.imagegallery.model.IGFolder fetchByPrimaryKey(
83          long folderId) throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByUuid(
86          java.lang.String uuid) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByUuid(
89          java.lang.String uuid, int start, int end)
90          throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByUuid(
93          java.lang.String uuid, int start, int end,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portlet.imagegallery.model.IGFolder findByUuid_First(
98          java.lang.String uuid,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.imagegallery.NoSuchFolderException;
102 
103     public com.liferay.portlet.imagegallery.model.IGFolder findByUuid_Last(
104         java.lang.String uuid,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.imagegallery.NoSuchFolderException;
108 
109     public com.liferay.portlet.imagegallery.model.IGFolder[] findByUuid_PrevAndNext(
110         long folderId, java.lang.String uuid,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.imagegallery.NoSuchFolderException;
114 
115     public com.liferay.portlet.imagegallery.model.IGFolder findByUUID_G(
116         java.lang.String uuid, long groupId)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.imagegallery.NoSuchFolderException;
119 
120     public com.liferay.portlet.imagegallery.model.IGFolder fetchByUUID_G(
121         java.lang.String uuid, long groupId)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portlet.imagegallery.model.IGFolder fetchByUUID_G(
125         java.lang.String uuid, long groupId, boolean retrieveFromCache)
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByGroupId(
129         long groupId) throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByGroupId(
132         long groupId, int start, int end)
133         throws com.liferay.portal.SystemException;
134 
135     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByGroupId(
136         long groupId, int start, int end,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException;
139 
140     public com.liferay.portlet.imagegallery.model.IGFolder findByGroupId_First(
141         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.imagegallery.NoSuchFolderException;
144 
145     public com.liferay.portlet.imagegallery.model.IGFolder findByGroupId_Last(
146         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.imagegallery.NoSuchFolderException;
149 
150     public com.liferay.portlet.imagegallery.model.IGFolder[] findByGroupId_PrevAndNext(
151         long folderId, long groupId,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.imagegallery.NoSuchFolderException;
155 
156     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByCompanyId(
157         long companyId) throws com.liferay.portal.SystemException;
158 
159     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByCompanyId(
160         long companyId, int start, int end)
161         throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByCompanyId(
164         long companyId, int start, int end,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException;
167 
168     public com.liferay.portlet.imagegallery.model.IGFolder findByCompanyId_First(
169         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.imagegallery.NoSuchFolderException;
172 
173     public com.liferay.portlet.imagegallery.model.IGFolder findByCompanyId_Last(
174         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.imagegallery.NoSuchFolderException;
177 
178     public com.liferay.portlet.imagegallery.model.IGFolder[] findByCompanyId_PrevAndNext(
179         long folderId, long companyId,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException,
182             com.liferay.portlet.imagegallery.NoSuchFolderException;
183 
184     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByG_P(
185         long groupId, long parentFolderId)
186         throws com.liferay.portal.SystemException;
187 
188     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByG_P(
189         long groupId, long parentFolderId, int start, int end)
190         throws com.liferay.portal.SystemException;
191 
192     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByG_P(
193         long groupId, long parentFolderId, int start, int end,
194         com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.SystemException;
196 
197     public com.liferay.portlet.imagegallery.model.IGFolder findByG_P_First(
198         long groupId, long parentFolderId,
199         com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.SystemException,
201             com.liferay.portlet.imagegallery.NoSuchFolderException;
202 
203     public com.liferay.portlet.imagegallery.model.IGFolder findByG_P_Last(
204         long groupId, long parentFolderId,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException,
207             com.liferay.portlet.imagegallery.NoSuchFolderException;
208 
209     public com.liferay.portlet.imagegallery.model.IGFolder[] findByG_P_PrevAndNext(
210         long folderId, long groupId, long parentFolderId,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.imagegallery.NoSuchFolderException;
214 
215     public com.liferay.portlet.imagegallery.model.IGFolder findByG_P_N(
216         long groupId, long parentFolderId, java.lang.String name)
217         throws com.liferay.portal.SystemException,
218             com.liferay.portlet.imagegallery.NoSuchFolderException;
219 
220     public com.liferay.portlet.imagegallery.model.IGFolder fetchByG_P_N(
221         long groupId, long parentFolderId, java.lang.String name)
222         throws com.liferay.portal.SystemException;
223 
224     public com.liferay.portlet.imagegallery.model.IGFolder fetchByG_P_N(
225         long groupId, long parentFolderId, java.lang.String name,
226         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
227 
228     public java.util.List<Object> findWithDynamicQuery(
229         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
230         throws com.liferay.portal.SystemException;
231 
232     public java.util.List<Object> findWithDynamicQuery(
233         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
234         int end) throws com.liferay.portal.SystemException;
235 
236     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findAll()
237         throws com.liferay.portal.SystemException;
238 
239     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findAll(
240         int start, int end) throws com.liferay.portal.SystemException;
241 
242     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findAll(
243         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
244         throws com.liferay.portal.SystemException;
245 
246     public void removeByUuid(java.lang.String uuid)
247         throws com.liferay.portal.SystemException;
248 
249     public void removeByUUID_G(java.lang.String uuid, long groupId)
250         throws com.liferay.portal.SystemException,
251             com.liferay.portlet.imagegallery.NoSuchFolderException;
252 
253     public void removeByGroupId(long groupId)
254         throws com.liferay.portal.SystemException;
255 
256     public void removeByCompanyId(long companyId)
257         throws com.liferay.portal.SystemException;
258 
259     public void removeByG_P(long groupId, long parentFolderId)
260         throws com.liferay.portal.SystemException;
261 
262     public void removeByG_P_N(long groupId, long parentFolderId,
263         java.lang.String name)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.imagegallery.NoSuchFolderException;
266 
267     public void removeAll() throws com.liferay.portal.SystemException;
268 
269     public int countByUuid(java.lang.String uuid)
270         throws com.liferay.portal.SystemException;
271 
272     public int countByUUID_G(java.lang.String uuid, long groupId)
273         throws com.liferay.portal.SystemException;
274 
275     public int countByGroupId(long groupId)
276         throws com.liferay.portal.SystemException;
277 
278     public int countByCompanyId(long companyId)
279         throws com.liferay.portal.SystemException;
280 
281     public int countByG_P(long groupId, long parentFolderId)
282         throws com.liferay.portal.SystemException;
283 
284     public int countByG_P_N(long groupId, long parentFolderId,
285         java.lang.String name) throws com.liferay.portal.SystemException;
286 
287     public int countAll() throws com.liferay.portal.SystemException;
288 }