001 /** 002 * Copyright (c) 2000-2012 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 throws com.liferay.portal.kernel.exception.SystemException; 079 080 /** 081 * Returns the ratings stats with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found. 082 * 083 * @param statsId the primary key of the ratings stats 084 * @return the ratings stats 085 * @throws com.liferay.portlet.ratings.NoSuchStatsException if a ratings stats with the primary key could not be found 086 * @throws SystemException if a system exception occurred 087 */ 088 public com.liferay.portlet.ratings.model.RatingsStats findByPrimaryKey( 089 long statsId) 090 throws com.liferay.portal.kernel.exception.SystemException, 091 com.liferay.portlet.ratings.NoSuchStatsException; 092 093 /** 094 * Returns the ratings stats with the primary key or returns <code>null</code> if it could not be found. 095 * 096 * @param statsId the primary key of the ratings stats 097 * @return the ratings stats, or <code>null</code> if a ratings stats with the primary key could not be found 098 * @throws SystemException if a system exception occurred 099 */ 100 public com.liferay.portlet.ratings.model.RatingsStats fetchByPrimaryKey( 101 long statsId) 102 throws com.liferay.portal.kernel.exception.SystemException; 103 104 /** 105 * Returns the ratings stats where classNameId = ? and classPK = ? or throws a {@link com.liferay.portlet.ratings.NoSuchStatsException} if it could not be found. 106 * 107 * @param classNameId the class name ID 108 * @param classPK the class p k 109 * @return the matching ratings stats 110 * @throws com.liferay.portlet.ratings.NoSuchStatsException if a matching ratings stats could not be found 111 * @throws SystemException if a system exception occurred 112 */ 113 public com.liferay.portlet.ratings.model.RatingsStats findByC_C( 114 long classNameId, long classPK) 115 throws com.liferay.portal.kernel.exception.SystemException, 116 com.liferay.portlet.ratings.NoSuchStatsException; 117 118 /** 119 * Returns the ratings stats where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 120 * 121 * @param classNameId the class name ID 122 * @param classPK the class p k 123 * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found 124 * @throws SystemException if a system exception occurred 125 */ 126 public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C( 127 long classNameId, long classPK) 128 throws com.liferay.portal.kernel.exception.SystemException; 129 130 /** 131 * Returns the ratings stats where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 132 * 133 * @param classNameId the class name ID 134 * @param classPK the class p k 135 * @param retrieveFromCache whether to use the finder cache 136 * @return the matching ratings stats, or <code>null</code> if a matching ratings stats could not be found 137 * @throws SystemException if a system exception occurred 138 */ 139 public com.liferay.portlet.ratings.model.RatingsStats fetchByC_C( 140 long classNameId, long classPK, boolean retrieveFromCache) 141 throws com.liferay.portal.kernel.exception.SystemException; 142 143 /** 144 * Returns all the ratings statses. 145 * 146 * @return the ratings statses 147 * @throws SystemException if a system exception occurred 148 */ 149 public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll() 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Returns a range of all the ratings statses. 154 * 155 * <p> 156 * 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. 157 * </p> 158 * 159 * @param start the lower bound of the range of ratings statses 160 * @param end the upper bound of the range of ratings statses (not inclusive) 161 * @return the range of ratings statses 162 * @throws SystemException if a system exception occurred 163 */ 164 public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll( 165 int start, int end) 166 throws com.liferay.portal.kernel.exception.SystemException; 167 168 /** 169 * Returns an ordered range of all the ratings statses. 170 * 171 * <p> 172 * 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. 173 * </p> 174 * 175 * @param start the lower bound of the range of ratings statses 176 * @param end the upper bound of the range of ratings statses (not inclusive) 177 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 178 * @return the ordered range of ratings statses 179 * @throws SystemException if a system exception occurred 180 */ 181 public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> findAll( 182 int start, int end, 183 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 184 throws com.liferay.portal.kernel.exception.SystemException; 185 186 /** 187 * Removes the ratings stats where classNameId = ? and classPK = ? from the database. 188 * 189 * @param classNameId the class name ID 190 * @param classPK the class p k 191 * @return the ratings stats that was removed 192 * @throws SystemException if a system exception occurred 193 */ 194 public com.liferay.portlet.ratings.model.RatingsStats removeByC_C( 195 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 = ? and classPK = ?. 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 }