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