001    /**
002     * Copyright (c) 2000-2012 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.persistence;
016    
017    import com.liferay.portal.model.ServiceComponent;
018    
019    /**
020     * The persistence interface for the service component service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see ServiceComponentPersistenceImpl
028     * @see ServiceComponentUtil
029     * @generated
030     */
031    public interface ServiceComponentPersistence extends BasePersistence<ServiceComponent> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link ServiceComponentUtil} to access the service component persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Caches the service component in the entity cache if it is enabled.
040            *
041            * @param serviceComponent the service component
042            */
043            public void cacheResult(
044                    com.liferay.portal.model.ServiceComponent serviceComponent);
045    
046            /**
047            * Caches the service components in the entity cache if it is enabled.
048            *
049            * @param serviceComponents the service components
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.ServiceComponent> serviceComponents);
053    
054            /**
055            * Creates a new service component with the primary key. Does not add the service component to the database.
056            *
057            * @param serviceComponentId the primary key for the new service component
058            * @return the new service component
059            */
060            public com.liferay.portal.model.ServiceComponent create(
061                    long serviceComponentId);
062    
063            /**
064            * Removes the service component with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param serviceComponentId the primary key of the service component
067            * @return the service component that was removed
068            * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portal.model.ServiceComponent remove(
072                    long serviceComponentId)
073                    throws com.liferay.portal.NoSuchServiceComponentException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            public com.liferay.portal.model.ServiceComponent updateImpl(
077                    com.liferay.portal.model.ServiceComponent serviceComponent,
078                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Returns the service component with the primary key or throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found.
083            *
084            * @param serviceComponentId the primary key of the service component
085            * @return the service component
086            * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portal.model.ServiceComponent findByPrimaryKey(
090                    long serviceComponentId)
091                    throws com.liferay.portal.NoSuchServiceComponentException,
092                            com.liferay.portal.kernel.exception.SystemException;
093    
094            /**
095            * Returns the service component with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param serviceComponentId the primary key of the service component
098            * @return the service component, or <code>null</code> if a service component with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portal.model.ServiceComponent fetchByPrimaryKey(
102                    long serviceComponentId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Returns all the service components where buildNamespace = &#63;.
107            *
108            * @param buildNamespace the build namespace
109            * @return the matching service components
110            * @throws SystemException if a system exception occurred
111            */
112            public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
113                    java.lang.String buildNamespace)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns a range of all the service components where buildNamespace = &#63;.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param buildNamespace the build namespace
124            * @param start the lower bound of the range of service components
125            * @param end the upper bound of the range of service components (not inclusive)
126            * @return the range of matching service components
127            * @throws SystemException if a system exception occurred
128            */
129            public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
130                    java.lang.String buildNamespace, int start, int end)
131                    throws com.liferay.portal.kernel.exception.SystemException;
132    
133            /**
134            * Returns an ordered range of all the service components where buildNamespace = &#63;.
135            *
136            * <p>
137            * 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.
138            * </p>
139            *
140            * @param buildNamespace the build namespace
141            * @param start the lower bound of the range of service components
142            * @param end the upper bound of the range of service components (not inclusive)
143            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
144            * @return the ordered range of matching service components
145            * @throws SystemException if a system exception occurred
146            */
147            public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
148                    java.lang.String buildNamespace, int start, int end,
149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Returns the first service component in the ordered set where buildNamespace = &#63;.
154            *
155            * <p>
156            * 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.
157            * </p>
158            *
159            * @param buildNamespace the build namespace
160            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
161            * @return the first matching service component
162            * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found
163            * @throws SystemException if a system exception occurred
164            */
165            public com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
166                    java.lang.String buildNamespace,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.NoSuchServiceComponentException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns the last service component in the ordered set where buildNamespace = &#63;.
173            *
174            * <p>
175            * 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.
176            * </p>
177            *
178            * @param buildNamespace the build namespace
179            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
180            * @return the last matching service component
181            * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
185                    java.lang.String buildNamespace,
186                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187                    throws com.liferay.portal.NoSuchServiceComponentException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns the service components before and after the current service component in the ordered set where buildNamespace = &#63;.
192            *
193            * <p>
194            * 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.
195            * </p>
196            *
197            * @param serviceComponentId the primary key of the current service component
198            * @param buildNamespace the build namespace
199            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
200            * @return the previous, current, and next service component
201            * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
205                    long serviceComponentId, java.lang.String buildNamespace,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.NoSuchServiceComponentException,
208                            com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * Returns the service component where buildNamespace = &#63; and buildNumber = &#63; or throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found.
212            *
213            * @param buildNamespace the build namespace
214            * @param buildNumber the build number
215            * @return the matching service component
216            * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portal.model.ServiceComponent findByBNS_BNU(
220                    java.lang.String buildNamespace, long buildNumber)
221                    throws com.liferay.portal.NoSuchServiceComponentException,
222                            com.liferay.portal.kernel.exception.SystemException;
223    
224            /**
225            * Returns the service component where buildNamespace = &#63; and buildNumber = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
226            *
227            * @param buildNamespace the build namespace
228            * @param buildNumber the build number
229            * @return the matching service component, or <code>null</code> if a matching service component could not be found
230            * @throws SystemException if a system exception occurred
231            */
232            public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
233                    java.lang.String buildNamespace, long buildNumber)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Returns the service component where buildNamespace = &#63; and buildNumber = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
238            *
239            * @param buildNamespace the build namespace
240            * @param buildNumber the build number
241            * @param retrieveFromCache whether to use the finder cache
242            * @return the matching service component, or <code>null</code> if a matching service component could not be found
243            * @throws SystemException if a system exception occurred
244            */
245            public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
246                    java.lang.String buildNamespace, long buildNumber,
247                    boolean retrieveFromCache)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * Returns all the service components.
252            *
253            * @return the service components
254            * @throws SystemException if a system exception occurred
255            */
256            public java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * Returns a range of all the service components.
261            *
262            * <p>
263            * 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.
264            * </p>
265            *
266            * @param start the lower bound of the range of service components
267            * @param end the upper bound of the range of service components (not inclusive)
268            * @return the range of service components
269            * @throws SystemException if a system exception occurred
270            */
271            public java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
272                    int start, int end)
273                    throws com.liferay.portal.kernel.exception.SystemException;
274    
275            /**
276            * Returns an ordered range of all the service components.
277            *
278            * <p>
279            * 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.
280            * </p>
281            *
282            * @param start the lower bound of the range of service components
283            * @param end the upper bound of the range of service components (not inclusive)
284            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
285            * @return the ordered range of service components
286            * @throws SystemException if a system exception occurred
287            */
288            public java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
289                    int start, int end,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Removes all the service components where buildNamespace = &#63; from the database.
295            *
296            * @param buildNamespace the build namespace
297            * @throws SystemException if a system exception occurred
298            */
299            public void removeByBuildNamespace(java.lang.String buildNamespace)
300                    throws com.liferay.portal.kernel.exception.SystemException;
301    
302            /**
303            * Removes the service component where buildNamespace = &#63; and buildNumber = &#63; from the database.
304            *
305            * @param buildNamespace the build namespace
306            * @param buildNumber the build number
307            * @throws SystemException if a system exception occurred
308            */
309            public void removeByBNS_BNU(java.lang.String buildNamespace,
310                    long buildNumber)
311                    throws com.liferay.portal.NoSuchServiceComponentException,
312                            com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * Removes all the service components from the database.
316            *
317            * @throws SystemException if a system exception occurred
318            */
319            public void removeAll()
320                    throws com.liferay.portal.kernel.exception.SystemException;
321    
322            /**
323            * Returns the number of service components where buildNamespace = &#63;.
324            *
325            * @param buildNamespace the build namespace
326            * @return the number of matching service components
327            * @throws SystemException if a system exception occurred
328            */
329            public int countByBuildNamespace(java.lang.String buildNamespace)
330                    throws com.liferay.portal.kernel.exception.SystemException;
331    
332            /**
333            * Returns the number of service components where buildNamespace = &#63; and buildNumber = &#63;.
334            *
335            * @param buildNamespace the build namespace
336            * @param buildNumber the build number
337            * @return the number of matching service components
338            * @throws SystemException if a system exception occurred
339            */
340            public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber)
341                    throws com.liferay.portal.kernel.exception.SystemException;
342    
343            /**
344            * Returns the number of service components.
345            *
346            * @return the number of service components
347            * @throws SystemException if a system exception occurred
348            */
349            public int countAll()
350                    throws com.liferay.portal.kernel.exception.SystemException;
351    }