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