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