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 com.liferay.portal.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.ratings.model.RatingsStats;
020    
021    /**
022     * The persistence interface for the ratings stats service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see RatingsStatsPersistenceImpl
030     * @see RatingsStatsUtil
031     * @generated
032     */
033    public interface RatingsStatsPersistence extends BasePersistence<RatingsStats> {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * 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.
038             */
039    
040            /**
041            * Caches the ratings stats in the entity cache if it is enabled.
042            *
043            * @param ratingsStats the ratings stats
044            */
045            public void cacheResult(
046                    com.liferay.portlet.ratings.model.RatingsStats ratingsStats);
047    
048            /**
049            * Caches the ratings statses in the entity cache if it is enabled.
050            *
051            * @param ratingsStatses the ratings statses
052            */
053            public void cacheResult(
054                    java.util.List<com.liferay.portlet.ratings.model.RatingsStats> ratingsStatses);
055    
056            /**
057            * Creates a new ratings stats with the primary key. Does not add the ratings stats to the database.
058            *
059            * @param statsId the primary key for the new ratings stats
060            * @return the new ratings stats
061            */
062            public com.liferay.portlet.ratings.model.RatingsStats create(long statsId);
063    
064            /**
065            * Removes the ratings stats with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param statsId the primary key of the ratings stats
068            * @return the ratings stats that was removed
069            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portlet.ratings.model.RatingsStats remove(long statsId)
073                    throws com.liferay.portal.kernel.exception.SystemException,
074                            com.liferay.portlet.ratings.NoSuchStatsException;
075    
076            public com.liferay.portlet.ratings.model.RatingsStats updateImpl(
077                    com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
078                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Returns the ratings stats with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found.
083            *
084            * @param statsId the primary key of the ratings stats
085            * @return the ratings stats
086            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey(
090                    long statsId)
091                    throws com.liferay.portal.kernel.exception.SystemException,
092                            com.liferay.portlet.ratings.NoSuchStatsException;
093    
094            /**
095            * Returns the ratings stats with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param statsId the primary key of the ratings stats
098            * @return the ratings stats, or <code>null</code> if a ratings stats with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey(
102                    long statsId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * 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.
107            *
108            * @param classNameId the class name ID
109            * @param classPK the class p k
110            * @return the matching ratings stats
111            * @throws com.liferay.portlet.ratings.NoSuchStatsException if a matching ratings stats could not be found
112            * @throws SystemException if a system exception occurred
113            */
114            public com.liferay.portlet.ratings.model.RatingsStats findByC_C(
115                    long classNameId, long classPK)
116                    throws com.liferay.portal.kernel.exception.SystemException,
117                            com.liferay.portlet.ratings.NoSuchStatsException;
118    
119            /**
120            * 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.
121            *
122            * @param classNameId the class name ID
123            * @param classPK the class p k
124            * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found
125            * @throws SystemException if a system exception occurred
126            */
127            public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C(
128                    long classNameId, long classPK)
129                    throws com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * 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.
133            *
134            * @param classNameId the class name ID
135            * @param classPK the class p k
136            * @param retrieveFromCache whether to use the finder cache
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            * Returns 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            * Returns 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
161            * @param end the upper bound of the range of ratings statses (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            * Returns 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
177            * @param end the upper bound of the range of ratings statses (not inclusive)
178            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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
191            * @param classPK the class p k
192            * @return the ratings stats that was removed
193            * @throws SystemException if a system exception occurred
194            */
195            public com.liferay.portlet.ratings.model.RatingsStats removeByC_C(
196                    long classNameId, long classPK)
197                    throws com.liferay.portal.kernel.exception.SystemException,
198                            com.liferay.portlet.ratings.NoSuchStatsException;
199    
200            /**
201            * Removes all the ratings statses from the database.
202            *
203            * @throws SystemException if a system exception occurred
204            */
205            public void removeAll()
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            /**
209            * Returns the number of ratings statses where classNameId = &#63; and classPK = &#63;.
210            *
211            * @param classNameId the class name ID
212            * @param classPK the class p k
213            * @return the number of matching ratings statses
214            * @throws SystemException if a system exception occurred
215            */
216            public int countByC_C(long classNameId, long classPK)
217                    throws com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Returns the number of ratings statses.
221            *
222            * @return the number of ratings statses
223            * @throws SystemException if a system exception occurred
224            */
225            public int countAll()
226                    throws com.liferay.portal.kernel.exception.SystemException;
227    }