001    /**
002     * Copyright (c) 2000-2013 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            * @param buildNamespace the build namespace
156            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
157            * @return the first matching service component
158            * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
162                    java.lang.String buildNamespace,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.NoSuchServiceComponentException,
165                            com.liferay.portal.kernel.exception.SystemException;
166    
167            /**
168            * Returns the first service component in the ordered set where buildNamespace = &#63;.
169            *
170            * @param buildNamespace the build namespace
171            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
172            * @return the first matching service component, or <code>null</code> if a matching service component could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public com.liferay.portal.model.ServiceComponent fetchByBuildNamespace_First(
176                    java.lang.String buildNamespace,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.kernel.exception.SystemException;
179    
180            /**
181            * Returns the last service component in the ordered set where buildNamespace = &#63;.
182            *
183            * @param buildNamespace the build namespace
184            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
185            * @return the last matching service component
186            * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
190                    java.lang.String buildNamespace,
191                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
192                    throws com.liferay.portal.NoSuchServiceComponentException,
193                            com.liferay.portal.kernel.exception.SystemException;
194    
195            /**
196            * Returns the last service component in the ordered set where buildNamespace = &#63;.
197            *
198            * @param buildNamespace the build namespace
199            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
200            * @return the last matching service component, or <code>null</code> if a matching service component could not be found
201            * @throws SystemException if a system exception occurred
202            */
203            public com.liferay.portal.model.ServiceComponent fetchByBuildNamespace_Last(
204                    java.lang.String buildNamespace,
205                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            /**
209            * Returns the service components before and after the current service component in the ordered set where buildNamespace = &#63;.
210            *
211            * @param serviceComponentId the primary key of the current service component
212            * @param buildNamespace the build namespace
213            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
214            * @return the previous, current, and next service component
215            * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found
216            * @throws SystemException if a system exception occurred
217            */
218            public com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
219                    long serviceComponentId, java.lang.String buildNamespace,
220                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
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 throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found.
226            *
227            * @param buildNamespace the build namespace
228            * @param buildNumber the build number
229            * @return the matching service component
230            * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found
231            * @throws SystemException if a system exception occurred
232            */
233            public com.liferay.portal.model.ServiceComponent findByBNS_BNU(
234                    java.lang.String buildNamespace, long buildNumber)
235                    throws com.liferay.portal.NoSuchServiceComponentException,
236                            com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * 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.
240            *
241            * @param buildNamespace the build namespace
242            * @param buildNumber the build number
243            * @return the matching service component, or <code>null</code> if a matching service component could not be found
244            * @throws SystemException if a system exception occurred
245            */
246            public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
247                    java.lang.String buildNamespace, long buildNumber)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * 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.
252            *
253            * @param buildNamespace the build namespace
254            * @param buildNumber the build number
255            * @param retrieveFromCache whether to use the finder cache
256            * @return the matching service component, or <code>null</code> if a matching service component could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
260                    java.lang.String buildNamespace, long buildNumber,
261                    boolean retrieveFromCache)
262                    throws com.liferay.portal.kernel.exception.SystemException;
263    
264            /**
265            * Returns all the service components.
266            *
267            * @return the service components
268            * @throws SystemException if a system exception occurred
269            */
270            public java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
271                    throws com.liferay.portal.kernel.exception.SystemException;
272    
273            /**
274            * Returns a range of all the service components.
275            *
276            * <p>
277            * 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.
278            * </p>
279            *
280            * @param start the lower bound of the range of service components
281            * @param end the upper bound of the range of service components (not inclusive)
282            * @return the range of service components
283            * @throws SystemException if a system exception occurred
284            */
285            public java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
286                    int start, int end)
287                    throws com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * Returns an ordered range of all the service components.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param start the lower bound of the range of service components
297            * @param end the upper bound of the range of service components (not inclusive)
298            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
299            * @return the ordered range of service components
300            * @throws SystemException if a system exception occurred
301            */
302            public java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
303                    int start, int end,
304                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
305                    throws com.liferay.portal.kernel.exception.SystemException;
306    
307            /**
308            * Removes all the service components where buildNamespace = &#63; from the database.
309            *
310            * @param buildNamespace the build namespace
311            * @throws SystemException if a system exception occurred
312            */
313            public void removeByBuildNamespace(java.lang.String buildNamespace)
314                    throws com.liferay.portal.kernel.exception.SystemException;
315    
316            /**
317            * Removes the service component where buildNamespace = &#63; and buildNumber = &#63; from the database.
318            *
319            * @param buildNamespace the build namespace
320            * @param buildNumber the build number
321            * @return the service component that was removed
322            * @throws SystemException if a system exception occurred
323            */
324            public com.liferay.portal.model.ServiceComponent removeByBNS_BNU(
325                    java.lang.String buildNamespace, long buildNumber)
326                    throws com.liferay.portal.NoSuchServiceComponentException,
327                            com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Removes all the service components from the database.
331            *
332            * @throws SystemException if a system exception occurred
333            */
334            public void removeAll()
335                    throws com.liferay.portal.kernel.exception.SystemException;
336    
337            /**
338            * Returns the number of service components where buildNamespace = &#63;.
339            *
340            * @param buildNamespace the build namespace
341            * @return the number of matching service components
342            * @throws SystemException if a system exception occurred
343            */
344            public int countByBuildNamespace(java.lang.String buildNamespace)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    
347            /**
348            * Returns the number of service components where buildNamespace = &#63; and buildNumber = &#63;.
349            *
350            * @param buildNamespace the build namespace
351            * @param buildNumber the build number
352            * @return the number of matching service components
353            * @throws SystemException if a system exception occurred
354            */
355            public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber)
356                    throws com.liferay.portal.kernel.exception.SystemException;
357    
358            /**
359            * Returns the number of service components.
360            *
361            * @return the number of service components
362            * @throws SystemException if a system exception occurred
363            */
364            public int countAll()
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    }