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.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.asset.model.AssetTagStats;
022    
023    /**
024     * The persistence interface for the asset tag stats service.
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see com.liferay.portlet.asset.service.persistence.impl.AssetTagStatsPersistenceImpl
032     * @see AssetTagStatsUtil
033     * @generated
034     */
035    @ProviderType
036    public interface AssetTagStatsPersistence extends BasePersistence<AssetTagStats> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link AssetTagStatsUtil} to access the asset tag stats persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the asset tag statses where tagId = &#63;.
045            *
046            * @param tagId the tag ID
047            * @return the matching asset tag statses
048            */
049            public java.util.List<AssetTagStats> findByTagId(long tagId);
050    
051            /**
052            * Returns a range of all the asset tag statses where tagId = &#63;.
053            *
054            * <p>
055            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link AssetTagStatsModelImpl}. 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.
056            * </p>
057            *
058            * @param tagId the tag ID
059            * @param start the lower bound of the range of asset tag statses
060            * @param end the upper bound of the range of asset tag statses (not inclusive)
061            * @return the range of matching asset tag statses
062            */
063            public java.util.List<AssetTagStats> findByTagId(long tagId, int start,
064                    int end);
065    
066            /**
067            * Returns an ordered range of all the asset tag statses where tagId = &#63;.
068            *
069            * <p>
070            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link AssetTagStatsModelImpl}. 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.
071            * </p>
072            *
073            * @param tagId the tag ID
074            * @param start the lower bound of the range of asset tag statses
075            * @param end the upper bound of the range of asset tag statses (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching asset tag statses
078            */
079            public java.util.List<AssetTagStats> findByTagId(long tagId, int start,
080                    int end,
081                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator);
082    
083            /**
084            * Returns the first asset tag stats in the ordered set where tagId = &#63;.
085            *
086            * @param tagId the tag ID
087            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
088            * @return the first matching asset tag stats
089            * @throws NoSuchTagStatsException if a matching asset tag stats could not be found
090            */
091            public AssetTagStats findByTagId_First(long tagId,
092                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator)
093                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
094    
095            /**
096            * Returns the first asset tag stats in the ordered set where tagId = &#63;.
097            *
098            * @param tagId the tag ID
099            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
100            * @return the first matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found
101            */
102            public AssetTagStats fetchByTagId_First(long tagId,
103                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator);
104    
105            /**
106            * Returns the last asset tag stats in the ordered set where tagId = &#63;.
107            *
108            * @param tagId the tag ID
109            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
110            * @return the last matching asset tag stats
111            * @throws NoSuchTagStatsException if a matching asset tag stats could not be found
112            */
113            public AssetTagStats findByTagId_Last(long tagId,
114                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator)
115                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
116    
117            /**
118            * Returns the last asset tag stats in the ordered set where tagId = &#63;.
119            *
120            * @param tagId the tag ID
121            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
122            * @return the last matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found
123            */
124            public AssetTagStats fetchByTagId_Last(long tagId,
125                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator);
126    
127            /**
128            * Returns the asset tag statses before and after the current asset tag stats in the ordered set where tagId = &#63;.
129            *
130            * @param tagStatsId the primary key of the current asset tag stats
131            * @param tagId the tag ID
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the previous, current, and next asset tag stats
134            * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found
135            */
136            public AssetTagStats[] findByTagId_PrevAndNext(long tagStatsId, long tagId,
137                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator)
138                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
139    
140            /**
141            * Removes all the asset tag statses where tagId = &#63; from the database.
142            *
143            * @param tagId the tag ID
144            */
145            public void removeByTagId(long tagId);
146    
147            /**
148            * Returns the number of asset tag statses where tagId = &#63;.
149            *
150            * @param tagId the tag ID
151            * @return the number of matching asset tag statses
152            */
153            public int countByTagId(long tagId);
154    
155            /**
156            * Returns all the asset tag statses where classNameId = &#63;.
157            *
158            * @param classNameId the class name ID
159            * @return the matching asset tag statses
160            */
161            public java.util.List<AssetTagStats> findByClassNameId(long classNameId);
162    
163            /**
164            * Returns a range of all the asset tag statses where classNameId = &#63;.
165            *
166            * <p>
167            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link AssetTagStatsModelImpl}. 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.
168            * </p>
169            *
170            * @param classNameId the class name ID
171            * @param start the lower bound of the range of asset tag statses
172            * @param end the upper bound of the range of asset tag statses (not inclusive)
173            * @return the range of matching asset tag statses
174            */
175            public java.util.List<AssetTagStats> findByClassNameId(long classNameId,
176                    int start, int end);
177    
178            /**
179            * Returns an ordered range of all the asset tag statses where classNameId = &#63;.
180            *
181            * <p>
182            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link AssetTagStatsModelImpl}. 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.
183            * </p>
184            *
185            * @param classNameId the class name ID
186            * @param start the lower bound of the range of asset tag statses
187            * @param end the upper bound of the range of asset tag statses (not inclusive)
188            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
189            * @return the ordered range of matching asset tag statses
190            */
191            public java.util.List<AssetTagStats> findByClassNameId(long classNameId,
192                    int start, int end,
193                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator);
194    
195            /**
196            * Returns the first asset tag stats in the ordered set where classNameId = &#63;.
197            *
198            * @param classNameId the class name ID
199            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
200            * @return the first matching asset tag stats
201            * @throws NoSuchTagStatsException if a matching asset tag stats could not be found
202            */
203            public AssetTagStats findByClassNameId_First(long classNameId,
204                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator)
205                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
206    
207            /**
208            * Returns the first asset tag stats in the ordered set where classNameId = &#63;.
209            *
210            * @param classNameId the class name ID
211            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
212            * @return the first matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found
213            */
214            public AssetTagStats fetchByClassNameId_First(long classNameId,
215                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator);
216    
217            /**
218            * Returns the last asset tag stats in the ordered set where classNameId = &#63;.
219            *
220            * @param classNameId the class name ID
221            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
222            * @return the last matching asset tag stats
223            * @throws NoSuchTagStatsException if a matching asset tag stats could not be found
224            */
225            public AssetTagStats findByClassNameId_Last(long classNameId,
226                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator)
227                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
228    
229            /**
230            * Returns the last asset tag stats in the ordered set where classNameId = &#63;.
231            *
232            * @param classNameId the class name ID
233            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
234            * @return the last matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found
235            */
236            public AssetTagStats fetchByClassNameId_Last(long classNameId,
237                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator);
238    
239            /**
240            * Returns the asset tag statses before and after the current asset tag stats in the ordered set where classNameId = &#63;.
241            *
242            * @param tagStatsId the primary key of the current asset tag stats
243            * @param classNameId the class name ID
244            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
245            * @return the previous, current, and next asset tag stats
246            * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found
247            */
248            public AssetTagStats[] findByClassNameId_PrevAndNext(long tagStatsId,
249                    long classNameId,
250                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator)
251                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
252    
253            /**
254            * Removes all the asset tag statses where classNameId = &#63; from the database.
255            *
256            * @param classNameId the class name ID
257            */
258            public void removeByClassNameId(long classNameId);
259    
260            /**
261            * Returns the number of asset tag statses where classNameId = &#63;.
262            *
263            * @param classNameId the class name ID
264            * @return the number of matching asset tag statses
265            */
266            public int countByClassNameId(long classNameId);
267    
268            /**
269            * Returns the asset tag stats where tagId = &#63; and classNameId = &#63; or throws a {@link NoSuchTagStatsException} if it could not be found.
270            *
271            * @param tagId the tag ID
272            * @param classNameId the class name ID
273            * @return the matching asset tag stats
274            * @throws NoSuchTagStatsException if a matching asset tag stats could not be found
275            */
276            public AssetTagStats findByT_C(long tagId, long classNameId)
277                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
278    
279            /**
280            * Returns the asset tag stats where tagId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
281            *
282            * @param tagId the tag ID
283            * @param classNameId the class name ID
284            * @return the matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found
285            */
286            public AssetTagStats fetchByT_C(long tagId, long classNameId);
287    
288            /**
289            * Returns the asset tag stats where tagId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
290            *
291            * @param tagId the tag ID
292            * @param classNameId the class name ID
293            * @param retrieveFromCache whether to use the finder cache
294            * @return the matching asset tag stats, or <code>null</code> if a matching asset tag stats could not be found
295            */
296            public AssetTagStats fetchByT_C(long tagId, long classNameId,
297                    boolean retrieveFromCache);
298    
299            /**
300            * Removes the asset tag stats where tagId = &#63; and classNameId = &#63; from the database.
301            *
302            * @param tagId the tag ID
303            * @param classNameId the class name ID
304            * @return the asset tag stats that was removed
305            */
306            public AssetTagStats removeByT_C(long tagId, long classNameId)
307                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
308    
309            /**
310            * Returns the number of asset tag statses where tagId = &#63; and classNameId = &#63;.
311            *
312            * @param tagId the tag ID
313            * @param classNameId the class name ID
314            * @return the number of matching asset tag statses
315            */
316            public int countByT_C(long tagId, long classNameId);
317    
318            /**
319            * Caches the asset tag stats in the entity cache if it is enabled.
320            *
321            * @param assetTagStats the asset tag stats
322            */
323            public void cacheResult(AssetTagStats assetTagStats);
324    
325            /**
326            * Caches the asset tag statses in the entity cache if it is enabled.
327            *
328            * @param assetTagStatses the asset tag statses
329            */
330            public void cacheResult(java.util.List<AssetTagStats> assetTagStatses);
331    
332            /**
333            * Creates a new asset tag stats with the primary key. Does not add the asset tag stats to the database.
334            *
335            * @param tagStatsId the primary key for the new asset tag stats
336            * @return the new asset tag stats
337            */
338            public AssetTagStats create(long tagStatsId);
339    
340            /**
341            * Removes the asset tag stats with the primary key from the database. Also notifies the appropriate model listeners.
342            *
343            * @param tagStatsId the primary key of the asset tag stats
344            * @return the asset tag stats that was removed
345            * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found
346            */
347            public AssetTagStats remove(long tagStatsId)
348                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
349    
350            public AssetTagStats updateImpl(AssetTagStats assetTagStats);
351    
352            /**
353            * Returns the asset tag stats with the primary key or throws a {@link NoSuchTagStatsException} if it could not be found.
354            *
355            * @param tagStatsId the primary key of the asset tag stats
356            * @return the asset tag stats
357            * @throws NoSuchTagStatsException if a asset tag stats with the primary key could not be found
358            */
359            public AssetTagStats findByPrimaryKey(long tagStatsId)
360                    throws com.liferay.portlet.asset.NoSuchTagStatsException;
361    
362            /**
363            * Returns the asset tag stats with the primary key or returns <code>null</code> if it could not be found.
364            *
365            * @param tagStatsId the primary key of the asset tag stats
366            * @return the asset tag stats, or <code>null</code> if a asset tag stats with the primary key could not be found
367            */
368            public AssetTagStats fetchByPrimaryKey(long tagStatsId);
369    
370            @Override
371            public java.util.Map<java.io.Serializable, AssetTagStats> fetchByPrimaryKeys(
372                    java.util.Set<java.io.Serializable> primaryKeys);
373    
374            /**
375            * Returns all the asset tag statses.
376            *
377            * @return the asset tag statses
378            */
379            public java.util.List<AssetTagStats> findAll();
380    
381            /**
382            * Returns a range of all the asset tag statses.
383            *
384            * <p>
385            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link AssetTagStatsModelImpl}. 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.
386            * </p>
387            *
388            * @param start the lower bound of the range of asset tag statses
389            * @param end the upper bound of the range of asset tag statses (not inclusive)
390            * @return the range of asset tag statses
391            */
392            public java.util.List<AssetTagStats> findAll(int start, int end);
393    
394            /**
395            * Returns an ordered range of all the asset tag statses.
396            *
397            * <p>
398            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link AssetTagStatsModelImpl}. 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.
399            * </p>
400            *
401            * @param start the lower bound of the range of asset tag statses
402            * @param end the upper bound of the range of asset tag statses (not inclusive)
403            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
404            * @return the ordered range of asset tag statses
405            */
406            public java.util.List<AssetTagStats> findAll(int start, int end,
407                    com.liferay.portal.kernel.util.OrderByComparator<AssetTagStats> orderByComparator);
408    
409            /**
410            * Removes all the asset tag statses from the database.
411            */
412            public void removeAll();
413    
414            /**
415            * Returns the number of asset tag statses.
416            *
417            * @return the number of asset tag statses
418            */
419            public int countAll();
420    }