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 start, 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 start, 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 start, 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 start, 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 start, 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 start, 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<Object> findWithDynamicQuery(
176         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
177         throws com.liferay.portal.SystemException;
178 
179     public java.util.List<Object> findWithDynamicQuery(
180         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
181         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 start, int end) throws com.liferay.portal.SystemException;
188 
189     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findAll(
190         int start, 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) throws com.liferay.portal.SystemException;
226 
227     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
228         long pk, int start, int end) throws com.liferay.portal.SystemException;
229 
230     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
231         long pk, int start, int end,
232         com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException;
234 
235     public int getSCLicensesSize(long pk)
236         throws com.liferay.portal.SystemException;
237 
238     public boolean containsSCLicense(long pk, long scLicensePK)
239         throws com.liferay.portal.SystemException;
240 
241     public boolean containsSCLicenses(long pk)
242         throws com.liferay.portal.SystemException;
243 
244     public void addSCLicense(long pk, long scLicensePK)
245         throws com.liferay.portal.SystemException;
246 
247     public void addSCLicense(long pk,
248         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
249         throws com.liferay.portal.SystemException;
250 
251     public void addSCLicenses(long pk, long[] scLicensePKs)
252         throws com.liferay.portal.SystemException;
253 
254     public void addSCLicenses(long pk,
255         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
256         throws com.liferay.portal.SystemException;
257 
258     public void clearSCLicenses(long pk)
259         throws com.liferay.portal.SystemException;
260 
261     public void removeSCLicense(long pk, long scLicensePK)
262         throws com.liferay.portal.SystemException;
263 
264     public void removeSCLicense(long pk,
265         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
266         throws com.liferay.portal.SystemException;
267 
268     public void removeSCLicenses(long pk, long[] scLicensePKs)
269         throws com.liferay.portal.SystemException;
270 
271     public void removeSCLicenses(long pk,
272         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
273         throws com.liferay.portal.SystemException;
274 
275     public void setSCLicenses(long pk, long[] scLicensePKs)
276         throws com.liferay.portal.SystemException;
277 
278     public void setSCLicenses(long pk,
279         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
280         throws com.liferay.portal.SystemException;
281 
282     public void registerListener(
283         com.liferay.portal.model.ModelListener listener);
284 
285     public void unregisterListener(
286         com.liferay.portal.model.ModelListener listener);
287 }