001    /**
002     * Copyright (c) 2000-present 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.Region;
020    
021    /**
022     * The persistence interface for the region 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 com.liferay.portal.service.persistence.impl.RegionPersistenceImpl
030     * @see RegionUtil
031     * @generated
032     */
033    @ProviderType
034    public interface RegionPersistence extends BasePersistence<Region> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link RegionUtil} to access the region persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the regions where countryId = &#63;.
043            *
044            * @param countryId the country ID
045            * @return the matching regions
046            */
047            public java.util.List<Region> findByCountryId(long countryId);
048    
049            /**
050            * Returns a range of all the regions where countryId = &#63;.
051            *
052            * <p>
053            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
054            * </p>
055            *
056            * @param countryId the country ID
057            * @param start the lower bound of the range of regions
058            * @param end the upper bound of the range of regions (not inclusive)
059            * @return the range of matching regions
060            */
061            public java.util.List<Region> findByCountryId(long countryId, int start,
062                    int end);
063    
064            /**
065            * Returns an ordered range of all the regions where countryId = &#63;.
066            *
067            * <p>
068            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
069            * </p>
070            *
071            * @param countryId the country ID
072            * @param start the lower bound of the range of regions
073            * @param end the upper bound of the range of regions (not inclusive)
074            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
075            * @return the ordered range of matching regions
076            */
077            public java.util.List<Region> findByCountryId(long countryId, int start,
078                    int end,
079                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
080    
081            /**
082            * Returns an ordered range of all the regions where countryId = &#63;.
083            *
084            * <p>
085            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
086            * </p>
087            *
088            * @param countryId the country ID
089            * @param start the lower bound of the range of regions
090            * @param end the upper bound of the range of regions (not inclusive)
091            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
092            * @param retrieveFromCache whether to retrieve from the finder cache
093            * @return the ordered range of matching regions
094            */
095            public java.util.List<Region> findByCountryId(long countryId, int start,
096                    int end,
097                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator,
098                    boolean retrieveFromCache);
099    
100            /**
101            * Returns the first region in the ordered set where countryId = &#63;.
102            *
103            * @param countryId the country ID
104            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
105            * @return the first matching region
106            * @throws NoSuchRegionException if a matching region could not be found
107            */
108            public Region findByCountryId_First(long countryId,
109                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
110                    throws com.liferay.portal.exception.NoSuchRegionException;
111    
112            /**
113            * Returns the first region in the ordered set where countryId = &#63;.
114            *
115            * @param countryId the country ID
116            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
117            * @return the first matching region, or <code>null</code> if a matching region could not be found
118            */
119            public Region fetchByCountryId_First(long countryId,
120                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
121    
122            /**
123            * Returns the last region in the ordered set where countryId = &#63;.
124            *
125            * @param countryId the country ID
126            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
127            * @return the last matching region
128            * @throws NoSuchRegionException if a matching region could not be found
129            */
130            public Region findByCountryId_Last(long countryId,
131                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
132                    throws com.liferay.portal.exception.NoSuchRegionException;
133    
134            /**
135            * Returns the last region in the ordered set where countryId = &#63;.
136            *
137            * @param countryId the country ID
138            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
139            * @return the last matching region, or <code>null</code> if a matching region could not be found
140            */
141            public Region fetchByCountryId_Last(long countryId,
142                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
143    
144            /**
145            * Returns the regions before and after the current region in the ordered set where countryId = &#63;.
146            *
147            * @param regionId the primary key of the current region
148            * @param countryId the country ID
149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
150            * @return the previous, current, and next region
151            * @throws NoSuchRegionException if a region with the primary key could not be found
152            */
153            public Region[] findByCountryId_PrevAndNext(long regionId, long countryId,
154                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
155                    throws com.liferay.portal.exception.NoSuchRegionException;
156    
157            /**
158            * Removes all the regions where countryId = &#63; from the database.
159            *
160            * @param countryId the country ID
161            */
162            public void removeByCountryId(long countryId);
163    
164            /**
165            * Returns the number of regions where countryId = &#63;.
166            *
167            * @param countryId the country ID
168            * @return the number of matching regions
169            */
170            public int countByCountryId(long countryId);
171    
172            /**
173            * Returns all the regions where active = &#63;.
174            *
175            * @param active the active
176            * @return the matching regions
177            */
178            public java.util.List<Region> findByActive(boolean active);
179    
180            /**
181            * Returns a range of all the regions where active = &#63;.
182            *
183            * <p>
184            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
185            * </p>
186            *
187            * @param active the active
188            * @param start the lower bound of the range of regions
189            * @param end the upper bound of the range of regions (not inclusive)
190            * @return the range of matching regions
191            */
192            public java.util.List<Region> findByActive(boolean active, int start,
193                    int end);
194    
195            /**
196            * Returns an ordered range of all the regions where active = &#63;.
197            *
198            * <p>
199            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
200            * </p>
201            *
202            * @param active the active
203            * @param start the lower bound of the range of regions
204            * @param end the upper bound of the range of regions (not inclusive)
205            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
206            * @return the ordered range of matching regions
207            */
208            public java.util.List<Region> findByActive(boolean active, int start,
209                    int end,
210                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
211    
212            /**
213            * Returns an ordered range of all the regions where active = &#63;.
214            *
215            * <p>
216            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
217            * </p>
218            *
219            * @param active the active
220            * @param start the lower bound of the range of regions
221            * @param end the upper bound of the range of regions (not inclusive)
222            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
223            * @param retrieveFromCache whether to retrieve from the finder cache
224            * @return the ordered range of matching regions
225            */
226            public java.util.List<Region> findByActive(boolean active, int start,
227                    int end,
228                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator,
229                    boolean retrieveFromCache);
230    
231            /**
232            * Returns the first region in the ordered set where active = &#63;.
233            *
234            * @param active the active
235            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
236            * @return the first matching region
237            * @throws NoSuchRegionException if a matching region could not be found
238            */
239            public Region findByActive_First(boolean active,
240                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
241                    throws com.liferay.portal.exception.NoSuchRegionException;
242    
243            /**
244            * Returns the first region in the ordered set where active = &#63;.
245            *
246            * @param active the active
247            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
248            * @return the first matching region, or <code>null</code> if a matching region could not be found
249            */
250            public Region fetchByActive_First(boolean active,
251                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
252    
253            /**
254            * Returns the last region in the ordered set where active = &#63;.
255            *
256            * @param active the active
257            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
258            * @return the last matching region
259            * @throws NoSuchRegionException if a matching region could not be found
260            */
261            public Region findByActive_Last(boolean active,
262                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
263                    throws com.liferay.portal.exception.NoSuchRegionException;
264    
265            /**
266            * Returns the last region in the ordered set where active = &#63;.
267            *
268            * @param active the active
269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
270            * @return the last matching region, or <code>null</code> if a matching region could not be found
271            */
272            public Region fetchByActive_Last(boolean active,
273                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
274    
275            /**
276            * Returns the regions before and after the current region in the ordered set where active = &#63;.
277            *
278            * @param regionId the primary key of the current region
279            * @param active the active
280            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
281            * @return the previous, current, and next region
282            * @throws NoSuchRegionException if a region with the primary key could not be found
283            */
284            public Region[] findByActive_PrevAndNext(long regionId, boolean active,
285                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
286                    throws com.liferay.portal.exception.NoSuchRegionException;
287    
288            /**
289            * Removes all the regions where active = &#63; from the database.
290            *
291            * @param active the active
292            */
293            public void removeByActive(boolean active);
294    
295            /**
296            * Returns the number of regions where active = &#63;.
297            *
298            * @param active the active
299            * @return the number of matching regions
300            */
301            public int countByActive(boolean active);
302    
303            /**
304            * Returns the region where countryId = &#63; and regionCode = &#63; or throws a {@link NoSuchRegionException} if it could not be found.
305            *
306            * @param countryId the country ID
307            * @param regionCode the region code
308            * @return the matching region
309            * @throws NoSuchRegionException if a matching region could not be found
310            */
311            public Region findByC_R(long countryId, java.lang.String regionCode)
312                    throws com.liferay.portal.exception.NoSuchRegionException;
313    
314            /**
315            * Returns the region where countryId = &#63; and regionCode = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
316            *
317            * @param countryId the country ID
318            * @param regionCode the region code
319            * @return the matching region, or <code>null</code> if a matching region could not be found
320            */
321            public Region fetchByC_R(long countryId, java.lang.String regionCode);
322    
323            /**
324            * Returns the region where countryId = &#63; and regionCode = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
325            *
326            * @param countryId the country ID
327            * @param regionCode the region code
328            * @param retrieveFromCache whether to retrieve from the finder cache
329            * @return the matching region, or <code>null</code> if a matching region could not be found
330            */
331            public Region fetchByC_R(long countryId, java.lang.String regionCode,
332                    boolean retrieveFromCache);
333    
334            /**
335            * Removes the region where countryId = &#63; and regionCode = &#63; from the database.
336            *
337            * @param countryId the country ID
338            * @param regionCode the region code
339            * @return the region that was removed
340            */
341            public Region removeByC_R(long countryId, java.lang.String regionCode)
342                    throws com.liferay.portal.exception.NoSuchRegionException;
343    
344            /**
345            * Returns the number of regions where countryId = &#63; and regionCode = &#63;.
346            *
347            * @param countryId the country ID
348            * @param regionCode the region code
349            * @return the number of matching regions
350            */
351            public int countByC_R(long countryId, java.lang.String regionCode);
352    
353            /**
354            * Returns all the regions where countryId = &#63; and active = &#63;.
355            *
356            * @param countryId the country ID
357            * @param active the active
358            * @return the matching regions
359            */
360            public java.util.List<Region> findByC_A(long countryId, boolean active);
361    
362            /**
363            * Returns a range of all the regions where countryId = &#63; and active = &#63;.
364            *
365            * <p>
366            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
367            * </p>
368            *
369            * @param countryId the country ID
370            * @param active the active
371            * @param start the lower bound of the range of regions
372            * @param end the upper bound of the range of regions (not inclusive)
373            * @return the range of matching regions
374            */
375            public java.util.List<Region> findByC_A(long countryId, boolean active,
376                    int start, int end);
377    
378            /**
379            * Returns an ordered range of all the regions where countryId = &#63; and active = &#63;.
380            *
381            * <p>
382            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
383            * </p>
384            *
385            * @param countryId the country ID
386            * @param active the active
387            * @param start the lower bound of the range of regions
388            * @param end the upper bound of the range of regions (not inclusive)
389            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
390            * @return the ordered range of matching regions
391            */
392            public java.util.List<Region> findByC_A(long countryId, boolean active,
393                    int start, int end,
394                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
395    
396            /**
397            * Returns an ordered range of all the regions where countryId = &#63; and active = &#63;.
398            *
399            * <p>
400            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
401            * </p>
402            *
403            * @param countryId the country ID
404            * @param active the active
405            * @param start the lower bound of the range of regions
406            * @param end the upper bound of the range of regions (not inclusive)
407            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
408            * @param retrieveFromCache whether to retrieve from the finder cache
409            * @return the ordered range of matching regions
410            */
411            public java.util.List<Region> findByC_A(long countryId, boolean active,
412                    int start, int end,
413                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator,
414                    boolean retrieveFromCache);
415    
416            /**
417            * Returns the first region in the ordered set where countryId = &#63; and active = &#63;.
418            *
419            * @param countryId the country ID
420            * @param active the active
421            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
422            * @return the first matching region
423            * @throws NoSuchRegionException if a matching region could not be found
424            */
425            public Region findByC_A_First(long countryId, boolean active,
426                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
427                    throws com.liferay.portal.exception.NoSuchRegionException;
428    
429            /**
430            * Returns the first region in the ordered set where countryId = &#63; and active = &#63;.
431            *
432            * @param countryId the country ID
433            * @param active the active
434            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
435            * @return the first matching region, or <code>null</code> if a matching region could not be found
436            */
437            public Region fetchByC_A_First(long countryId, boolean active,
438                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
439    
440            /**
441            * Returns the last region in the ordered set where countryId = &#63; and active = &#63;.
442            *
443            * @param countryId the country ID
444            * @param active the active
445            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
446            * @return the last matching region
447            * @throws NoSuchRegionException if a matching region could not be found
448            */
449            public Region findByC_A_Last(long countryId, boolean active,
450                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
451                    throws com.liferay.portal.exception.NoSuchRegionException;
452    
453            /**
454            * Returns the last region in the ordered set where countryId = &#63; and active = &#63;.
455            *
456            * @param countryId the country ID
457            * @param active the active
458            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
459            * @return the last matching region, or <code>null</code> if a matching region could not be found
460            */
461            public Region fetchByC_A_Last(long countryId, boolean active,
462                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
463    
464            /**
465            * Returns the regions before and after the current region in the ordered set where countryId = &#63; and active = &#63;.
466            *
467            * @param regionId the primary key of the current region
468            * @param countryId the country ID
469            * @param active the active
470            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
471            * @return the previous, current, and next region
472            * @throws NoSuchRegionException if a region with the primary key could not be found
473            */
474            public Region[] findByC_A_PrevAndNext(long regionId, long countryId,
475                    boolean active,
476                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator)
477                    throws com.liferay.portal.exception.NoSuchRegionException;
478    
479            /**
480            * Removes all the regions where countryId = &#63; and active = &#63; from the database.
481            *
482            * @param countryId the country ID
483            * @param active the active
484            */
485            public void removeByC_A(long countryId, boolean active);
486    
487            /**
488            * Returns the number of regions where countryId = &#63; and active = &#63;.
489            *
490            * @param countryId the country ID
491            * @param active the active
492            * @return the number of matching regions
493            */
494            public int countByC_A(long countryId, boolean active);
495    
496            /**
497            * Caches the region in the entity cache if it is enabled.
498            *
499            * @param region the region
500            */
501            public void cacheResult(Region region);
502    
503            /**
504            * Caches the regions in the entity cache if it is enabled.
505            *
506            * @param regions the regions
507            */
508            public void cacheResult(java.util.List<Region> regions);
509    
510            /**
511            * Creates a new region with the primary key. Does not add the region to the database.
512            *
513            * @param regionId the primary key for the new region
514            * @return the new region
515            */
516            public Region create(long regionId);
517    
518            /**
519            * Removes the region with the primary key from the database. Also notifies the appropriate model listeners.
520            *
521            * @param regionId the primary key of the region
522            * @return the region that was removed
523            * @throws NoSuchRegionException if a region with the primary key could not be found
524            */
525            public Region remove(long regionId)
526                    throws com.liferay.portal.exception.NoSuchRegionException;
527    
528            public Region updateImpl(Region region);
529    
530            /**
531            * Returns the region with the primary key or throws a {@link NoSuchRegionException} if it could not be found.
532            *
533            * @param regionId the primary key of the region
534            * @return the region
535            * @throws NoSuchRegionException if a region with the primary key could not be found
536            */
537            public Region findByPrimaryKey(long regionId)
538                    throws com.liferay.portal.exception.NoSuchRegionException;
539    
540            /**
541            * Returns the region with the primary key or returns <code>null</code> if it could not be found.
542            *
543            * @param regionId the primary key of the region
544            * @return the region, or <code>null</code> if a region with the primary key could not be found
545            */
546            public Region fetchByPrimaryKey(long regionId);
547    
548            @Override
549            public java.util.Map<java.io.Serializable, Region> fetchByPrimaryKeys(
550                    java.util.Set<java.io.Serializable> primaryKeys);
551    
552            /**
553            * Returns all the regions.
554            *
555            * @return the regions
556            */
557            public java.util.List<Region> findAll();
558    
559            /**
560            * Returns a range of all the regions.
561            *
562            * <p>
563            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
564            * </p>
565            *
566            * @param start the lower bound of the range of regions
567            * @param end the upper bound of the range of regions (not inclusive)
568            * @return the range of regions
569            */
570            public java.util.List<Region> findAll(int start, int end);
571    
572            /**
573            * Returns an ordered range of all the regions.
574            *
575            * <p>
576            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
577            * </p>
578            *
579            * @param start the lower bound of the range of regions
580            * @param end the upper bound of the range of regions (not inclusive)
581            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
582            * @return the ordered range of regions
583            */
584            public java.util.List<Region> findAll(int start, int end,
585                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator);
586    
587            /**
588            * Returns an ordered range of all the regions.
589            *
590            * <p>
591            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link RegionModelImpl}. 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.
592            * </p>
593            *
594            * @param start the lower bound of the range of regions
595            * @param end the upper bound of the range of regions (not inclusive)
596            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
597            * @param retrieveFromCache whether to retrieve from the finder cache
598            * @return the ordered range of regions
599            */
600            public java.util.List<Region> findAll(int start, int end,
601                    com.liferay.portal.kernel.util.OrderByComparator<Region> orderByComparator,
602                    boolean retrieveFromCache);
603    
604            /**
605            * Removes all the regions from the database.
606            */
607            public void removeAll();
608    
609            /**
610            * Returns the number of regions.
611            *
612            * @return the number of regions
613            */
614            public int countAll();
615    
616            @Override
617            public java.util.Set<java.lang.String> getBadColumnNames();
618    }