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.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.OrgLabor;
020    
021    /**
022     * The persistence interface for the org labor service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see com.liferay.portal.service.persistence.impl.OrgLaborPersistenceImpl
030     * @see OrgLaborUtil
031     * @generated
032     */
033    @ProviderType
034    public interface OrgLaborPersistence extends BasePersistence<OrgLabor> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link OrgLaborUtil} to access the org labor persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the org labors where organizationId = &#63;.
043            *
044            * @param organizationId the organization ID
045            * @return the matching org labors
046            */
047            public java.util.List<OrgLabor> findByOrganizationId(long organizationId);
048    
049            /**
050            * Returns a range of all the org labors where organizationId = &#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 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 OrgLaborModelImpl}. 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 organizationId the organization ID
057            * @param start the lower bound of the range of org labors
058            * @param end the upper bound of the range of org labors (not inclusive)
059            * @return the range of matching org labors
060            */
061            public java.util.List<OrgLabor> findByOrganizationId(long organizationId,
062                    int start, int end);
063    
064            /**
065            * Returns an ordered range of all the org labors where organizationId = &#63;.
066            *
067            * <p>
068            * 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 OrgLaborModelImpl}. 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.
069            * </p>
070            *
071            * @param organizationId the organization ID
072            * @param start the lower bound of the range of org labors
073            * @param end the upper bound of the range of org labors (not inclusive)
074            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
075            * @return the ordered range of matching org labors
076            */
077            public java.util.List<OrgLabor> findByOrganizationId(long organizationId,
078                    int start, int end,
079                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator);
080    
081            /**
082            * Returns an ordered range of all the org labors where organizationId = &#63;.
083            *
084            * <p>
085            * 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 OrgLaborModelImpl}. 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.
086            * </p>
087            *
088            * @param organizationId the organization ID
089            * @param start the lower bound of the range of org labors
090            * @param end the upper bound of the range of org labors (not inclusive)
091            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
092            * @param retrieveFromCache whether to retrieve from the finder cache
093            * @return the ordered range of matching org labors
094            */
095            public java.util.List<OrgLabor> findByOrganizationId(long organizationId,
096                    int start, int end,
097                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator,
098                    boolean retrieveFromCache);
099    
100            /**
101            * Returns the first org labor in the ordered set where organizationId = &#63;.
102            *
103            * @param organizationId the organization ID
104            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
105            * @return the first matching org labor
106            * @throws NoSuchOrgLaborException if a matching org labor could not be found
107            */
108            public OrgLabor findByOrganizationId_First(long organizationId,
109                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator)
110                    throws com.liferay.portal.exception.NoSuchOrgLaborException;
111    
112            /**
113            * Returns the first org labor in the ordered set where organizationId = &#63;.
114            *
115            * @param organizationId the organization ID
116            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
117            * @return the first matching org labor, or <code>null</code> if a matching org labor could not be found
118            */
119            public OrgLabor fetchByOrganizationId_First(long organizationId,
120                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator);
121    
122            /**
123            * Returns the last org labor in the ordered set where organizationId = &#63;.
124            *
125            * @param organizationId the organization ID
126            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
127            * @return the last matching org labor
128            * @throws NoSuchOrgLaborException if a matching org labor could not be found
129            */
130            public OrgLabor findByOrganizationId_Last(long organizationId,
131                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator)
132                    throws com.liferay.portal.exception.NoSuchOrgLaborException;
133    
134            /**
135            * Returns the last org labor in the ordered set where organizationId = &#63;.
136            *
137            * @param organizationId the organization ID
138            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
139            * @return the last matching org labor, or <code>null</code> if a matching org labor could not be found
140            */
141            public OrgLabor fetchByOrganizationId_Last(long organizationId,
142                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator);
143    
144            /**
145            * Returns the org labors before and after the current org labor in the ordered set where organizationId = &#63;.
146            *
147            * @param orgLaborId the primary key of the current org labor
148            * @param organizationId the organization ID
149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
150            * @return the previous, current, and next org labor
151            * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found
152            */
153            public OrgLabor[] findByOrganizationId_PrevAndNext(long orgLaborId,
154                    long organizationId,
155                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator)
156                    throws com.liferay.portal.exception.NoSuchOrgLaborException;
157    
158            /**
159            * Removes all the org labors where organizationId = &#63; from the database.
160            *
161            * @param organizationId the organization ID
162            */
163            public void removeByOrganizationId(long organizationId);
164    
165            /**
166            * Returns the number of org labors where organizationId = &#63;.
167            *
168            * @param organizationId the organization ID
169            * @return the number of matching org labors
170            */
171            public int countByOrganizationId(long organizationId);
172    
173            /**
174            * Caches the org labor in the entity cache if it is enabled.
175            *
176            * @param orgLabor the org labor
177            */
178            public void cacheResult(OrgLabor orgLabor);
179    
180            /**
181            * Caches the org labors in the entity cache if it is enabled.
182            *
183            * @param orgLabors the org labors
184            */
185            public void cacheResult(java.util.List<OrgLabor> orgLabors);
186    
187            /**
188            * Creates a new org labor with the primary key. Does not add the org labor to the database.
189            *
190            * @param orgLaborId the primary key for the new org labor
191            * @return the new org labor
192            */
193            public OrgLabor create(long orgLaborId);
194    
195            /**
196            * Removes the org labor with the primary key from the database. Also notifies the appropriate model listeners.
197            *
198            * @param orgLaborId the primary key of the org labor
199            * @return the org labor that was removed
200            * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found
201            */
202            public OrgLabor remove(long orgLaborId)
203                    throws com.liferay.portal.exception.NoSuchOrgLaborException;
204    
205            public OrgLabor updateImpl(OrgLabor orgLabor);
206    
207            /**
208            * Returns the org labor with the primary key or throws a {@link NoSuchOrgLaborException} if it could not be found.
209            *
210            * @param orgLaborId the primary key of the org labor
211            * @return the org labor
212            * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found
213            */
214            public OrgLabor findByPrimaryKey(long orgLaborId)
215                    throws com.liferay.portal.exception.NoSuchOrgLaborException;
216    
217            /**
218            * Returns the org labor with the primary key or returns <code>null</code> if it could not be found.
219            *
220            * @param orgLaborId the primary key of the org labor
221            * @return the org labor, or <code>null</code> if a org labor with the primary key could not be found
222            */
223            public OrgLabor fetchByPrimaryKey(long orgLaborId);
224    
225            @Override
226            public java.util.Map<java.io.Serializable, OrgLabor> fetchByPrimaryKeys(
227                    java.util.Set<java.io.Serializable> primaryKeys);
228    
229            /**
230            * Returns all the org labors.
231            *
232            * @return the org labors
233            */
234            public java.util.List<OrgLabor> findAll();
235    
236            /**
237            * Returns a range of all the org labors.
238            *
239            * <p>
240            * 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 OrgLaborModelImpl}. 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.
241            * </p>
242            *
243            * @param start the lower bound of the range of org labors
244            * @param end the upper bound of the range of org labors (not inclusive)
245            * @return the range of org labors
246            */
247            public java.util.List<OrgLabor> findAll(int start, int end);
248    
249            /**
250            * Returns an ordered range of all the org labors.
251            *
252            * <p>
253            * 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 OrgLaborModelImpl}. 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.
254            * </p>
255            *
256            * @param start the lower bound of the range of org labors
257            * @param end the upper bound of the range of org labors (not inclusive)
258            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
259            * @return the ordered range of org labors
260            */
261            public java.util.List<OrgLabor> findAll(int start, int end,
262                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator);
263    
264            /**
265            * Returns an ordered range of all the org labors.
266            *
267            * <p>
268            * 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 OrgLaborModelImpl}. 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.
269            * </p>
270            *
271            * @param start the lower bound of the range of org labors
272            * @param end the upper bound of the range of org labors (not inclusive)
273            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
274            * @param retrieveFromCache whether to retrieve from the finder cache
275            * @return the ordered range of org labors
276            */
277            public java.util.List<OrgLabor> findAll(int start, int end,
278                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator,
279                    boolean retrieveFromCache);
280    
281            /**
282            * Removes all the org labors from the database.
283            */
284            public void removeAll();
285    
286            /**
287            * Returns the number of org labors.
288            *
289            * @return the number of org labors
290            */
291            public int countAll();
292    }