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