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="SCProductVersionPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface SCProductVersionPersistence {
32      public com.liferay.portlet.softwarecatalog.model.SCProductVersion create(
33          long productVersionId);
34  
35      public com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
36          long productVersionId)
37          throws com.liferay.portal.SystemException,
38              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
39  
40      public com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
41          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
42          throws com.liferay.portal.SystemException;
43  
44      /**
45       * @deprecated Use <code>update(SCProductVersion scProductVersion, boolean merge)</code>.
46       */
47      public com.liferay.portlet.softwarecatalog.model.SCProductVersion update(
48          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
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        scProductVersion 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 scProductVersion 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.SCProductVersion update(
65          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
66          boolean merge) throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portlet.softwarecatalog.model.SCProductVersion updateImpl(
69          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
70          boolean merge) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portlet.softwarecatalog.model.SCProductVersion findByPrimaryKey(
73          long productVersionId)
74          throws com.liferay.portal.SystemException,
75              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
76  
77      public com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByPrimaryKey(
78          long productVersionId) throws com.liferay.portal.SystemException;
79  
80      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
81          long productEntryId) throws com.liferay.portal.SystemException;
82  
83      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
84          long productEntryId, int start, int end)
85          throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findByProductEntryId(
88          long productEntryId, 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.SCProductVersion findByProductEntryId_First(
93          long productEntryId,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException,
96              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
97  
98      public com.liferay.portlet.softwarecatalog.model.SCProductVersion findByProductEntryId_Last(
99          long productEntryId,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException,
102             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
103 
104     public com.liferay.portlet.softwarecatalog.model.SCProductVersion[] findByProductEntryId_PrevAndNext(
105         long productVersionId, long productEntryId,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
109 
110     public com.liferay.portlet.softwarecatalog.model.SCProductVersion findByDirectDownloadURL(
111         java.lang.String directDownloadURL)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
114 
115     public com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByDirectDownloadURL(
116         java.lang.String directDownloadURL)
117         throws com.liferay.portal.SystemException;
118 
119     public java.util.List<Object> findWithDynamicQuery(
120         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
121         throws com.liferay.portal.SystemException;
122 
123     public java.util.List<Object> findWithDynamicQuery(
124         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
125         int end) throws com.liferay.portal.SystemException;
126 
127     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll()
128         throws com.liferay.portal.SystemException;
129 
130     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
131         int start, int end) throws com.liferay.portal.SystemException;
132 
133     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
134         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException;
136 
137     public void removeByProductEntryId(long productEntryId)
138         throws com.liferay.portal.SystemException;
139 
140     public void removeByDirectDownloadURL(java.lang.String directDownloadURL)
141         throws com.liferay.portal.SystemException,
142             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException;
143 
144     public void removeAll() throws com.liferay.portal.SystemException;
145 
146     public int countByProductEntryId(long productEntryId)
147         throws com.liferay.portal.SystemException;
148 
149     public int countByDirectDownloadURL(java.lang.String directDownloadURL)
150         throws com.liferay.portal.SystemException;
151 
152     public int countAll() throws com.liferay.portal.SystemException;
153 
154     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
155         long pk) throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
158         long pk, int start, int end) throws com.liferay.portal.SystemException;
159 
160     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
161         long pk, int start, int end,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException;
164 
165     public int getSCFrameworkVersionsSize(long pk)
166         throws com.liferay.portal.SystemException;
167 
168     public boolean containsSCFrameworkVersion(long pk, long scFrameworkVersionPK)
169         throws com.liferay.portal.SystemException;
170 
171     public boolean containsSCFrameworkVersions(long pk)
172         throws com.liferay.portal.SystemException;
173 
174     public void addSCFrameworkVersion(long pk, long scFrameworkVersionPK)
175         throws com.liferay.portal.SystemException;
176 
177     public void addSCFrameworkVersion(long pk,
178         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
179         throws com.liferay.portal.SystemException;
180 
181     public void addSCFrameworkVersions(long pk, long[] scFrameworkVersionPKs)
182         throws com.liferay.portal.SystemException;
183 
184     public void addSCFrameworkVersions(long pk,
185         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
186         throws com.liferay.portal.SystemException;
187 
188     public void clearSCFrameworkVersions(long pk)
189         throws com.liferay.portal.SystemException;
190 
191     public void removeSCFrameworkVersion(long pk, long scFrameworkVersionPK)
192         throws com.liferay.portal.SystemException;
193 
194     public void removeSCFrameworkVersion(long pk,
195         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
196         throws com.liferay.portal.SystemException;
197 
198     public void removeSCFrameworkVersions(long pk, long[] scFrameworkVersionPKs)
199         throws com.liferay.portal.SystemException;
200 
201     public void removeSCFrameworkVersions(long pk,
202         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
203         throws com.liferay.portal.SystemException;
204 
205     public void setSCFrameworkVersions(long pk, long[] scFrameworkVersionPKs)
206         throws com.liferay.portal.SystemException;
207 
208     public void setSCFrameworkVersions(long pk,
209         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
210         throws com.liferay.portal.SystemException;
211 
212     public void registerListener(
213         com.liferay.portal.model.ModelListener listener);
214 
215     public void unregisterListener(
216         com.liferay.portal.model.ModelListener listener);
217 }