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