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