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