001    /**
002     * Copyright (c) 2000-2013 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 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            * @throws SystemException if a system exception occurred
047            */
048            public java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
049                    long organizationId)
050                    throws com.liferay.portal.kernel.exception.SystemException;
051    
052            /**
053            * Returns a range of all the org labors where organizationId = &#63;.
054            *
055            * <p>
056            * 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.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.
057            * </p>
058            *
059            * @param organizationId the organization ID
060            * @param start the lower bound of the range of org labors
061            * @param end the upper bound of the range of org labors (not inclusive)
062            * @return the range of matching org labors
063            * @throws SystemException if a system exception occurred
064            */
065            public java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
066                    long organizationId, int start, int end)
067                    throws com.liferay.portal.kernel.exception.SystemException;
068    
069            /**
070            * Returns an ordered range of all the org labors where organizationId = &#63;.
071            *
072            * <p>
073            * 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.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.
074            * </p>
075            *
076            * @param organizationId the organization ID
077            * @param start the lower bound of the range of org labors
078            * @param end the upper bound of the range of org labors (not inclusive)
079            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
080            * @return the ordered range of matching org labors
081            * @throws SystemException if a system exception occurred
082            */
083            public java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
084                    long organizationId, int start, int end,
085                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
086                    throws com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * Returns the first org labor in the ordered set where organizationId = &#63;.
090            *
091            * @param organizationId the organization ID
092            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
093            * @return the first matching org labor
094            * @throws com.liferay.portal.NoSuchOrgLaborException if a matching org labor could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.OrgLabor findByOrganizationId_First(
098                    long organizationId,
099                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
100                    throws com.liferay.portal.NoSuchOrgLaborException,
101                            com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Returns the first org labor in the ordered set where organizationId = &#63;.
105            *
106            * @param organizationId the organization ID
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the first matching org labor, or <code>null</code> if a matching org labor could not be found
109            * @throws SystemException if a system exception occurred
110            */
111            public com.liferay.portal.model.OrgLabor fetchByOrganizationId_First(
112                    long organizationId,
113                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns the last org labor in the ordered set where organizationId = &#63;.
118            *
119            * @param organizationId the organization ID
120            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
121            * @return the last matching org labor
122            * @throws com.liferay.portal.NoSuchOrgLaborException if a matching org labor could not be found
123            * @throws SystemException if a system exception occurred
124            */
125            public com.liferay.portal.model.OrgLabor findByOrganizationId_Last(
126                    long organizationId,
127                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
128                    throws com.liferay.portal.NoSuchOrgLaborException,
129                            com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * Returns the last org labor in the ordered set where organizationId = &#63;.
133            *
134            * @param organizationId the organization ID
135            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
136            * @return the last matching org labor, or <code>null</code> if a matching org labor could not be found
137            * @throws SystemException if a system exception occurred
138            */
139            public com.liferay.portal.model.OrgLabor fetchByOrganizationId_Last(
140                    long organizationId,
141                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142                    throws com.liferay.portal.kernel.exception.SystemException;
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 com.liferay.portal.NoSuchOrgLaborException if a org labor with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.OrgLabor[] findByOrganizationId_PrevAndNext(
155                    long orgLaborId, long organizationId,
156                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157                    throws com.liferay.portal.NoSuchOrgLaborException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Removes all the org labors where organizationId = &#63; from the database.
162            *
163            * @param organizationId the organization ID
164            * @throws SystemException if a system exception occurred
165            */
166            public void removeByOrganizationId(long organizationId)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            /**
170            * Returns the number of org labors where organizationId = &#63;.
171            *
172            * @param organizationId the organization ID
173            * @return the number of matching org labors
174            * @throws SystemException if a system exception occurred
175            */
176            public int countByOrganizationId(long organizationId)
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Caches the org labor in the entity cache if it is enabled.
181            *
182            * @param orgLabor the org labor
183            */
184            public void cacheResult(com.liferay.portal.model.OrgLabor orgLabor);
185    
186            /**
187            * Caches the org labors in the entity cache if it is enabled.
188            *
189            * @param orgLabors the org labors
190            */
191            public void cacheResult(
192                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors);
193    
194            /**
195            * Creates a new org labor with the primary key. Does not add the org labor to the database.
196            *
197            * @param orgLaborId the primary key for the new org labor
198            * @return the new org labor
199            */
200            public com.liferay.portal.model.OrgLabor create(long orgLaborId);
201    
202            /**
203            * Removes the org labor with the primary key from the database. Also notifies the appropriate model listeners.
204            *
205            * @param orgLaborId the primary key of the org labor
206            * @return the org labor that was removed
207            * @throws com.liferay.portal.NoSuchOrgLaborException if a org labor with the primary key could not be found
208            * @throws SystemException if a system exception occurred
209            */
210            public com.liferay.portal.model.OrgLabor remove(long orgLaborId)
211                    throws com.liferay.portal.NoSuchOrgLaborException,
212                            com.liferay.portal.kernel.exception.SystemException;
213    
214            public com.liferay.portal.model.OrgLabor updateImpl(
215                    com.liferay.portal.model.OrgLabor orgLabor)
216                    throws com.liferay.portal.kernel.exception.SystemException;
217    
218            /**
219            * Returns the org labor with the primary key or throws a {@link com.liferay.portal.NoSuchOrgLaborException} if it could not be found.
220            *
221            * @param orgLaborId the primary key of the org labor
222            * @return the org labor
223            * @throws com.liferay.portal.NoSuchOrgLaborException if a org labor with the primary key could not be found
224            * @throws SystemException if a system exception occurred
225            */
226            public com.liferay.portal.model.OrgLabor findByPrimaryKey(long orgLaborId)
227                    throws com.liferay.portal.NoSuchOrgLaborException,
228                            com.liferay.portal.kernel.exception.SystemException;
229    
230            /**
231            * Returns the org labor with the primary key or returns <code>null</code> if it could not be found.
232            *
233            * @param orgLaborId the primary key of the org labor
234            * @return the org labor, or <code>null</code> if a org labor with the primary key could not be found
235            * @throws SystemException if a system exception occurred
236            */
237            public com.liferay.portal.model.OrgLabor fetchByPrimaryKey(long orgLaborId)
238                    throws com.liferay.portal.kernel.exception.SystemException;
239    
240            /**
241            * Returns all the org labors.
242            *
243            * @return the org labors
244            * @throws SystemException if a system exception occurred
245            */
246            public java.util.List<com.liferay.portal.model.OrgLabor> findAll()
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns a 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 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.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            * @return the range of org labors
259            * @throws SystemException if a system exception occurred
260            */
261            public java.util.List<com.liferay.portal.model.OrgLabor> findAll(
262                    int start, int end)
263                    throws com.liferay.portal.kernel.exception.SystemException;
264    
265            /**
266            * Returns an ordered range of all the org labors.
267            *
268            * <p>
269            * 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.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.
270            * </p>
271            *
272            * @param start the lower bound of the range of org labors
273            * @param end the upper bound of the range of org labors (not inclusive)
274            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
275            * @return the ordered range of org labors
276            * @throws SystemException if a system exception occurred
277            */
278            public java.util.List<com.liferay.portal.model.OrgLabor> findAll(
279                    int start, int end,
280                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281                    throws com.liferay.portal.kernel.exception.SystemException;
282    
283            /**
284            * Removes all the org labors from the database.
285            *
286            * @throws SystemException if a system exception occurred
287            */
288            public void removeAll()
289                    throws com.liferay.portal.kernel.exception.SystemException;
290    
291            /**
292            * Returns the number of org labors.
293            *
294            * @return the number of org labors
295            * @throws SystemException if a system exception occurred
296            */
297            public int countAll()
298                    throws com.liferay.portal.kernel.exception.SystemException;
299    }