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