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