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) throws PortalException;
053    
054            /**
055            * Adds the s c license to the database. Also notifies the appropriate model listeners.
056            *
057            * @param scLicense the s c license
058            * @return the s c license that was added
059            */
060            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
061            public com.liferay.portlet.softwarecatalog.model.SCLicense addSCLicense(
062                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
063    
064            public void addSCProductEntrySCLicense(long productEntryId, long licenseId);
065    
066            public void addSCProductEntrySCLicense(long productEntryId,
067                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
068    
069            public void addSCProductEntrySCLicenses(long productEntryId,
070                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> SCLicenses);
071    
072            public void addSCProductEntrySCLicenses(long productEntryId,
073                    long[] licenseIds);
074    
075            public void clearSCProductEntrySCLicenses(long productEntryId);
076    
077            /**
078            * Creates a new s c license with the primary key. Does not add the s c license to the database.
079            *
080            * @param licenseId the primary key for the new s c license
081            * @return the new s c license
082            */
083            public com.liferay.portlet.softwarecatalog.model.SCLicense createSCLicense(
084                    long licenseId);
085    
086            public void deleteLicense(
087                    com.liferay.portlet.softwarecatalog.model.SCLicense license);
088    
089            public void deleteLicense(long licenseId) throws PortalException;
090    
091            /**
092            * @throws PortalException
093            */
094            @Override
095            public com.liferay.portal.model.PersistedModel deletePersistedModel(
096                    com.liferay.portal.model.PersistedModel persistedModel)
097                    throws PortalException;
098    
099            /**
100            * Deletes the s c license with the primary key from the database. Also notifies the appropriate model listeners.
101            *
102            * @param licenseId the primary key of the s c license
103            * @return the s c license that was removed
104            * @throws PortalException if a s c license with the primary key could not be found
105            */
106            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
107            public com.liferay.portlet.softwarecatalog.model.SCLicense deleteSCLicense(
108                    long licenseId) throws PortalException;
109    
110            /**
111            * Deletes the s c license from the database. Also notifies the appropriate model listeners.
112            *
113            * @param scLicense the s c license
114            * @return the s c license that was removed
115            */
116            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
117            public com.liferay.portlet.softwarecatalog.model.SCLicense deleteSCLicense(
118                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
119    
120            public void deleteSCProductEntrySCLicense(long productEntryId,
121                    long licenseId);
122    
123            public void deleteSCProductEntrySCLicense(long productEntryId,
124                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
125    
126            public void deleteSCProductEntrySCLicenses(long productEntryId,
127                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> SCLicenses);
128    
129            public void deleteSCProductEntrySCLicenses(long productEntryId,
130                    long[] licenseIds);
131    
132            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
133    
134            /**
135            * Performs a dynamic query on the database and returns the matching rows.
136            *
137            * @param dynamicQuery the dynamic query
138            * @return the matching rows
139            */
140            public <T> java.util.List<T> dynamicQuery(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
142    
143            /**
144            * Performs a dynamic query on the database and returns a range of the matching rows.
145            *
146            * <p>
147            * 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.
148            * </p>
149            *
150            * @param dynamicQuery the dynamic query
151            * @param start the lower bound of the range of model instances
152            * @param end the upper bound of the range of model instances (not inclusive)
153            * @return the range of matching rows
154            */
155            public <T> java.util.List<T> dynamicQuery(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
157                    int end);
158    
159            /**
160            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
161            *
162            * <p>
163            * 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.
164            * </p>
165            *
166            * @param dynamicQuery the dynamic query
167            * @param start the lower bound of the range of model instances
168            * @param end the upper bound of the range of model instances (not inclusive)
169            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
170            * @return the ordered range of matching rows
171            */
172            public <T> java.util.List<T> dynamicQuery(
173                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
174                    int end,
175                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
176    
177            /**
178            * Returns the number of rows matching the dynamic query.
179            *
180            * @param dynamicQuery the dynamic query
181            * @return the number of rows matching the dynamic query
182            */
183            public long dynamicQueryCount(
184                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
185    
186            /**
187            * Returns the number of rows matching the dynamic query.
188            *
189            * @param dynamicQuery the dynamic query
190            * @param projection the projection to apply to the query
191            * @return the number of rows matching the dynamic query
192            */
193            public long dynamicQueryCount(
194                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
195                    com.liferay.portal.kernel.dao.orm.Projection projection);
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public com.liferay.portlet.softwarecatalog.model.SCLicense fetchSCLicense(
199                    long licenseId);
200    
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
203    
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public com.liferay.portlet.softwarecatalog.model.SCLicense getLicense(
206                    long licenseId) throws PortalException;
207    
208            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses();
210    
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
213                    boolean active, boolean recommended);
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
217                    boolean active, boolean recommended, int start, int end);
218    
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
221                    int start, int end);
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public int getLicensesCount();
225    
226            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227            public int getLicensesCount(boolean active, boolean recommended);
228    
229            /**
230            * Returns the OSGi service identifier.
231            *
232            * @return the OSGi service identifier
233            */
234            public java.lang.String getOSGiServiceIdentifier();
235    
236            @Override
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public com.liferay.portal.model.PersistedModel getPersistedModel(
239                    java.io.Serializable primaryKeyObj) throws PortalException;
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getProductEntryLicenses(
243                    long productEntryId);
244    
245            /**
246            * Returns the s c license with the primary key.
247            *
248            * @param licenseId the primary key of the s c license
249            * @return the s c license
250            * @throws PortalException if a s c license with the primary key could not be found
251            */
252            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253            public com.liferay.portlet.softwarecatalog.model.SCLicense getSCLicense(
254                    long licenseId) throws PortalException;
255    
256            /**
257            * Returns a range of all the s c licenses.
258            *
259            * <p>
260            * 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.
261            * </p>
262            *
263            * @param start the lower bound of the range of s c licenses
264            * @param end the upper bound of the range of s c licenses (not inclusive)
265            * @return the range of s c licenses
266            */
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
269                    int start, int end);
270    
271            /**
272            * Returns the number of s c licenses.
273            *
274            * @return the number of s c licenses
275            */
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public int getSCLicensesCount();
278    
279            /**
280            * Returns the productEntryIds of the s c product entries associated with the s c license.
281            *
282            * @param licenseId the licenseId of the s c license
283            * @return long[] the productEntryIds of s c product entries associated with the s c license
284            */
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public long[] getSCProductEntryPrimaryKeys(long licenseId);
287    
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
290                    long productEntryId);
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
294                    long productEntryId, int start, int end);
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
298                    long productEntryId, int start, int end,
299                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCLicense> orderByComparator);
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public int getSCProductEntrySCLicensesCount(long productEntryId);
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public boolean hasSCProductEntrySCLicense(long productEntryId,
306                    long licenseId);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public boolean hasSCProductEntrySCLicenses(long productEntryId);
310    
311            public void setSCProductEntrySCLicenses(long productEntryId,
312                    long[] licenseIds);
313    
314            public com.liferay.portlet.softwarecatalog.model.SCLicense updateLicense(
315                    long licenseId, java.lang.String name, java.lang.String url,
316                    boolean openSource, boolean active, boolean recommended)
317                    throws PortalException;
318    
319            /**
320            * Updates the s c license in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
321            *
322            * @param scLicense the s c license
323            * @return the s c license that was updated
324            */
325            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
326            public com.liferay.portlet.softwarecatalog.model.SCLicense updateSCLicense(
327                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense);
328    }