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 * Returns the ratings stats where classNameId = ? and classPK = ? or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found. 042 * 043 * @param classNameId the class name ID 044 * @param classPK the class p k 045 * @return the matching ratings stats 046 * @throws com.liferay.portlet.ratings.NoSuchStatsException if a matching ratings stats could not be found 047 * @throws SystemException if a system exception occurred 048 */ 049 public com.liferay.portlet.ratings.model.RatingsStats findByC_C( 050 long classNameId, long classPK) 051 throws com.liferay.portal.kernel.exception.SystemException, 052 com.liferay.portlet.ratings.NoSuchStatsException; 053 054 /** 055 * Returns the ratings stats where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 056 * 057 * @param classNameId the class name ID 058 * @param classPK the class p k 059 * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found 060 * @throws SystemException if a system exception occurred 061 */ 062 public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C( 063 long classNameId, long classPK) 064 throws com.liferay.portal.kernel.exception.SystemException; 065 066 /** 067 * Returns the ratings stats where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 068 * 069 * @param classNameId the class name ID 070 * @param classPK the class p k 071 * @param retrieveFromCache whether to use the finder cache 072 * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found 073 * @throws SystemException if a system exception occurred 074 */ 075 public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C( 076 long classNameId, long classPK, boolean retrieveFromCache) 077 throws com.liferay.portal.kernel.exception.SystemException; 078 079 /** 080 * Removes the ratings stats where classNameId = ? and classPK = ? from the database. 081 * 082 * @param classNameId the class name ID 083 * @param classPK the class p k 084 * @return the ratings stats that was removed 085 * @throws SystemException if a system exception occurred 086 */ 087 public com.liferay.portlet.ratings.model.RatingsStats removeByC_C( 088 long classNameId, long classPK) 089 throws com.liferay.portal.kernel.exception.SystemException, 090 com.liferay.portlet.ratings.NoSuchStatsException; 091 092 /** 093 * Returns the number of ratings statses where classNameId = ? and classPK = ?. 094 * 095 * @param classNameId the class name ID 096 * @param classPK the class p k 097 * @return the number of matching ratings statses 098 * @throws SystemException if a system exception occurred 099 */ 100 public int countByC_C(long classNameId, long classPK) 101 throws com.liferay.portal.kernel.exception.SystemException; 102 103 /** 104 * Caches the ratings stats in the entity cache if it is enabled. 105 * 106 * @param ratingsStats the ratings stats 107 */ 108 public void cacheResult( 109 com.liferay.portlet.ratings.model.RatingsStats ratingsStats); 110 111 /** 112 * Caches the ratings statses in the entity cache if it is enabled. 113 * 114 * @param ratingsStatses the ratings statses 115 */ 116 public void cacheResult( 117 java.util.List<com.liferay.portlet.ratings.model.RatingsStats> ratingsStatses); 118 119 /** 120 * Creates a new ratings stats with the primary key. Does not add the ratings stats to the database. 121 * 122 * @param statsId the primary key for the new ratings stats 123 * @return the new ratings stats 124 */ 125 public com.liferay.portlet.ratings.model.RatingsStats create(long statsId); 126 127 /** 128 * Removes the ratings stats with the primary key from the database. Also notifies the appropriate model listeners. 129 * 130 * @param statsId the primary key of the ratings stats 131 * @return the ratings stats that was removed 132 * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found 133 * @throws SystemException if a system exception occurred 134 */ 135 public com.liferay.portlet.ratings.model.RatingsStats remove(long statsId) 136 throws com.liferay.portal.kernel.exception.SystemException, 137 com.liferay.portlet.ratings.NoSuchStatsException; 138 139 public com.liferay.portlet.ratings.model.RatingsStats updateImpl( 140 com.liferay.portlet.ratings.model.RatingsStats ratingsStats) 141 throws com.liferay.portal.kernel.exception.SystemException; 142 143 /** 144 * Returns the ratings stats with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found. 145 * 146 * @param statsId the primary key of the ratings stats 147 * @return the ratings stats 148 * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey( 152 long statsId) 153 throws com.liferay.portal.kernel.exception.SystemException, 154 com.liferay.portlet.ratings.NoSuchStatsException; 155 156 /** 157 * Returns the ratings stats with the primary key or returns <code>null</code> if it could not be found. 158 * 159 * @param statsId the primary key of the ratings stats 160 * @return the ratings stats, or <code>null</code> if a ratings stats with the primary key could not be found 161 * @throws SystemException if a system exception occurred 162 */ 163 public com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey( 164 long statsId) 165 throws com.liferay.portal.kernel.exception.SystemException; 166 167 /** 168 * Returns all the ratings statses. 169 * 170 * @return the ratings statses 171 * @throws SystemException if a system exception occurred 172 */ 173 public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll() 174 throws com.liferay.portal.kernel.exception.SystemException; 175 176 /** 177 * Returns a range of all the ratings statses. 178 * 179 * <p> 180 * 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. 181 * </p> 182 * 183 * @param start the lower bound of the range of ratings statses 184 * @param end the upper bound of the range of ratings statses (not inclusive) 185 * @return the range of ratings statses 186 * @throws SystemException if a system exception occurred 187 */ 188 public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll( 189 int start, int end) 190 throws com.liferay.portal.kernel.exception.SystemException; 191 192 /** 193 * Returns an ordered range of all the ratings statses. 194 * 195 * <p> 196 * 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. 197 * </p> 198 * 199 * @param start the lower bound of the range of ratings statses 200 * @param end the upper bound of the range of ratings statses (not inclusive) 201 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 202 * @return the ordered range of ratings statses 203 * @throws SystemException if a system exception occurred 204 */ 205 public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll( 206 int start, int end, 207 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 208 throws com.liferay.portal.kernel.exception.SystemException; 209 210 /** 211 * Removes all the ratings statses from the database. 212 * 213 * @throws SystemException if a system exception occurred 214 */ 215 public void removeAll() 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 }