1   /**
2    * Copyright (c) 2000-2009 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  import com.liferay.portal.service.persistence.BasePersistence;
30  
31  /**
32   * <a href="SCProductVersionPersistence.java.html"><b><i>View Source</i></b></a>
33   *
34   * @author Brian Wing Shun Chan
35   *
36   */
37  @Transactional(rollbackFor =  {
38      PortalException.class, SystemException.class})
39  public interface SCProductVersionPersistence extends BasePersistence {
40      public com.liferay.portlet.softwarecatalog.model.SCProductVersion create(
41          long productVersionId);
42  
43      public com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
44          long productVersionId)
45          throws com.liferay.portal.SystemException,
46              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
47  
48      public com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
49          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
50          throws com.liferay.portal.SystemException;
51  
52      /**
53       * @deprecated Use <code>update(SCProductVersion scProductVersion, boolean merge)</code>.
54       */
55      public com.liferay.portlet.softwarecatalog.model.SCProductVersion update(
56          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
57          throws com.liferay.portal.SystemException;
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        scProductVersion the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when scProductVersion is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public com.liferay.portlet.softwarecatalog.model.SCProductVersion update(
73          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
74          boolean merge) throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portlet.softwarecatalog.model.SCProductVersion updateImpl(
77          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
78          boolean merge) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portlet.softwarecatalog.model.SCProductVersion findByPrimaryKey(
82          long productVersionId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
85  
86      public com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByPrimaryKey(
87          long productVersionId) throws com.liferay.portal.SystemException;
88  
89      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
90      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
91          long productEntryId) throws com.liferay.portal.SystemException;
92  
93      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
94      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
95          long productEntryId, int start, int end)
96          throws com.liferay.portal.SystemException;
97  
98      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
99      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
100         long productEntryId, int start, int end,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException;
103 
104     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105     public com.liferay.portlet.softwarecatalog.model.SCProductVersion findByProductEntryId_First(
106         long productEntryId,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
110 
111     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public com.liferay.portlet.softwarecatalog.model.SCProductVersion findByProductEntryId_Last(
113         long productEntryId,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
117 
118     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119     public com.liferay.portlet.softwarecatalog.model.SCProductVersion[] findByProductEntryId_PrevAndNext(
120         long productVersionId, long productEntryId,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException,
123             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
124 
125     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126     public com.liferay.portlet.softwarecatalog.model.SCProductVersion findByDirectDownloadURL(
127         java.lang.String directDownloadURL)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
130 
131     public com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByDirectDownloadURL(
132         java.lang.String directDownloadURL)
133         throws com.liferay.portal.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public java.util.List<Object> findWithDynamicQuery(
137         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
138         throws com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public java.util.List<Object> findWithDynamicQuery(
142         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
143         int end) throws com.liferay.portal.SystemException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll()
147         throws com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
151         int start, int end) throws com.liferay.portal.SystemException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
155         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException;
157 
158     public void removeByProductEntryId(long productEntryId)
159         throws com.liferay.portal.SystemException;
160 
161     public void removeByDirectDownloadURL(java.lang.String directDownloadURL)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
164 
165     public void removeAll() throws com.liferay.portal.SystemException;
166 
167     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168     public int countByProductEntryId(long productEntryId)
169         throws com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public int countByDirectDownloadURL(java.lang.String directDownloadURL)
173         throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public int countAll() throws com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
180         long pk) throws com.liferay.portal.SystemException;
181 
182     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
184         long pk, int start, int end) throws com.liferay.portal.SystemException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
188         long pk, int start, int end,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public int getSCFrameworkVersionsSize(long pk)
194         throws com.liferay.portal.SystemException;
195 
196     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197     public boolean containsSCFrameworkVersion(long pk, long scFrameworkVersionPK)
198         throws com.liferay.portal.SystemException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public boolean containsSCFrameworkVersions(long pk)
202         throws com.liferay.portal.SystemException;
203 
204     public void addSCFrameworkVersion(long pk, long scFrameworkVersionPK)
205         throws com.liferay.portal.SystemException;
206 
207     public void addSCFrameworkVersion(long pk,
208         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
209         throws com.liferay.portal.SystemException;
210 
211     public void addSCFrameworkVersions(long pk, long[] scFrameworkVersionPKs)
212         throws com.liferay.portal.SystemException;
213 
214     public void addSCFrameworkVersions(long pk,
215         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
216         throws com.liferay.portal.SystemException;
217 
218     public void clearSCFrameworkVersions(long pk)
219         throws com.liferay.portal.SystemException;
220 
221     public void removeSCFrameworkVersion(long pk, long scFrameworkVersionPK)
222         throws com.liferay.portal.SystemException;
223 
224     public void removeSCFrameworkVersion(long pk,
225         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
226         throws com.liferay.portal.SystemException;
227 
228     public void removeSCFrameworkVersions(long pk, long[] scFrameworkVersionPKs)
229         throws com.liferay.portal.SystemException;
230 
231     public void removeSCFrameworkVersions(long pk,
232         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
233         throws com.liferay.portal.SystemException;
234 
235     public void setSCFrameworkVersions(long pk, long[] scFrameworkVersionPKs)
236         throws com.liferay.portal.SystemException;
237 
238     public void setSCFrameworkVersions(long pk,
239         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
240         throws com.liferay.portal.SystemException;
241 }