001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.softwarecatalog.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.service.BaseLocalService;
026    import com.liferay.portal.service.PersistedModelLocalService;
027    
028    /**
029     * Provides the local service interface for SCLicense. Methods of this
030     * service will not have security checks based on the propagated JAAS
031     * credentials because this service can only be accessed from within the same
032     * VM.
033     *
034     * @author Brian Wing Shun Chan
035     * @see SCLicenseLocalServiceUtil
036     * @see com.liferay.portlet.softwarecatalog.service.base.SCLicenseLocalServiceBaseImpl
037     * @see com.liferay.portlet.softwarecatalog.service.impl.SCLicenseLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface SCLicenseLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link SCLicenseLocalServiceUtil} to access the s c license local service. Add custom service methods to {@link com.liferay.portlet.softwarecatalog.service.impl.SCLicenseLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            public com.liferay.portlet.softwarecatalog.model.SCLicense addLicense(
051                    java.lang.String name, java.lang.String url, boolean openSource,
052                    boolean active, boolean recommended)
053                    throws com.liferay.portal.kernel.exception.PortalException;
054    
055            /**
056            * Adds the s c license to the database. Also notifies the appropriate model listeners.
057            *
058            * @param scLicense the s c license
059            * @return the s c license that was added
060            */
061            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
062            public com.liferay.portlet.softwarecatalog.model.SCLicense addSCLicense(
063                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
064    
065            public void addSCProductEntrySCLicense(long productEntryId, long licenseId);
066    
067            public void addSCProductEntrySCLicense(long productEntryId,
068                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
069    
070            public void addSCProductEntrySCLicenses(long productEntryId,
071                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> SCLicenses);
072    
073            public void addSCProductEntrySCLicenses(long productEntryId,
074                    long[] licenseIds);
075    
076            public void clearSCProductEntrySCLicenses(long productEntryId);
077    
078            /**
079            * Creates a new s c license with the primary key. Does not add the s c license to the database.
080            *
081            * @param licenseId the primary key for the new s c license
082            * @return the new s c license
083            */
084            public com.liferay.portlet.softwarecatalog.model.SCLicense createSCLicense(
085                    long licenseId);
086    
087            public void deleteLicense(
088                    com.liferay.portlet.softwarecatalog.model.SCLicense license);
089    
090            public void deleteLicense(long licenseId)
091                    throws com.liferay.portal.kernel.exception.PortalException;
092    
093            /**
094            * @throws PortalException
095            */
096            @Override
097            public com.liferay.portal.model.PersistedModel deletePersistedModel(
098                    com.liferay.portal.model.PersistedModel persistedModel)
099                    throws com.liferay.portal.kernel.exception.PortalException;
100    
101            /**
102            * Deletes the s c license with the primary key from the database. Also notifies the appropriate model listeners.
103            *
104            * @param licenseId the primary key of the s c license
105            * @return the s c license that was removed
106            * @throws PortalException if a s c license with the primary key could not be found
107            */
108            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
109            public com.liferay.portlet.softwarecatalog.model.SCLicense deleteSCLicense(
110                    long licenseId)
111                    throws com.liferay.portal.kernel.exception.PortalException;
112    
113            /**
114            * Deletes the s c license from the database. Also notifies the appropriate model listeners.
115            *
116            * @param scLicense the s c license
117            * @return the s c license that was removed
118            */
119            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
120            public com.liferay.portlet.softwarecatalog.model.SCLicense deleteSCLicense(
121                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
122    
123            public void deleteSCProductEntrySCLicense(long productEntryId,
124                    long licenseId);
125    
126            public void deleteSCProductEntrySCLicense(long productEntryId,
127                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
128    
129            public void deleteSCProductEntrySCLicenses(long productEntryId,
130                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> SCLicenses);
131    
132            public void deleteSCProductEntrySCLicenses(long productEntryId,
133                    long[] licenseIds);
134    
135            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
136    
137            /**
138            * Performs a dynamic query on the database and returns the matching rows.
139            *
140            * @param dynamicQuery the dynamic query
141            * @return the matching rows
142            */
143            public <T> java.util.List<T> dynamicQuery(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
145    
146            /**
147            * Performs a dynamic query on the database and returns a range of the matching rows.
148            *
149            * <p>
150            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCLicenseModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
151            * </p>
152            *
153            * @param dynamicQuery the dynamic query
154            * @param start the lower bound of the range of model instances
155            * @param end the upper bound of the range of model instances (not inclusive)
156            * @return the range of matching rows
157            */
158            public <T> java.util.List<T> dynamicQuery(
159                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
160                    int end);
161    
162            /**
163            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
164            *
165            * <p>
166            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCLicenseModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
167            * </p>
168            *
169            * @param dynamicQuery the dynamic query
170            * @param start the lower bound of the range of model instances
171            * @param end the upper bound of the range of model instances (not inclusive)
172            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
173            * @return the ordered range of matching rows
174            */
175            public <T> java.util.List<T> dynamicQuery(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
177                    int end,
178                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
179    
180            /**
181            * Returns the number of rows matching the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @return the number of rows matching the dynamic query
185            */
186            public long dynamicQueryCount(
187                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
188    
189            /**
190            * Returns the number of rows matching the dynamic query.
191            *
192            * @param dynamicQuery the dynamic query
193            * @param projection the projection to apply to the query
194            * @return the number of rows matching the dynamic query
195            */
196            public long dynamicQueryCount(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
198                    com.liferay.portal.kernel.dao.orm.Projection projection);
199    
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public com.liferay.portlet.softwarecatalog.model.SCLicense fetchSCLicense(
202                    long licenseId);
203    
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
206    
207            /**
208            * Returns the Spring bean ID for this bean.
209            *
210            * @return the Spring bean ID for this bean
211            */
212            public java.lang.String getBeanIdentifier();
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portlet.softwarecatalog.model.SCLicense getLicense(
216                    long licenseId)
217                    throws com.liferay.portal.kernel.exception.PortalException;
218    
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses();
221    
222            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
224                    boolean active, boolean recommended);
225    
226            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
228                    boolean active, boolean recommended, int start, int end);
229    
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
232                    int start, int end);
233    
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public int getLicensesCount();
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public int getLicensesCount(boolean active, boolean recommended);
239    
240            @Override
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portal.model.PersistedModel getPersistedModel(
243                    java.io.Serializable primaryKeyObj)
244                    throws com.liferay.portal.kernel.exception.PortalException;
245    
246            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getProductEntryLicenses(
248                    long productEntryId);
249    
250            /**
251            * Returns the s c license with the primary key.
252            *
253            * @param licenseId the primary key of the s c license
254            * @return the s c license
255            * @throws PortalException if a s c license with the primary key could not be found
256            */
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public com.liferay.portlet.softwarecatalog.model.SCLicense getSCLicense(
259                    long licenseId)
260                    throws com.liferay.portal.kernel.exception.PortalException;
261    
262            /**
263            * Returns a range of all the s c licenses.
264            *
265            * <p>
266            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCLicenseModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
267            * </p>
268            *
269            * @param start the lower bound of the range of s c licenses
270            * @param end the upper bound of the range of s c licenses (not inclusive)
271            * @return the range of s c licenses
272            */
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
275                    int start, int end);
276    
277            /**
278            * Returns the number of s c licenses.
279            *
280            * @return the number of s c licenses
281            */
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public int getSCLicensesCount();
284    
285            /**
286            * Returns the productEntryIds of the s c product entries associated with the s c license.
287            *
288            * @param licenseId the licenseId of the s c license
289            * @return long[] the productEntryIds of s c product entries associated with the s c license
290            */
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public long[] getSCProductEntryPrimaryKeys(long licenseId);
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
296                    long productEntryId);
297    
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
300                    long productEntryId, int start, int end);
301    
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
304                    long productEntryId, int start, int end,
305                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCLicense> orderByComparator);
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public int getSCProductEntrySCLicensesCount(long productEntryId);
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public boolean hasSCProductEntrySCLicense(long productEntryId,
312                    long licenseId);
313    
314            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315            public boolean hasSCProductEntrySCLicenses(long productEntryId);
316    
317            /**
318            * Sets the Spring bean ID for this bean.
319            *
320            * @param beanIdentifier the Spring bean ID for this bean
321            */
322            public void setBeanIdentifier(java.lang.String beanIdentifier);
323    
324            public void setSCProductEntrySCLicenses(long productEntryId,
325                    long[] licenseIds);
326    
327            public com.liferay.portlet.softwarecatalog.model.SCLicense updateLicense(
328                    long licenseId, java.lang.String name, java.lang.String url,
329                    boolean openSource, boolean active, boolean recommended)
330                    throws com.liferay.portal.kernel.exception.PortalException;
331    
332            /**
333            * Updates the s c license in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
334            *
335            * @param scLicense the s c license
336            * @return the s c license that was updated
337            */
338            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
339            public com.liferay.portlet.softwarecatalog.model.SCLicense updateSCLicense(
340                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
341    }