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.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="SCLicensePersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface SCLicensePersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.softwarecatalog.model.SCLicense create(
43          long licenseId);
44  
45      public com.liferay.portlet.softwarecatalog.model.SCLicense remove(
46          long licenseId)
47          throws com.liferay.portal.SystemException,
48              com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
49  
50      public com.liferay.portlet.softwarecatalog.model.SCLicense remove(
51          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * @deprecated Use <code>update(SCLicense scLicense, boolean merge)</code>.
56       */
57      public com.liferay.portlet.softwarecatalog.model.SCLicense update(
58          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
59          throws com.liferay.portal.SystemException;
60  
61      /**
62       * Add, update, or merge, the entity. This method also calls the model
63       * listeners to trigger the proper events associated with adding, deleting,
64       * or updating an entity.
65       *
66       * @param        scLicense the entity to add, update, or merge
67       * @param        merge boolean value for whether to merge the entity. The
68       *                default value is false. Setting merge to true is more
69       *                expensive and should only be true when scLicense is
70       *                transient. See LEP-5473 for a detailed discussion of this
71       *                method.
72       * @return        true if the portlet can be displayed via Ajax
73       */
74      public com.liferay.portlet.softwarecatalog.model.SCLicense update(
75          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
76          boolean merge) throws com.liferay.portal.SystemException;
77  
78      public com.liferay.portlet.softwarecatalog.model.SCLicense updateImpl(
79          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
80          boolean merge) throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portlet.softwarecatalog.model.SCLicense findByPrimaryKey(
83          long licenseId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
86  
87      public com.liferay.portlet.softwarecatalog.model.SCLicense fetchByPrimaryKey(
88          long licenseId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
91          boolean active) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
94          boolean active, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
98          boolean active, int start, int end,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException;
101 
102     public com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_First(
103         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException,
105             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
106 
107     public com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_Last(
108         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.SystemException,
110             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
111 
112     public com.liferay.portlet.softwarecatalog.model.SCLicense[] findByActive_PrevAndNext(
113         long licenseId, boolean active,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
117 
118     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
119         boolean active, boolean recommended)
120         throws com.liferay.portal.SystemException;
121 
122     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
123         boolean active, boolean recommended, int start, int end)
124         throws com.liferay.portal.SystemException;
125 
126     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
127         boolean active, boolean recommended, int start, int end,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException;
130 
131     public com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_First(
132         boolean active, boolean recommended,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
136 
137     public com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_Last(
138         boolean active, boolean recommended,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
142 
143     public com.liferay.portlet.softwarecatalog.model.SCLicense[] findByA_R_PrevAndNext(
144         long licenseId, boolean active, boolean recommended,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.softwarecatalog.NoSuchLicenseException;
148 
149     public java.util.List<Object> findWithDynamicQuery(
150         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151         throws com.liferay.portal.SystemException;
152 
153     public java.util.List<Object> findWithDynamicQuery(
154         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
155         int end) throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll()
158         throws com.liferay.portal.SystemException;
159 
160     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
161         int start, int end) throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
164         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException;
166 
167     public void removeByActive(boolean active)
168         throws com.liferay.portal.SystemException;
169 
170     public void removeByA_R(boolean active, boolean recommended)
171         throws com.liferay.portal.SystemException;
172 
173     public void removeAll() throws com.liferay.portal.SystemException;
174 
175     public int countByActive(boolean active)
176         throws com.liferay.portal.SystemException;
177 
178     public int countByA_R(boolean active, boolean recommended)
179         throws com.liferay.portal.SystemException;
180 
181     public int countAll() throws com.liferay.portal.SystemException;
182 
183     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
184         long pk) throws com.liferay.portal.SystemException;
185 
186     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
187         long pk, int start, int end) throws com.liferay.portal.SystemException;
188 
189     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
190         long pk, int start, int end,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException;
193 
194     public int getSCProductEntriesSize(long pk)
195         throws com.liferay.portal.SystemException;
196 
197     public boolean containsSCProductEntry(long pk, long scProductEntryPK)
198         throws com.liferay.portal.SystemException;
199 
200     public boolean containsSCProductEntries(long pk)
201         throws com.liferay.portal.SystemException;
202 
203     public void addSCProductEntry(long pk, long scProductEntryPK)
204         throws com.liferay.portal.SystemException;
205 
206     public void addSCProductEntry(long pk,
207         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
208         throws com.liferay.portal.SystemException;
209 
210     public void addSCProductEntries(long pk, long[] scProductEntryPKs)
211         throws com.liferay.portal.SystemException;
212 
213     public void addSCProductEntries(long pk,
214         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
215         throws com.liferay.portal.SystemException;
216 
217     public void clearSCProductEntries(long pk)
218         throws com.liferay.portal.SystemException;
219 
220     public void removeSCProductEntry(long pk, long scProductEntryPK)
221         throws com.liferay.portal.SystemException;
222 
223     public void removeSCProductEntry(long pk,
224         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
225         throws com.liferay.portal.SystemException;
226 
227     public void removeSCProductEntries(long pk, long[] scProductEntryPKs)
228         throws com.liferay.portal.SystemException;
229 
230     public void removeSCProductEntries(long pk,
231         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
232         throws com.liferay.portal.SystemException;
233 
234     public void setSCProductEntries(long pk, long[] scProductEntryPKs)
235         throws com.liferay.portal.SystemException;
236 
237     public void setSCProductEntries(long pk,
238         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
239         throws com.liferay.portal.SystemException;
240 }