001    /**
002     * Copyright (c) 2000-2011 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 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
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
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
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            * Returns 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
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            * Returns 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
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            * 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.
108            *
109            * @param classNameId the class name ID
110            * @param classPK the class p k
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            * 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.
122            *
123            * @param classNameId the class name ID
124            * @param classPK the class p k
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            * 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.
134            *
135            * @param classNameId the class name ID
136            * @param classPK the class p k
137            * @param retrieveFromCache whether to use the finder cache
138            * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found
139            * @throws SystemException if a system exception occurred
140            */
141            public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
142                    long classNameId, long classPK, boolean retrieveFromCache)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Returns all the ratings statses.
147            *
148            * @return the ratings statses
149            * @throws SystemException if a system exception occurred
150            */
151            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll()
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            /**
155            * Returns a range of all the ratings statses.
156            *
157            * <p>
158            * 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.
159            * </p>
160            *
161            * @param start the lower bound of the range of ratings statses
162            * @param end the upper bound of the range of ratings statses (not inclusive)
163            * @return the range of ratings statses
164            * @throws SystemException if a system exception occurred
165            */
166            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
167                    int start, int end)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns an ordered range of all the ratings statses.
172            *
173            * <p>
174            * 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.
175            * </p>
176            *
177            * @param start the lower bound of the range of ratings statses
178            * @param end the upper bound of the range of ratings statses (not inclusive)
179            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
180            * @return the ordered range of ratings statses
181            * @throws SystemException if a system exception occurred
182            */
183            public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll(
184                    int start, int end,
185                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186                    throws com.liferay.portal.kernel.exception.SystemException;
187    
188            /**
189            * Removes the ratings stats where classNameId = &#63; and classPK = &#63; from the database.
190            *
191            * @param classNameId the class name ID
192            * @param classPK the class p k
193            * @throws SystemException if a system exception occurred
194            */
195            public void removeByC_C(long classNameId, long classPK)
196                    throws com.liferay.portal.kernel.exception.SystemException,
197                            com.liferay.portlet.ratings.NoSuchStatsException;
198    
199            /**
200            * Removes all the ratings statses from the database.
201            *
202            * @throws SystemException if a system exception occurred
203            */
204            public void removeAll()
205                    throws com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * Returns the number of ratings statses where classNameId = &#63; and classPK = &#63;.
209            *
210            * @param classNameId the class name ID
211            * @param classPK the class p k
212            * @return the number of matching ratings statses
213            * @throws SystemException if a system exception occurred
214            */
215            public int countByC_C(long classNameId, long classPK)
216                    throws com.liferay.portal.kernel.exception.SystemException;
217    
218            /**
219            * Returns the number of ratings statses.
220            *
221            * @return the number of ratings statses
222            * @throws SystemException if a system exception occurred
223            */
224            public int countAll()
225                    throws com.liferay.portal.kernel.exception.SystemException;
226    
227            public RatingsStats remove(RatingsStats ratingsStats)
228                    throws SystemException;
229    }