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.softwarecatalog.service.persistence;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="SCProductEntryPersistence.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   *
35   */
36  @Transactional(rollbackFor =  {
37      PortalException.class, SystemException.class})
38  public interface SCProductEntryPersistence {
39      public com.liferay.portlet.softwarecatalog.model.SCProductEntry create(
40          long productEntryId);
41  
42      public com.liferay.portlet.softwarecatalog.model.SCProductEntry remove(
43          long productEntryId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
46  
47      public com.liferay.portlet.softwarecatalog.model.SCProductEntry remove(
48          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(SCProductEntry scProductEntry, boolean merge)</code>.
53       */
54      public com.liferay.portlet.softwarecatalog.model.SCProductEntry update(
55          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * Add, update, or merge, the entity. This method also calls the model
60       * listeners to trigger the proper events associated with adding, deleting,
61       * or updating an entity.
62       *
63       * @param        scProductEntry the entity to add, update, or merge
64       * @param        merge boolean value for whether to merge the entity. The
65       *                default value is false. Setting merge to true is more
66       *                expensive and should only be true when scProductEntry is
67       *                transient. See LEP-5473 for a detailed discussion of this
68       *                method.
69       * @return        true if the portlet can be displayed via Ajax
70       */
71      public com.liferay.portlet.softwarecatalog.model.SCProductEntry update(
72          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.softwarecatalog.model.SCProductEntry updateImpl(
76          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByPrimaryKey(
81          long productEntryId)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
84  
85      public com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchByPrimaryKey(
86          long productEntryId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByGroupId(
90          long groupId) throws com.liferay.portal.SystemException;
91  
92      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
93      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByGroupId(
94          long groupId, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
98      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByGroupId(
99          long groupId, int start, int end,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException;
102 
103     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104     public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByGroupId_First(
105         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
108 
109     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110     public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByGroupId_Last(
111         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public com.liferay.portlet.softwarecatalog.model.SCProductEntry[] findByGroupId_PrevAndNext(
117         long productEntryId, long groupId,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByCompanyId(
124         long companyId) throws com.liferay.portal.SystemException;
125 
126     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByCompanyId(
128         long companyId, int start, int end)
129         throws com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByCompanyId(
133         long companyId, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByCompanyId_First(
139         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByCompanyId_Last(
145         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public com.liferay.portlet.softwarecatalog.model.SCProductEntry[] findByCompanyId_PrevAndNext(
151         long productEntryId, long companyId,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
155 
156     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByG_U(
158         long groupId, long userId) throws com.liferay.portal.SystemException;
159 
160     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByG_U(
162         long groupId, long userId, int start, int end)
163         throws com.liferay.portal.SystemException;
164 
165     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByG_U(
167         long groupId, long userId, int start, int end,
168         com.liferay.portal.kernel.util.OrderByComparator obc)
169         throws com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByG_U_First(
173         long groupId, long userId,
174         com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByG_U_Last(
180         long groupId, long userId,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public com.liferay.portlet.softwarecatalog.model.SCProductEntry[] findByG_U_PrevAndNext(
187         long productEntryId, long groupId, long userId,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public com.liferay.portlet.softwarecatalog.model.SCProductEntry findByRG_RA(
194         java.lang.String repoGroupId, java.lang.String repoArtifactId)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
197 
198     public com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchByRG_RA(
199         java.lang.String repoGroupId, java.lang.String repoArtifactId)
200         throws com.liferay.portal.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public java.util.List<Object> findWithDynamicQuery(
204         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
205         throws com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public java.util.List<Object> findWithDynamicQuery(
209         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
210         int end) throws com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findAll()
214         throws com.liferay.portal.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findAll(
218         int start, int end) throws com.liferay.portal.SystemException;
219 
220     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findAll(
222         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException;
224 
225     public void removeByGroupId(long groupId)
226         throws com.liferay.portal.SystemException;
227 
228     public void removeByCompanyId(long companyId)
229         throws com.liferay.portal.SystemException;
230 
231     public void removeByG_U(long groupId, long userId)
232         throws com.liferay.portal.SystemException;
233 
234     public void removeByRG_RA(java.lang.String repoGroupId,
235         java.lang.String repoArtifactId)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException;
238 
239     public void removeAll() throws com.liferay.portal.SystemException;
240 
241     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242     public int countByGroupId(long groupId)
243         throws com.liferay.portal.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public int countByCompanyId(long companyId)
247         throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public int countByG_U(long groupId, long userId)
251         throws com.liferay.portal.SystemException;
252 
253     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254     public int countByRG_RA(java.lang.String repoGroupId,
255         java.lang.String repoArtifactId)
256         throws com.liferay.portal.SystemException;
257 
258     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259     public int countAll() throws com.liferay.portal.SystemException;
260 
261     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
263         long pk) throws com.liferay.portal.SystemException;
264 
265     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
267         long pk, int start, int end) throws com.liferay.portal.SystemException;
268 
269     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
271         long pk, int start, int end,
272         com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException;
274 
275     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276     public int getSCLicensesSize(long pk)
277         throws com.liferay.portal.SystemException;
278 
279     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280     public boolean containsSCLicense(long pk, long scLicensePK)
281         throws com.liferay.portal.SystemException;
282 
283     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284     public boolean containsSCLicenses(long pk)
285         throws com.liferay.portal.SystemException;
286 
287     public void addSCLicense(long pk, long scLicensePK)
288         throws com.liferay.portal.SystemException;
289 
290     public void addSCLicense(long pk,
291         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
292         throws com.liferay.portal.SystemException;
293 
294     public void addSCLicenses(long pk, long[] scLicensePKs)
295         throws com.liferay.portal.SystemException;
296 
297     public void addSCLicenses(long pk,
298         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
299         throws com.liferay.portal.SystemException;
300 
301     public void clearSCLicenses(long pk)
302         throws com.liferay.portal.SystemException;
303 
304     public void removeSCLicense(long pk, long scLicensePK)
305         throws com.liferay.portal.SystemException;
306 
307     public void removeSCLicense(long pk,
308         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
309         throws com.liferay.portal.SystemException;
310 
311     public void removeSCLicenses(long pk, long[] scLicensePKs)
312         throws com.liferay.portal.SystemException;
313 
314     public void removeSCLicenses(long pk,
315         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
316         throws com.liferay.portal.SystemException;
317 
318     public void setSCLicenses(long pk, long[] scLicensePKs)
319         throws com.liferay.portal.SystemException;
320 
321     public void setSCLicenses(long pk,
322         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
323         throws com.liferay.portal.SystemException;
324 
325     public void registerListener(
326         com.liferay.portal.model.ModelListener listener);
327 
328     public void unregisterListener(
329         com.liferay.portal.model.ModelListener listener);
330 }