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.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
022    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
023    import com.liferay.portal.kernel.dao.orm.Projection;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.search.Indexable;
027    import com.liferay.portal.kernel.search.IndexableType;
028    import com.liferay.portal.kernel.transaction.Isolation;
029    import com.liferay.portal.kernel.transaction.Propagation;
030    import com.liferay.portal.kernel.transaction.Transactional;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.model.RepositoryEntry;
034    
035    import com.liferay.portlet.exportimport.lar.PortletDataContext;
036    
037    import java.io.Serializable;
038    
039    import java.util.List;
040    
041    /**
042     * Provides the local service interface for RepositoryEntry. Methods of this
043     * service will not have security checks based on the propagated JAAS
044     * credentials because this service can only be accessed from within the same
045     * VM.
046     *
047     * @author Brian Wing Shun Chan
048     * @see RepositoryEntryLocalServiceUtil
049     * @see com.liferay.portal.service.base.RepositoryEntryLocalServiceBaseImpl
050     * @see com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl
051     * @generated
052     */
053    @ProviderType
054    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
055            PortalException.class, SystemException.class})
056    public interface RepositoryEntryLocalService extends BaseLocalService,
057            PersistedModelLocalService {
058            /*
059             * NOTE FOR DEVELOPERS:
060             *
061             * Never modify or reference this interface directly. Always use {@link RepositoryEntryLocalServiceUtil} to access the repository entry local service. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryEntryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
062             */
063    
064            /**
065            * Adds the repository entry to the database. Also notifies the appropriate model listeners.
066            *
067            * @param repositoryEntry the repository entry
068            * @return the repository entry that was added
069            */
070            @Indexable(type = IndexableType.REINDEX)
071            public RepositoryEntry addRepositoryEntry(RepositoryEntry repositoryEntry);
072    
073            public RepositoryEntry addRepositoryEntry(long userId, long groupId,
074                    long repositoryId, java.lang.String mappedId,
075                    com.liferay.portal.service.ServiceContext serviceContext)
076                    throws PortalException;
077    
078            /**
079            * Creates a new repository entry with the primary key. Does not add the repository entry to the database.
080            *
081            * @param repositoryEntryId the primary key for the new repository entry
082            * @return the new repository entry
083            */
084            public RepositoryEntry createRepositoryEntry(long repositoryEntryId);
085    
086            /**
087            * @throws PortalException
088            */
089            @Override
090            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
091                    throws PortalException;
092    
093            public void deleteRepositoryEntries(long repositoryId,
094                    java.lang.Iterable<java.lang.String> mappedIds)
095                    throws PortalException;
096    
097            /**
098            * Deletes the repository entry from the database. Also notifies the appropriate model listeners.
099            *
100            * @param repositoryEntry the repository entry
101            * @return the repository entry that was removed
102            */
103            @Indexable(type = IndexableType.DELETE)
104            public RepositoryEntry deleteRepositoryEntry(
105                    RepositoryEntry repositoryEntry);
106    
107            /**
108            * Deletes the repository entry with the primary key from the database. Also notifies the appropriate model listeners.
109            *
110            * @param repositoryEntryId the primary key of the repository entry
111            * @return the repository entry that was removed
112            * @throws PortalException if a repository entry with the primary key could not be found
113            */
114            @Indexable(type = IndexableType.DELETE)
115            public RepositoryEntry deleteRepositoryEntry(long repositoryEntryId)
116                    throws PortalException;
117    
118            public void deleteRepositoryEntry(long repositoryId,
119                    java.lang.String mappedId) throws PortalException;
120    
121            public DynamicQuery dynamicQuery();
122    
123            /**
124            * Performs a dynamic query on the database and returns the matching rows.
125            *
126            * @param dynamicQuery the dynamic query
127            * @return the matching rows
128            */
129            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
130    
131            /**
132            * Performs a dynamic query on the database and returns a range of the matching rows.
133            *
134            * <p>
135            * 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.portal.model.impl.RepositoryEntryModelImpl}. 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.
136            * </p>
137            *
138            * @param dynamicQuery the dynamic query
139            * @param start the lower bound of the range of model instances
140            * @param end the upper bound of the range of model instances (not inclusive)
141            * @return the range of matching rows
142            */
143            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
144                    int end);
145    
146            /**
147            * Performs a dynamic query on the database and returns an ordered 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.portal.model.impl.RepositoryEntryModelImpl}. 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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
157            * @return the ordered range of matching rows
158            */
159            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
160                    int end, OrderByComparator<T> orderByComparator);
161    
162            /**
163            * Returns the number of rows matching the dynamic query.
164            *
165            * @param dynamicQuery the dynamic query
166            * @return the number of rows matching the dynamic query
167            */
168            public long dynamicQueryCount(DynamicQuery dynamicQuery);
169    
170            /**
171            * Returns the number of rows matching the dynamic query.
172            *
173            * @param dynamicQuery the dynamic query
174            * @param projection the projection to apply to the query
175            * @return the number of rows matching the dynamic query
176            */
177            public long dynamicQueryCount(DynamicQuery dynamicQuery,
178                    Projection projection);
179    
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public RepositoryEntry fetchRepositoryEntry(long repositoryEntryId);
182    
183            /**
184            * Returns the repository entry matching the UUID and group.
185            *
186            * @param uuid the repository entry's UUID
187            * @param groupId the primary key of the group
188            * @return the matching repository entry, or <code>null</code> if a matching repository entry could not be found
189            */
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public RepositoryEntry fetchRepositoryEntryByUuidAndGroupId(
192                    java.lang.String uuid, long groupId);
193    
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public ActionableDynamicQuery getActionableDynamicQuery();
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
199                    PortletDataContext portletDataContext);
200    
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
203    
204            /**
205            * Returns the OSGi service identifier.
206            *
207            * @return the OSGi service identifier
208            */
209            public java.lang.String getOSGiServiceIdentifier();
210    
211            @Override
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
214                    throws PortalException;
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public List<RepositoryEntry> getRepositoryEntries(long repositoryId);
218    
219            /**
220            * Returns a range of all the repository entries.
221            *
222            * <p>
223            * 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.portal.model.impl.RepositoryEntryModelImpl}. 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.
224            * </p>
225            *
226            * @param start the lower bound of the range of repository entries
227            * @param end the upper bound of the range of repository entries (not inclusive)
228            * @return the range of repository entries
229            */
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public List<RepositoryEntry> getRepositoryEntries(int start, int end);
232    
233            /**
234            * Returns all the repository entries matching the UUID and company.
235            *
236            * @param uuid the UUID of the repository entries
237            * @param companyId the primary key of the company
238            * @return the matching repository entries, or an empty list if no matches were found
239            */
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public List<RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId(
242                    java.lang.String uuid, long companyId);
243    
244            /**
245            * Returns a range of repository entries matching the UUID and company.
246            *
247            * @param uuid the UUID of the repository entries
248            * @param companyId the primary key of the company
249            * @param start the lower bound of the range of repository entries
250            * @param end the upper bound of the range of repository entries (not inclusive)
251            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
252            * @return the range of matching repository entries, or an empty list if no matches were found
253            */
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public List<RepositoryEntry> getRepositoryEntriesByUuidAndCompanyId(
256                    java.lang.String uuid, long companyId, int start, int end,
257                    OrderByComparator<RepositoryEntry> orderByComparator);
258    
259            /**
260            * Returns the number of repository entries.
261            *
262            * @return the number of repository entries
263            */
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public int getRepositoryEntriesCount();
266    
267            /**
268            * Returns the repository entry with the primary key.
269            *
270            * @param repositoryEntryId the primary key of the repository entry
271            * @return the repository entry
272            * @throws PortalException if a repository entry with the primary key could not be found
273            */
274            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275            public RepositoryEntry getRepositoryEntry(long repositoryEntryId)
276                    throws PortalException;
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public RepositoryEntry getRepositoryEntry(long userId, long groupId,
280                    long repositoryId, java.lang.String objectId) throws PortalException;
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public RepositoryEntry getRepositoryEntry(java.lang.String uuid,
284                    long groupId) throws PortalException;
285    
286            /**
287            * Returns the repository entry matching the UUID and group.
288            *
289            * @param uuid the repository entry's UUID
290            * @param groupId the primary key of the group
291            * @return the matching repository entry
292            * @throws PortalException if a matching repository entry could not be found
293            */
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public RepositoryEntry getRepositoryEntryByUuidAndGroupId(
296                    java.lang.String uuid, long groupId) throws PortalException;
297    
298            /**
299            * Updates the repository entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
300            *
301            * @param repositoryEntry the repository entry
302            * @return the repository entry that was updated
303            */
304            @Indexable(type = IndexableType.REINDEX)
305            public RepositoryEntry updateRepositoryEntry(
306                    RepositoryEntry repositoryEntry);
307    
308            public RepositoryEntry updateRepositoryEntry(long repositoryEntryId,
309                    java.lang.String mappedId) throws PortalException;
310    }