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.exception.NoSuchOrgLaborException;
020    import com.liferay.portal.model.OrgLabor;
021    
022    /**
023     * The persistence interface for the org labor 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.OrgLaborPersistenceImpl
031     * @see OrgLaborUtil
032     * @generated
033     */
034    @ProviderType
035    public interface OrgLaborPersistence extends BasePersistence<OrgLabor> {
036            /*
037             * NOTE FOR DEVELOPERS:
038             *
039             * 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.
040             */
041    
042            /**
043            * Returns all the org labors where organizationId = &#63;.
044            *
045            * @param organizationId the organization ID
046            * @return the matching org labors
047            */
048            public java.util.List<OrgLabor> findByOrganizationId(long organizationId);
049    
050            /**
051            * Returns a range of all the org labors where organizationId = &#63;.
052            *
053            * <p>
054            * 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.
055            * </p>
056            *
057            * @param organizationId the organization ID
058            * @param start the lower bound of the range of org labors
059            * @param end the upper bound of the range of org labors (not inclusive)
060            * @return the range of matching org labors
061            */
062            public java.util.List<OrgLabor> findByOrganizationId(long organizationId,
063                    int start, int end);
064    
065            /**
066            * Returns an ordered range of all the org labors where organizationId = &#63;.
067            *
068            * <p>
069            * 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.
070            * </p>
071            *
072            * @param organizationId the organization ID
073            * @param start the lower bound of the range of org labors
074            * @param end the upper bound of the range of org labors (not inclusive)
075            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
076            * @return the ordered range of matching org labors
077            */
078            public java.util.List<OrgLabor> findByOrganizationId(long organizationId,
079                    int start, int end,
080                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator);
081    
082            /**
083            * Returns an ordered range of all the org labors where organizationId = &#63;.
084            *
085            * <p>
086            * 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.
087            * </p>
088            *
089            * @param organizationId the organization ID
090            * @param start the lower bound of the range of org labors
091            * @param end the upper bound of the range of org labors (not inclusive)
092            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
093            * @param retrieveFromCache whether to retrieve from the finder cache
094            * @return the ordered range of matching org labors
095            */
096            public java.util.List<OrgLabor> findByOrganizationId(long organizationId,
097                    int start, int end,
098                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator,
099                    boolean retrieveFromCache);
100    
101            /**
102            * Returns the first org labor in the ordered set where organizationId = &#63;.
103            *
104            * @param organizationId the organization ID
105            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
106            * @return the first matching org labor
107            * @throws NoSuchOrgLaborException if a matching org labor could not be found
108            */
109            public OrgLabor findByOrganizationId_First(long organizationId,
110                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator)
111                    throws NoSuchOrgLaborException;
112    
113            /**
114            * Returns the first org labor in the ordered set where organizationId = &#63;.
115            *
116            * @param organizationId the organization ID
117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
118            * @return the first matching org labor, or <code>null</code> if a matching org labor could not be found
119            */
120            public OrgLabor fetchByOrganizationId_First(long organizationId,
121                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator);
122    
123            /**
124            * Returns the last org labor in the ordered set where organizationId = &#63;.
125            *
126            * @param organizationId the organization ID
127            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
128            * @return the last matching org labor
129            * @throws NoSuchOrgLaborException if a matching org labor could not be found
130            */
131            public OrgLabor findByOrganizationId_Last(long organizationId,
132                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator)
133                    throws NoSuchOrgLaborException;
134    
135            /**
136            * Returns the last org labor in the ordered set where organizationId = &#63;.
137            *
138            * @param organizationId the organization ID
139            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
140            * @return the last matching org labor, or <code>null</code> if a matching org labor could not be found
141            */
142            public OrgLabor fetchByOrganizationId_Last(long organizationId,
143                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator);
144    
145            /**
146            * Returns the org labors before and after the current org labor in the ordered set where organizationId = &#63;.
147            *
148            * @param orgLaborId the primary key of the current org labor
149            * @param organizationId the organization ID
150            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
151            * @return the previous, current, and next org labor
152            * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found
153            */
154            public OrgLabor[] findByOrganizationId_PrevAndNext(long orgLaborId,
155                    long organizationId,
156                    com.liferay.portal.kernel.util.OrderByComparator<OrgLabor> orderByComparator)
157                    throws NoSuchOrgLaborException;
158    
159            /**
160            * Removes all the org labors where organizationId = &#63; from the database.
161            *
162            * @param organizationId the organization ID
163            */
164            public void removeByOrganizationId(long organizationId);
165    
166            /**
167            * Returns the number of org labors where organizationId = &#63;.
168            *
169            * @param organizationId the organization ID
170            * @return the number of matching org labors
171            */
172            public int countByOrganizationId(long organizationId);
173    
174            /**
175            * Caches the org labor in the entity cache if it is enabled.
176            *
177            * @param orgLabor the org labor
178            */
179            public void cacheResult(OrgLabor orgLabor);
180    
181            /**
182            * Caches the org labors in the entity cache if it is enabled.
183            *
184            * @param orgLabors the org labors
185            */
186            public void cacheResult(java.util.List<OrgLabor> orgLabors);
187    
188            /**
189            * Creates a new org labor with the primary key. Does not add the org labor to the database.
190            *
191            * @param orgLaborId the primary key for the new org labor
192            * @return the new org labor
193            */
194            public OrgLabor create(long orgLaborId);
195    
196            /**
197            * Removes the org labor with the primary key from the database. Also notifies the appropriate model listeners.
198            *
199            * @param orgLaborId the primary key of the org labor
200            * @return the org labor that was removed
201            * @throws NoSuchOrgLaborException if a org labor with the primary key could not be found
202            */
203            public OrgLabor remove(long orgLaborId) throws 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 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    }