1   /**
2    * Copyright (c) 2000-2008 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.portlet.imagegallery.service.persistence;
24  
25  /**
26   * <a href="IGFolderPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface IGFolderPersistence {
32      public com.liferay.portlet.imagegallery.model.IGFolder create(long folderId);
33  
34      public com.liferay.portlet.imagegallery.model.IGFolder remove(long folderId)
35          throws com.liferay.portal.SystemException,
36              com.liferay.portlet.imagegallery.NoSuchFolderException;
37  
38      public com.liferay.portlet.imagegallery.model.IGFolder remove(
39          com.liferay.portlet.imagegallery.model.IGFolder igFolder)
40          throws com.liferay.portal.SystemException;
41  
42      /**
43       * @deprecated Use <code>update(IGFolder igFolder, boolean merge)</code>.
44       */
45      public com.liferay.portlet.imagegallery.model.IGFolder update(
46          com.liferay.portlet.imagegallery.model.IGFolder igFolder)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * Add, update, or merge, the entity. This method also calls the model
51       * listeners to trigger the proper events associated with adding, deleting,
52       * or updating an entity.
53       *
54       * @param        igFolder the entity to add, update, or merge
55       * @param        merge boolean value for whether to merge the entity. The
56       *                default value is false. Setting merge to true is more
57       *                expensive and should only be true when igFolder is
58       *                transient. See LEP-5473 for a detailed discussion of this
59       *                method.
60       * @return        true if the portlet can be displayed via Ajax
61       */
62      public com.liferay.portlet.imagegallery.model.IGFolder update(
63          com.liferay.portlet.imagegallery.model.IGFolder igFolder, boolean merge)
64          throws com.liferay.portal.SystemException;
65  
66      public com.liferay.portlet.imagegallery.model.IGFolder updateImpl(
67          com.liferay.portlet.imagegallery.model.IGFolder igFolder, boolean merge)
68          throws com.liferay.portal.SystemException;
69  
70      public com.liferay.portlet.imagegallery.model.IGFolder findByPrimaryKey(
71          long folderId)
72          throws com.liferay.portal.SystemException,
73              com.liferay.portlet.imagegallery.NoSuchFolderException;
74  
75      public com.liferay.portlet.imagegallery.model.IGFolder fetchByPrimaryKey(
76          long folderId) throws com.liferay.portal.SystemException;
77  
78      public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByUuid(
79          java.lang.String uuid) throws com.liferay.portal.SystemException;
80  
81      public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByUuid(
82          java.lang.String uuid, int start, int end)
83          throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByUuid(
86          java.lang.String uuid, int start, int end,
87          com.liferay.portal.kernel.util.OrderByComparator obc)
88          throws com.liferay.portal.SystemException;
89  
90      public com.liferay.portlet.imagegallery.model.IGFolder findByUuid_First(
91          java.lang.String uuid,
92          com.liferay.portal.kernel.util.OrderByComparator obc)
93          throws com.liferay.portal.SystemException,
94              com.liferay.portlet.imagegallery.NoSuchFolderException;
95  
96      public com.liferay.portlet.imagegallery.model.IGFolder findByUuid_Last(
97          java.lang.String uuid,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException,
100             com.liferay.portlet.imagegallery.NoSuchFolderException;
101 
102     public com.liferay.portlet.imagegallery.model.IGFolder[] findByUuid_PrevAndNext(
103         long folderId, java.lang.String uuid,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.imagegallery.NoSuchFolderException;
107 
108     public com.liferay.portlet.imagegallery.model.IGFolder findByUUID_G(
109         java.lang.String uuid, long groupId)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.imagegallery.NoSuchFolderException;
112 
113     public com.liferay.portlet.imagegallery.model.IGFolder fetchByUUID_G(
114         java.lang.String uuid, long groupId)
115         throws com.liferay.portal.SystemException;
116 
117     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByGroupId(
118         long groupId) throws com.liferay.portal.SystemException;
119 
120     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByGroupId(
121         long groupId, int start, int end)
122         throws com.liferay.portal.SystemException;
123 
124     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByGroupId(
125         long groupId, int start, int end,
126         com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException;
128 
129     public com.liferay.portlet.imagegallery.model.IGFolder findByGroupId_First(
130         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.imagegallery.NoSuchFolderException;
133 
134     public com.liferay.portlet.imagegallery.model.IGFolder findByGroupId_Last(
135         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException,
137             com.liferay.portlet.imagegallery.NoSuchFolderException;
138 
139     public com.liferay.portlet.imagegallery.model.IGFolder[] findByGroupId_PrevAndNext(
140         long folderId, long groupId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.imagegallery.NoSuchFolderException;
144 
145     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByCompanyId(
146         long companyId) throws com.liferay.portal.SystemException;
147 
148     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByCompanyId(
149         long companyId, int start, int end)
150         throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByCompanyId(
153         long companyId, int start, int end,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException;
156 
157     public com.liferay.portlet.imagegallery.model.IGFolder findByCompanyId_First(
158         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException,
160             com.liferay.portlet.imagegallery.NoSuchFolderException;
161 
162     public com.liferay.portlet.imagegallery.model.IGFolder findByCompanyId_Last(
163         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.imagegallery.NoSuchFolderException;
166 
167     public com.liferay.portlet.imagegallery.model.IGFolder[] findByCompanyId_PrevAndNext(
168         long folderId, long companyId,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.imagegallery.NoSuchFolderException;
172 
173     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByG_P(
174         long groupId, long parentFolderId)
175         throws com.liferay.portal.SystemException;
176 
177     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByG_P(
178         long groupId, long parentFolderId, int start, int end)
179         throws com.liferay.portal.SystemException;
180 
181     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findByG_P(
182         long groupId, long parentFolderId, int start, int end,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException;
185 
186     public com.liferay.portlet.imagegallery.model.IGFolder findByG_P_First(
187         long groupId, long parentFolderId,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.imagegallery.NoSuchFolderException;
191 
192     public com.liferay.portlet.imagegallery.model.IGFolder findByG_P_Last(
193         long groupId, long parentFolderId,
194         com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.imagegallery.NoSuchFolderException;
197 
198     public com.liferay.portlet.imagegallery.model.IGFolder[] findByG_P_PrevAndNext(
199         long folderId, long groupId, long parentFolderId,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.imagegallery.NoSuchFolderException;
203 
204     public com.liferay.portlet.imagegallery.model.IGFolder findByG_P_N(
205         long groupId, long parentFolderId, java.lang.String name)
206         throws com.liferay.portal.SystemException,
207             com.liferay.portlet.imagegallery.NoSuchFolderException;
208 
209     public com.liferay.portlet.imagegallery.model.IGFolder fetchByG_P_N(
210         long groupId, long parentFolderId, java.lang.String name)
211         throws com.liferay.portal.SystemException;
212 
213     public java.util.List<Object> findWithDynamicQuery(
214         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
215         throws com.liferay.portal.SystemException;
216 
217     public java.util.List<Object> findWithDynamicQuery(
218         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
219         int end) throws com.liferay.portal.SystemException;
220 
221     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findAll()
222         throws com.liferay.portal.SystemException;
223 
224     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findAll(
225         int start, int end) throws com.liferay.portal.SystemException;
226 
227     public java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> findAll(
228         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException;
230 
231     public void removeByUuid(java.lang.String uuid)
232         throws com.liferay.portal.SystemException;
233 
234     public void removeByUUID_G(java.lang.String uuid, long groupId)
235         throws com.liferay.portal.SystemException,
236             com.liferay.portlet.imagegallery.NoSuchFolderException;
237 
238     public void removeByGroupId(long groupId)
239         throws com.liferay.portal.SystemException;
240 
241     public void removeByCompanyId(long companyId)
242         throws com.liferay.portal.SystemException;
243 
244     public void removeByG_P(long groupId, long parentFolderId)
245         throws com.liferay.portal.SystemException;
246 
247     public void removeByG_P_N(long groupId, long parentFolderId,
248         java.lang.String name)
249         throws com.liferay.portal.SystemException,
250             com.liferay.portlet.imagegallery.NoSuchFolderException;
251 
252     public void removeAll() throws com.liferay.portal.SystemException;
253 
254     public int countByUuid(java.lang.String uuid)
255         throws com.liferay.portal.SystemException;
256 
257     public int countByUUID_G(java.lang.String uuid, long groupId)
258         throws com.liferay.portal.SystemException;
259 
260     public int countByGroupId(long groupId)
261         throws com.liferay.portal.SystemException;
262 
263     public int countByCompanyId(long companyId)
264         throws com.liferay.portal.SystemException;
265 
266     public int countByG_P(long groupId, long parentFolderId)
267         throws com.liferay.portal.SystemException;
268 
269     public int countByG_P_N(long groupId, long parentFolderId,
270         java.lang.String name) throws com.liferay.portal.SystemException;
271 
272     public int countAll() throws com.liferay.portal.SystemException;
273 
274     public void registerListener(
275         com.liferay.portal.model.ModelListener listener);
276 
277     public void unregisterListener(
278         com.liferay.portal.model.ModelListener listener);
279 }