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