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