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