001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.ratings.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.service.persistence.BasePersistence;
019    
020    import com.liferay.portlet.ratings.model.RatingsStats;
021    
022    /**
023     * The persistence interface for the ratings stats service.
024     *
025     * <p>
026     * Caching information and settings can be found in <code>portal.properties</code>
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see RatingsStatsPersistenceImpl
031     * @see RatingsStatsUtil
032     * @generated
033     */
034    public interface RatingsStatsPersistence extends BasePersistence<RatingsStats> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040    
041            /**
042            * Caches the ratings stats in the entity cache if it is enabled.
043            *
044            * @param ratingsStats the ratings stats to cache
045            */
046            public void cacheResult(
047                    com.liferay.portlet.ratings.model.RatingsStats ratingsStats);
048    
049            /**
050            * Caches the ratings statses in the entity cache if it is enabled.
051            *
052            * @param ratingsStatses the ratings statses to cache
053            */
054            public void cacheResult(
055                    java.util.List<com.liferay.portlet.ratings.model.RatingsStats> ratingsStatses);
056    
057            /**
058            * Creates a new ratings stats with the primary key. Does not add the ratings stats to the database.
059            *
060            * @param statsId the primary key for the new ratings stats
061            * @return the new ratings stats
062            */
063            public com.liferay.portlet.ratings.model.RatingsStats create(long statsId);
064    
065            /**
066            * Removes the ratings stats with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param statsId the primary key of the ratings stats to remove
069            * @return the ratings stats that was removed
070            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portlet.ratings.model.RatingsStats remove(long statsId)
074                    throws com.liferay.portal.kernel.exception.SystemException,
075                            com.liferay.portlet.ratings.NoSuchStatsException;
076    
077            public com.liferay.portlet.ratings.model.RatingsStats updateImpl(
078                    com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
079                    boolean merge)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Finds the ratings stats with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found.
084            *
085            * @param statsId the primary key of the ratings stats to find
086            * @return the ratings stats
087            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey(
091                    long statsId)
092                    throws com.liferay.portal.kernel.exception.SystemException,
093                            com.liferay.portlet.ratings.NoSuchStatsException;
094    
095            /**
096            * Finds the ratings stats with the primary key or returns <code>null</code> if it could not be found.
097            *
098            * @param statsId the primary key of the ratings stats to find
099            * @return the ratings stats, or <code>null</code> if a ratings stats with the primary key could not be found
100            * @throws SystemException if a system exception occurred
101            */
102            public com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey(
103                    long statsId)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Finds the ratings stats where classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found.
108            *
109            * @param classNameId the class name ID to search with
110            * @param classPK the class p k to search with
111            * @return the matching ratings stats
112            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a matching ratings stats could not be found
113            * @throws SystemException if a system exception occurred
114            */
115            public com.liferay.portlet.ratings.model.RatingsStats findByC_C(
116                    long classNameId, long classPK)
117                    throws com.liferay.portal.kernel.exception.SystemException,
118                            com.liferay.portlet.ratings.NoSuchStatsException;
119    
120            /**
121            * Finds the ratings stats where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
122            *
123            * @param classNameId the class name ID to search with
124            * @param classPK the class p k to search with
125            * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found
126            * @throws SystemException if a system exception occurred
127            */
128            public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
129                    long classNameId, long classPK)
130                    throws com.liferay.portal.kernel.exception.SystemException;
131    
132            /**
133            * Finds 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.
134            *
135            * @param classNameId the class name ID to search with
136            * @param classPK the class p k to search with
137            * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found
138            * @throws SystemException if a system exception occurred
139            */
140            public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
141                    long classNameId, long classPK, boolean retrieveFromCache)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Finds all the ratings statses.
146            *
147            * @return the ratings statses
148            * @throws SystemException if a system exception occurred
149            */
150            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll()
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Finds a range of all the ratings statses.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param start the lower bound of the range of ratings statses to return
161            * @param end the upper bound of the range of ratings statses to return (not inclusive)
162            * @return the range of ratings statses
163            * @throws SystemException if a system exception occurred
164            */
165            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
166                    int start, int end)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            /**
170            * Finds an ordered range of all the ratings statses.
171            *
172            * <p>
173            * 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.
174            * </p>
175            *
176            * @param start the lower bound of the range of ratings statses to return
177            * @param end the upper bound of the range of ratings statses to return (not inclusive)
178            * @param orderByComparator the comparator to order the results by
179            * @return the ordered range of ratings statses
180            * @throws SystemException if a system exception occurred
181            */
182            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
183                    int start, int end,
184                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185                    throws com.liferay.portal.kernel.exception.SystemException;
186    
187            /**
188            * Removes the ratings stats where classNameId = &#63; and classPK = &#63; from the database.
189            *
190            * @param classNameId the class name ID to search with
191            * @param classPK the class p k to search with
192            * @throws SystemException if a system exception occurred
193            */
194            public void removeByC_C(long classNameId, long classPK)
195                    throws com.liferay.portal.kernel.exception.SystemException,
196                            com.liferay.portlet.ratings.NoSuchStatsException;
197    
198            /**
199            * Removes all the ratings statses from the database.
200            *
201            * @throws SystemException if a system exception occurred
202            */
203            public void removeAll()
204                    throws com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Counts all the ratings statses where classNameId = &#63; and classPK = &#63;.
208            *
209            * @param classNameId the class name ID to search with
210            * @param classPK the class p k to search with
211            * @return the number of matching ratings statses
212            * @throws SystemException if a system exception occurred
213            */
214            public int countByC_C(long classNameId, long classPK)
215                    throws com.liferay.portal.kernel.exception.SystemException;
216    
217            /**
218            * Counts all the ratings statses.
219            *
220            * @return the number of ratings statses
221            * @throws SystemException if a system exception occurred
222            */
223            public int countAll()
224                    throws com.liferay.portal.kernel.exception.SystemException;
225    
226            public RatingsStats remove(RatingsStats ratingsStats)
227                    throws SystemException;
228    }