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