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