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.portlet.asset.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.asset.model.AssetCategoryProperty;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the asset category property service. This utility wraps {@link AssetCategoryPropertyPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see AssetCategoryPropertyPersistence
037     * @see AssetCategoryPropertyPersistenceImpl
038     * @generated
039     */
040    public class AssetCategoryPropertyUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(AssetCategoryProperty assetCategoryProperty) {
058                    getPersistence().clearCache(assetCategoryProperty);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<AssetCategoryProperty> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<AssetCategoryProperty> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<AssetCategoryProperty> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
099             */
100            public static AssetCategoryProperty remove(
101                    AssetCategoryProperty assetCategoryProperty) throws SystemException {
102                    return getPersistence().remove(assetCategoryProperty);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
107             */
108            public static AssetCategoryProperty update(
109                    AssetCategoryProperty assetCategoryProperty, boolean merge)
110                    throws SystemException {
111                    return getPersistence().update(assetCategoryProperty, merge);
112            }
113    
114            /**
115             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
116             */
117            public static AssetCategoryProperty update(
118                    AssetCategoryProperty assetCategoryProperty, boolean merge,
119                    ServiceContext serviceContext) throws SystemException {
120                    return getPersistence()
121                                       .update(assetCategoryProperty, merge, serviceContext);
122            }
123    
124            /**
125            * Caches the asset category property in the entity cache if it is enabled.
126            *
127            * @param assetCategoryProperty the asset category property to cache
128            */
129            public static void cacheResult(
130                    com.liferay.portlet.asset.model.AssetCategoryProperty assetCategoryProperty) {
131                    getPersistence().cacheResult(assetCategoryProperty);
132            }
133    
134            /**
135            * Caches the asset category properties in the entity cache if it is enabled.
136            *
137            * @param assetCategoryProperties the asset category properties to cache
138            */
139            public static void cacheResult(
140                    java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> assetCategoryProperties) {
141                    getPersistence().cacheResult(assetCategoryProperties);
142            }
143    
144            /**
145            * Creates a new asset category property with the primary key. Does not add the asset category property to the database.
146            *
147            * @param categoryPropertyId the primary key for the new asset category property
148            * @return the new asset category property
149            */
150            public static com.liferay.portlet.asset.model.AssetCategoryProperty create(
151                    long categoryPropertyId) {
152                    return getPersistence().create(categoryPropertyId);
153            }
154    
155            /**
156            * Removes the asset category property with the primary key from the database. Also notifies the appropriate model listeners.
157            *
158            * @param categoryPropertyId the primary key of the asset category property to remove
159            * @return the asset category property that was removed
160            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a asset category property with the primary key could not be found
161            * @throws SystemException if a system exception occurred
162            */
163            public static com.liferay.portlet.asset.model.AssetCategoryProperty remove(
164                    long categoryPropertyId)
165                    throws com.liferay.portal.kernel.exception.SystemException,
166                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
167                    return getPersistence().remove(categoryPropertyId);
168            }
169    
170            public static com.liferay.portlet.asset.model.AssetCategoryProperty updateImpl(
171                    com.liferay.portlet.asset.model.AssetCategoryProperty assetCategoryProperty,
172                    boolean merge)
173                    throws com.liferay.portal.kernel.exception.SystemException {
174                    return getPersistence().updateImpl(assetCategoryProperty, merge);
175            }
176    
177            /**
178            * Finds the asset category property with the primary key or throws a {@link com.liferay.portlet.asset.NoSuchCategoryPropertyException} if it could not be found.
179            *
180            * @param categoryPropertyId the primary key of the asset category property to find
181            * @return the asset category property
182            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a asset category property with the primary key could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByPrimaryKey(
186                    long categoryPropertyId)
187                    throws com.liferay.portal.kernel.exception.SystemException,
188                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
189                    return getPersistence().findByPrimaryKey(categoryPropertyId);
190            }
191    
192            /**
193            * Finds the asset category property with the primary key or returns <code>null</code> if it could not be found.
194            *
195            * @param categoryPropertyId the primary key of the asset category property to find
196            * @return the asset category property, or <code>null</code> if a asset category property with the primary key could not be found
197            * @throws SystemException if a system exception occurred
198            */
199            public static com.liferay.portlet.asset.model.AssetCategoryProperty fetchByPrimaryKey(
200                    long categoryPropertyId)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence().fetchByPrimaryKey(categoryPropertyId);
203            }
204    
205            /**
206            * Finds all the asset category properties where companyId = &#63;.
207            *
208            * @param companyId the company ID to search with
209            * @return the matching asset category properties
210            * @throws SystemException if a system exception occurred
211            */
212            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByCompanyId(
213                    long companyId)
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return getPersistence().findByCompanyId(companyId);
216            }
217    
218            /**
219            * Finds a range of all the asset category properties where companyId = &#63;.
220            *
221            * <p>
222            * 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.
223            * </p>
224            *
225            * @param companyId the company ID to search with
226            * @param start the lower bound of the range of asset category properties to return
227            * @param end the upper bound of the range of asset category properties to return (not inclusive)
228            * @return the range of matching asset category properties
229            * @throws SystemException if a system exception occurred
230            */
231            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByCompanyId(
232                    long companyId, int start, int end)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getPersistence().findByCompanyId(companyId, start, end);
235            }
236    
237            /**
238            * Finds an ordered range of all the asset category properties where companyId = &#63;.
239            *
240            * <p>
241            * 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.
242            * </p>
243            *
244            * @param companyId the company ID to search with
245            * @param start the lower bound of the range of asset category properties to return
246            * @param end the upper bound of the range of asset category properties to return (not inclusive)
247            * @param orderByComparator the comparator to order the results by
248            * @return the ordered range of matching asset category properties
249            * @throws SystemException if a system exception occurred
250            */
251            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByCompanyId(
252                    long companyId, int start, int end,
253                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getPersistence()
256                                       .findByCompanyId(companyId, start, end, orderByComparator);
257            }
258    
259            /**
260            * Finds the first asset category property in the ordered set where companyId = &#63;.
261            *
262            * <p>
263            * 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.
264            * </p>
265            *
266            * @param companyId the company ID to search with
267            * @param orderByComparator the comparator to order the set by
268            * @return the first matching asset category property
269            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a matching asset category property could not be found
270            * @throws SystemException if a system exception occurred
271            */
272            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByCompanyId_First(
273                    long companyId,
274                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275                    throws com.liferay.portal.kernel.exception.SystemException,
276                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
277                    return getPersistence()
278                                       .findByCompanyId_First(companyId, orderByComparator);
279            }
280    
281            /**
282            * Finds the last asset category property in the ordered set where companyId = &#63;.
283            *
284            * <p>
285            * 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.
286            * </p>
287            *
288            * @param companyId the company ID to search with
289            * @param orderByComparator the comparator to order the set by
290            * @return the last matching asset category property
291            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a matching asset category property could not be found
292            * @throws SystemException if a system exception occurred
293            */
294            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByCompanyId_Last(
295                    long companyId,
296                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
297                    throws com.liferay.portal.kernel.exception.SystemException,
298                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
299                    return getPersistence()
300                                       .findByCompanyId_Last(companyId, orderByComparator);
301            }
302    
303            /**
304            * Finds the asset category properties before and after the current asset category property in the ordered set where companyId = &#63;.
305            *
306            * <p>
307            * 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.
308            * </p>
309            *
310            * @param categoryPropertyId the primary key of the current asset category property
311            * @param companyId the company ID to search with
312            * @param orderByComparator the comparator to order the set by
313            * @return the previous, current, and next asset category property
314            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a asset category property with the primary key could not be found
315            * @throws SystemException if a system exception occurred
316            */
317            public static com.liferay.portlet.asset.model.AssetCategoryProperty[] findByCompanyId_PrevAndNext(
318                    long categoryPropertyId, long companyId,
319                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
320                    throws com.liferay.portal.kernel.exception.SystemException,
321                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
322                    return getPersistence()
323                                       .findByCompanyId_PrevAndNext(categoryPropertyId, companyId,
324                            orderByComparator);
325            }
326    
327            /**
328            * Finds all the asset category properties where categoryId = &#63;.
329            *
330            * @param categoryId the category ID to search with
331            * @return the matching asset category properties
332            * @throws SystemException if a system exception occurred
333            */
334            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByCategoryId(
335                    long categoryId)
336                    throws com.liferay.portal.kernel.exception.SystemException {
337                    return getPersistence().findByCategoryId(categoryId);
338            }
339    
340            /**
341            * Finds a range of all the asset category properties where categoryId = &#63;.
342            *
343            * <p>
344            * 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.
345            * </p>
346            *
347            * @param categoryId the category ID to search with
348            * @param start the lower bound of the range of asset category properties to return
349            * @param end the upper bound of the range of asset category properties to return (not inclusive)
350            * @return the range of matching asset category properties
351            * @throws SystemException if a system exception occurred
352            */
353            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByCategoryId(
354                    long categoryId, int start, int end)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return getPersistence().findByCategoryId(categoryId, start, end);
357            }
358    
359            /**
360            * Finds an ordered range of all the asset category properties where categoryId = &#63;.
361            *
362            * <p>
363            * 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.
364            * </p>
365            *
366            * @param categoryId the category ID to search with
367            * @param start the lower bound of the range of asset category properties to return
368            * @param end the upper bound of the range of asset category properties to return (not inclusive)
369            * @param orderByComparator the comparator to order the results by
370            * @return the ordered range of matching asset category properties
371            * @throws SystemException if a system exception occurred
372            */
373            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByCategoryId(
374                    long categoryId, int start, int end,
375                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
376                    throws com.liferay.portal.kernel.exception.SystemException {
377                    return getPersistence()
378                                       .findByCategoryId(categoryId, start, end, orderByComparator);
379            }
380    
381            /**
382            * Finds the first asset category property in the ordered set where categoryId = &#63;.
383            *
384            * <p>
385            * 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.
386            * </p>
387            *
388            * @param categoryId the category ID to search with
389            * @param orderByComparator the comparator to order the set by
390            * @return the first matching asset category property
391            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a matching asset category property could not be found
392            * @throws SystemException if a system exception occurred
393            */
394            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByCategoryId_First(
395                    long categoryId,
396                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
397                    throws com.liferay.portal.kernel.exception.SystemException,
398                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
399                    return getPersistence()
400                                       .findByCategoryId_First(categoryId, orderByComparator);
401            }
402    
403            /**
404            * Finds the last asset category property in the ordered set where categoryId = &#63;.
405            *
406            * <p>
407            * 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.
408            * </p>
409            *
410            * @param categoryId the category ID to search with
411            * @param orderByComparator the comparator to order the set by
412            * @return the last matching asset category property
413            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a matching asset category property could not be found
414            * @throws SystemException if a system exception occurred
415            */
416            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByCategoryId_Last(
417                    long categoryId,
418                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
419                    throws com.liferay.portal.kernel.exception.SystemException,
420                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
421                    return getPersistence()
422                                       .findByCategoryId_Last(categoryId, orderByComparator);
423            }
424    
425            /**
426            * Finds the asset category properties before and after the current asset category property in the ordered set where categoryId = &#63;.
427            *
428            * <p>
429            * 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.
430            * </p>
431            *
432            * @param categoryPropertyId the primary key of the current asset category property
433            * @param categoryId the category ID to search with
434            * @param orderByComparator the comparator to order the set by
435            * @return the previous, current, and next asset category property
436            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a asset category property with the primary key could not be found
437            * @throws SystemException if a system exception occurred
438            */
439            public static com.liferay.portlet.asset.model.AssetCategoryProperty[] findByCategoryId_PrevAndNext(
440                    long categoryPropertyId, long categoryId,
441                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
442                    throws com.liferay.portal.kernel.exception.SystemException,
443                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
444                    return getPersistence()
445                                       .findByCategoryId_PrevAndNext(categoryPropertyId,
446                            categoryId, orderByComparator);
447            }
448    
449            /**
450            * Finds all the asset category properties where companyId = &#63; and key = &#63;.
451            *
452            * @param companyId the company ID to search with
453            * @param key the key to search with
454            * @return the matching asset category properties
455            * @throws SystemException if a system exception occurred
456            */
457            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByC_K(
458                    long companyId, java.lang.String key)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().findByC_K(companyId, key);
461            }
462    
463            /**
464            * Finds a range of all the asset category properties where companyId = &#63; and key = &#63;.
465            *
466            * <p>
467            * 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.
468            * </p>
469            *
470            * @param companyId the company ID to search with
471            * @param key the key to search with
472            * @param start the lower bound of the range of asset category properties to return
473            * @param end the upper bound of the range of asset category properties to return (not inclusive)
474            * @return the range of matching asset category properties
475            * @throws SystemException if a system exception occurred
476            */
477            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByC_K(
478                    long companyId, java.lang.String key, int start, int end)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return getPersistence().findByC_K(companyId, key, start, end);
481            }
482    
483            /**
484            * Finds an ordered range of all the asset category properties where companyId = &#63; and key = &#63;.
485            *
486            * <p>
487            * 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.
488            * </p>
489            *
490            * @param companyId the company ID to search with
491            * @param key the key to search with
492            * @param start the lower bound of the range of asset category properties to return
493            * @param end the upper bound of the range of asset category properties to return (not inclusive)
494            * @param orderByComparator the comparator to order the results by
495            * @return the ordered range of matching asset category properties
496            * @throws SystemException if a system exception occurred
497            */
498            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findByC_K(
499                    long companyId, java.lang.String key, int start, int end,
500                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
501                    throws com.liferay.portal.kernel.exception.SystemException {
502                    return getPersistence()
503                                       .findByC_K(companyId, key, start, end, orderByComparator);
504            }
505    
506            /**
507            * Finds the first asset category property in the ordered set where companyId = &#63; and key = &#63;.
508            *
509            * <p>
510            * 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.
511            * </p>
512            *
513            * @param companyId the company ID to search with
514            * @param key the key to search with
515            * @param orderByComparator the comparator to order the set by
516            * @return the first matching asset category property
517            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a matching asset category property could not be found
518            * @throws SystemException if a system exception occurred
519            */
520            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByC_K_First(
521                    long companyId, java.lang.String key,
522                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
523                    throws com.liferay.portal.kernel.exception.SystemException,
524                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
525                    return getPersistence()
526                                       .findByC_K_First(companyId, key, orderByComparator);
527            }
528    
529            /**
530            * Finds the last asset category property in the ordered set where companyId = &#63; and key = &#63;.
531            *
532            * <p>
533            * 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.
534            * </p>
535            *
536            * @param companyId the company ID to search with
537            * @param key the key to search with
538            * @param orderByComparator the comparator to order the set by
539            * @return the last matching asset category property
540            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a matching asset category property could not be found
541            * @throws SystemException if a system exception occurred
542            */
543            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByC_K_Last(
544                    long companyId, java.lang.String key,
545                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
546                    throws com.liferay.portal.kernel.exception.SystemException,
547                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
548                    return getPersistence().findByC_K_Last(companyId, key, orderByComparator);
549            }
550    
551            /**
552            * Finds the asset category properties before and after the current asset category property in the ordered set where companyId = &#63; and key = &#63;.
553            *
554            * <p>
555            * 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.
556            * </p>
557            *
558            * @param categoryPropertyId the primary key of the current asset category property
559            * @param companyId the company ID to search with
560            * @param key the key to search with
561            * @param orderByComparator the comparator to order the set by
562            * @return the previous, current, and next asset category property
563            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a asset category property with the primary key could not be found
564            * @throws SystemException if a system exception occurred
565            */
566            public static com.liferay.portlet.asset.model.AssetCategoryProperty[] findByC_K_PrevAndNext(
567                    long categoryPropertyId, long companyId, java.lang.String key,
568                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
569                    throws com.liferay.portal.kernel.exception.SystemException,
570                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
571                    return getPersistence()
572                                       .findByC_K_PrevAndNext(categoryPropertyId, companyId, key,
573                            orderByComparator);
574            }
575    
576            /**
577            * Finds the asset category property where categoryId = &#63; and key = &#63; or throws a {@link com.liferay.portlet.asset.NoSuchCategoryPropertyException} if it could not be found.
578            *
579            * @param categoryId the category ID to search with
580            * @param key the key to search with
581            * @return the matching asset category property
582            * @throws com.liferay.portlet.asset.NoSuchCategoryPropertyException if a matching asset category property could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            public static com.liferay.portlet.asset.model.AssetCategoryProperty findByCA_K(
586                    long categoryId, java.lang.String key)
587                    throws com.liferay.portal.kernel.exception.SystemException,
588                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
589                    return getPersistence().findByCA_K(categoryId, key);
590            }
591    
592            /**
593            * Finds the asset category property where categoryId = &#63; and key = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
594            *
595            * @param categoryId the category ID to search with
596            * @param key the key to search with
597            * @return the matching asset category property, or <code>null</code> if a matching asset category property could not be found
598            * @throws SystemException if a system exception occurred
599            */
600            public static com.liferay.portlet.asset.model.AssetCategoryProperty fetchByCA_K(
601                    long categoryId, java.lang.String key)
602                    throws com.liferay.portal.kernel.exception.SystemException {
603                    return getPersistence().fetchByCA_K(categoryId, key);
604            }
605    
606            /**
607            * Finds the asset category property where categoryId = &#63; and key = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
608            *
609            * @param categoryId the category ID to search with
610            * @param key the key to search with
611            * @return the matching asset category property, or <code>null</code> if a matching asset category property could not be found
612            * @throws SystemException if a system exception occurred
613            */
614            public static com.liferay.portlet.asset.model.AssetCategoryProperty fetchByCA_K(
615                    long categoryId, java.lang.String key, boolean retrieveFromCache)
616                    throws com.liferay.portal.kernel.exception.SystemException {
617                    return getPersistence().fetchByCA_K(categoryId, key, retrieveFromCache);
618            }
619    
620            /**
621            * Finds all the asset category properties.
622            *
623            * @return the asset category properties
624            * @throws SystemException if a system exception occurred
625            */
626            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findAll()
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return getPersistence().findAll();
629            }
630    
631            /**
632            * Finds a range of all the asset category properties.
633            *
634            * <p>
635            * 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.
636            * </p>
637            *
638            * @param start the lower bound of the range of asset category properties to return
639            * @param end the upper bound of the range of asset category properties to return (not inclusive)
640            * @return the range of asset category properties
641            * @throws SystemException if a system exception occurred
642            */
643            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findAll(
644                    int start, int end)
645                    throws com.liferay.portal.kernel.exception.SystemException {
646                    return getPersistence().findAll(start, end);
647            }
648    
649            /**
650            * Finds an ordered range of all the asset category properties.
651            *
652            * <p>
653            * 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.
654            * </p>
655            *
656            * @param start the lower bound of the range of asset category properties to return
657            * @param end the upper bound of the range of asset category properties to return (not inclusive)
658            * @param orderByComparator the comparator to order the results by
659            * @return the ordered range of asset category properties
660            * @throws SystemException if a system exception occurred
661            */
662            public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> findAll(
663                    int start, int end,
664                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
665                    throws com.liferay.portal.kernel.exception.SystemException {
666                    return getPersistence().findAll(start, end, orderByComparator);
667            }
668    
669            /**
670            * Removes all the asset category properties where companyId = &#63; from the database.
671            *
672            * @param companyId the company ID to search with
673            * @throws SystemException if a system exception occurred
674            */
675            public static void removeByCompanyId(long companyId)
676                    throws com.liferay.portal.kernel.exception.SystemException {
677                    getPersistence().removeByCompanyId(companyId);
678            }
679    
680            /**
681            * Removes all the asset category properties where categoryId = &#63; from the database.
682            *
683            * @param categoryId the category ID to search with
684            * @throws SystemException if a system exception occurred
685            */
686            public static void removeByCategoryId(long categoryId)
687                    throws com.liferay.portal.kernel.exception.SystemException {
688                    getPersistence().removeByCategoryId(categoryId);
689            }
690    
691            /**
692            * Removes all the asset category properties where companyId = &#63; and key = &#63; from the database.
693            *
694            * @param companyId the company ID to search with
695            * @param key the key to search with
696            * @throws SystemException if a system exception occurred
697            */
698            public static void removeByC_K(long companyId, java.lang.String key)
699                    throws com.liferay.portal.kernel.exception.SystemException {
700                    getPersistence().removeByC_K(companyId, key);
701            }
702    
703            /**
704            * Removes the asset category property where categoryId = &#63; and key = &#63; from the database.
705            *
706            * @param categoryId the category ID to search with
707            * @param key the key to search with
708            * @throws SystemException if a system exception occurred
709            */
710            public static void removeByCA_K(long categoryId, java.lang.String key)
711                    throws com.liferay.portal.kernel.exception.SystemException,
712                            com.liferay.portlet.asset.NoSuchCategoryPropertyException {
713                    getPersistence().removeByCA_K(categoryId, key);
714            }
715    
716            /**
717            * Removes all the asset category properties from the database.
718            *
719            * @throws SystemException if a system exception occurred
720            */
721            public static void removeAll()
722                    throws com.liferay.portal.kernel.exception.SystemException {
723                    getPersistence().removeAll();
724            }
725    
726            /**
727            * Counts all the asset category properties where companyId = &#63;.
728            *
729            * @param companyId the company ID to search with
730            * @return the number of matching asset category properties
731            * @throws SystemException if a system exception occurred
732            */
733            public static int countByCompanyId(long companyId)
734                    throws com.liferay.portal.kernel.exception.SystemException {
735                    return getPersistence().countByCompanyId(companyId);
736            }
737    
738            /**
739            * Counts all the asset category properties where categoryId = &#63;.
740            *
741            * @param categoryId the category ID to search with
742            * @return the number of matching asset category properties
743            * @throws SystemException if a system exception occurred
744            */
745            public static int countByCategoryId(long categoryId)
746                    throws com.liferay.portal.kernel.exception.SystemException {
747                    return getPersistence().countByCategoryId(categoryId);
748            }
749    
750            /**
751            * Counts all the asset category properties where companyId = &#63; and key = &#63;.
752            *
753            * @param companyId the company ID to search with
754            * @param key the key to search with
755            * @return the number of matching asset category properties
756            * @throws SystemException if a system exception occurred
757            */
758            public static int countByC_K(long companyId, java.lang.String key)
759                    throws com.liferay.portal.kernel.exception.SystemException {
760                    return getPersistence().countByC_K(companyId, key);
761            }
762    
763            /**
764            * Counts all the asset category properties where categoryId = &#63; and key = &#63;.
765            *
766            * @param categoryId the category ID to search with
767            * @param key the key to search with
768            * @return the number of matching asset category properties
769            * @throws SystemException if a system exception occurred
770            */
771            public static int countByCA_K(long categoryId, java.lang.String key)
772                    throws com.liferay.portal.kernel.exception.SystemException {
773                    return getPersistence().countByCA_K(categoryId, key);
774            }
775    
776            /**
777            * Counts all the asset category properties.
778            *
779            * @return the number of asset category properties
780            * @throws SystemException if a system exception occurred
781            */
782            public static int countAll()
783                    throws com.liferay.portal.kernel.exception.SystemException {
784                    return getPersistence().countAll();
785            }
786    
787            public static AssetCategoryPropertyPersistence getPersistence() {
788                    if (_persistence == null) {
789                            _persistence = (AssetCategoryPropertyPersistence)PortalBeanLocatorUtil.locate(AssetCategoryPropertyPersistence.class.getName());
790    
791                            ReferenceRegistry.registerReference(AssetCategoryPropertyUtil.class,
792                                    "_persistence");
793                    }
794    
795                    return _persistence;
796            }
797    
798            public void setPersistence(AssetCategoryPropertyPersistence persistence) {
799                    _persistence = persistence;
800    
801                    ReferenceRegistry.registerReference(AssetCategoryPropertyUtil.class,
802                            "_persistence");
803            }
804    
805            private static AssetCategoryPropertyPersistence _persistence;
806    }