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