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.ratings.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.ratings.model.RatingsStats;
022    
023    /**
024     * The persistence interface for the ratings 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 RatingsStatsPersistenceImpl
032     * @see RatingsStatsUtil
033     * @generated
034     */
035    @ProviderType
036    public interface RatingsStatsPersistence extends BasePersistence<RatingsStats> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link RatingsStatsUtil} to access the ratings stats persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns the ratings stats where classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found.
045            *
046            * @param classNameId the class name ID
047            * @param classPK the class p k
048            * @return the matching ratings stats
049            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a matching ratings stats could not be found
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portlet.ratings.model.RatingsStats findByC_C(
053                    long classNameId, long classPK)
054                    throws com.liferay.portal.kernel.exception.SystemException,
055                            com.liferay.portlet.ratings.NoSuchStatsException;
056    
057            /**
058            * Returns the ratings stats where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
059            *
060            * @param classNameId the class name ID
061            * @param classPK the class p k
062            * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found
063            * @throws SystemException if a system exception occurred
064            */
065            public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
066                    long classNameId, long classPK)
067                    throws com.liferay.portal.kernel.exception.SystemException;
068    
069            /**
070            * Returns the ratings stats where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
071            *
072            * @param classNameId the class name ID
073            * @param classPK the class p k
074            * @param retrieveFromCache whether to use the finder cache
075            * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found
076            * @throws SystemException if a system exception occurred
077            */
078            public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
079                    long classNameId, long classPK, boolean retrieveFromCache)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Removes the ratings stats where classNameId = &#63; and classPK = &#63; from the database.
084            *
085            * @param classNameId the class name ID
086            * @param classPK the class p k
087            * @return the ratings stats that was removed
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portlet.ratings.model.RatingsStats removeByC_C(
091                    long classNameId, long classPK)
092                    throws com.liferay.portal.kernel.exception.SystemException,
093                            com.liferay.portlet.ratings.NoSuchStatsException;
094    
095            /**
096            * Returns the number of ratings statses where classNameId = &#63; and classPK = &#63;.
097            *
098            * @param classNameId the class name ID
099            * @param classPK the class p k
100            * @return the number of matching ratings statses
101            * @throws SystemException if a system exception occurred
102            */
103            public int countByC_C(long classNameId, long classPK)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Caches the ratings stats in the entity cache if it is enabled.
108            *
109            * @param ratingsStats the ratings stats
110            */
111            public void cacheResult(
112                    com.liferay.portlet.ratings.model.RatingsStats ratingsStats);
113    
114            /**
115            * Caches the ratings statses in the entity cache if it is enabled.
116            *
117            * @param ratingsStatses the ratings statses
118            */
119            public void cacheResult(
120                    java.util.List<com.liferay.portlet.ratings.model.RatingsStats> ratingsStatses);
121    
122            /**
123            * Creates a new ratings stats with the primary key. Does not add the ratings stats to the database.
124            *
125            * @param statsId the primary key for the new ratings stats
126            * @return the new ratings stats
127            */
128            public com.liferay.portlet.ratings.model.RatingsStats create(long statsId);
129    
130            /**
131            * Removes the ratings stats with the primary key from the database. Also notifies the appropriate model listeners.
132            *
133            * @param statsId the primary key of the ratings stats
134            * @return the ratings stats that was removed
135            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found
136            * @throws SystemException if a system exception occurred
137            */
138            public com.liferay.portlet.ratings.model.RatingsStats remove(long statsId)
139                    throws com.liferay.portal.kernel.exception.SystemException,
140                            com.liferay.portlet.ratings.NoSuchStatsException;
141    
142            public com.liferay.portlet.ratings.model.RatingsStats updateImpl(
143                    com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Returns the ratings stats with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found.
148            *
149            * @param statsId the primary key of the ratings stats
150            * @return the ratings stats
151            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey(
155                    long statsId)
156                    throws com.liferay.portal.kernel.exception.SystemException,
157                            com.liferay.portlet.ratings.NoSuchStatsException;
158    
159            /**
160            * Returns the ratings stats with the primary key or returns <code>null</code> if it could not be found.
161            *
162            * @param statsId the primary key of the ratings stats
163            * @return the ratings stats, or <code>null</code> if a ratings stats with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey(
167                    long statsId)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns all the ratings statses.
172            *
173            * @return the ratings statses
174            * @throws SystemException if a system exception occurred
175            */
176            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll()
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Returns a range of all the ratings statses.
181            *
182            * <p>
183            * 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.ratings.model.impl.RatingsStatsModelImpl}. 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.
184            * </p>
185            *
186            * @param start the lower bound of the range of ratings statses
187            * @param end the upper bound of the range of ratings statses (not inclusive)
188            * @return the range of ratings statses
189            * @throws SystemException if a system exception occurred
190            */
191            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
192                    int start, int end)
193                    throws com.liferay.portal.kernel.exception.SystemException;
194    
195            /**
196            * Returns an ordered range of all the ratings statses.
197            *
198            * <p>
199            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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.ratings.model.impl.RatingsStatsModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
200            * </p>
201            *
202            * @param start the lower bound of the range of ratings statses
203            * @param end the upper bound of the range of ratings statses (not inclusive)
204            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
205            * @return the ordered range of ratings statses
206            * @throws SystemException if a system exception occurred
207            */
208            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
209                    int start, int end,
210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211                    throws com.liferay.portal.kernel.exception.SystemException;
212    
213            /**
214            * Removes all the ratings statses from the database.
215            *
216            * @throws SystemException if a system exception occurred
217            */
218            public void removeAll()
219                    throws com.liferay.portal.kernel.exception.SystemException;
220    
221            /**
222            * Returns the number of ratings statses.
223            *
224            * @return the number of ratings statses
225            * @throws SystemException if a system exception occurred
226            */
227            public int countAll()
228                    throws com.liferay.portal.kernel.exception.SystemException;
229    }