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="SCLicensePersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface SCLicensePersistence {
32      public com.liferay.portlet.softwarecatalog.model.SCLicense create(
33          long licenseId);
34  
35      public com.liferay.portlet.softwarecatalog.model.SCLicense remove(
36          long licenseId)
37          throws com.liferay.portal.SystemException,
38              com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
39  
40      public com.liferay.portlet.softwarecatalog.model.SCLicense remove(
41          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
42          throws com.liferay.portal.SystemException;
43  
44      /**
45       * @deprecated Use <code>update(SCLicense scLicense, boolean merge)</code>.
46       */
47      public com.liferay.portlet.softwarecatalog.model.SCLicense update(
48          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
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        scLicense 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 scLicense 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.SCLicense update(
65          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
66          boolean merge) throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portlet.softwarecatalog.model.SCLicense updateImpl(
69          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
70          boolean merge) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portlet.softwarecatalog.model.SCLicense findByPrimaryKey(
73          long licenseId)
74          throws com.liferay.portal.SystemException,
75              com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
76  
77      public com.liferay.portlet.softwarecatalog.model.SCLicense fetchByPrimaryKey(
78          long licenseId) throws com.liferay.portal.SystemException;
79  
80      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
81          boolean active) throws com.liferay.portal.SystemException;
82  
83      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
84          boolean active, int begin, int end)
85          throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
88          boolean active, 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.SCLicense findByActive_First(
93          boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
94          throws com.liferay.portal.SystemException,
95              com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
96  
97      public com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_Last(
98          boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException,
100             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
101 
102     public com.liferay.portlet.softwarecatalog.model.SCLicense[] findByActive_PrevAndNext(
103         long licenseId, boolean active,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
107 
108     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
109         boolean active, boolean recommended)
110         throws com.liferay.portal.SystemException;
111 
112     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
113         boolean active, boolean recommended, int begin, int end)
114         throws com.liferay.portal.SystemException;
115 
116     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
117         boolean active, boolean recommended, int begin, int end,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException;
120 
121     public com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_First(
122         boolean active, boolean recommended,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException,
125             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
126 
127     public com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_Last(
128         boolean active, boolean recommended,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
132 
133     public com.liferay.portlet.softwarecatalog.model.SCLicense[] findByA_R_PrevAndNext(
134         long licenseId, boolean active, boolean recommended,
135         com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException,
137             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
138 
139     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findWithDynamicQuery(
140         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
141         throws com.liferay.portal.SystemException;
142 
143     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findWithDynamicQuery(
144         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
145         int begin, int end) throws com.liferay.portal.SystemException;
146 
147     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll()
148         throws com.liferay.portal.SystemException;
149 
150     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
151         int begin, int end) throws com.liferay.portal.SystemException;
152 
153     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
154         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException;
156 
157     public void removeByActive(boolean active)
158         throws com.liferay.portal.SystemException;
159 
160     public void removeByA_R(boolean active, boolean recommended)
161         throws com.liferay.portal.SystemException;
162 
163     public void removeAll() throws com.liferay.portal.SystemException;
164 
165     public int countByActive(boolean active)
166         throws com.liferay.portal.SystemException;
167 
168     public int countByA_R(boolean active, boolean recommended)
169         throws com.liferay.portal.SystemException;
170 
171     public int countAll() throws com.liferay.portal.SystemException;
172 
173     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
174         long pk)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
177 
178     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
179         long pk, int begin, int end)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
182 
183     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
184         long pk, int begin, int end,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
188 
189     public int getSCProductEntriesSize(long pk)
190         throws com.liferay.portal.SystemException;
191 
192     public boolean containsSCProductEntry(long pk, long scProductEntryPK)
193         throws com.liferay.portal.SystemException;
194 
195     public boolean containsSCProductEntries(long pk)
196         throws com.liferay.portal.SystemException;
197 
198     public void addSCProductEntry(long pk, long scProductEntryPK)
199         throws com.liferay.portal.SystemException,
200             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
201             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
202 
203     public void addSCProductEntry(long pk,
204         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
205         throws com.liferay.portal.SystemException,
206             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
207             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
208 
209     public void addSCProductEntries(long pk, long[] scProductEntryPKs)
210         throws com.liferay.portal.SystemException,
211             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
212             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
213 
214     public void addSCProductEntries(long pk,
215         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
218             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
219 
220     public void clearSCProductEntries(long pk)
221         throws com.liferay.portal.SystemException,
222             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
223 
224     public void removeSCProductEntry(long pk, long scProductEntryPK)
225         throws com.liferay.portal.SystemException,
226             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
227             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
228 
229     public void removeSCProductEntry(long pk,
230         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
233             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
234 
235     public void removeSCProductEntries(long pk, long[] scProductEntryPKs)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
238             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
239 
240     public void removeSCProductEntries(long pk,
241         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
242         throws com.liferay.portal.SystemException,
243             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
244             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
245 
246     public void setSCProductEntries(long pk, long[] scProductEntryPKs)
247         throws com.liferay.portal.SystemException,
248             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
249             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
250 
251     public void setSCProductEntries(long pk,
252         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
253         throws com.liferay.portal.SystemException,
254             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException,
255             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
256 }