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.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.BrowserTracker; 020 021 /** 022 * The persistence interface for the browser tracker 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 BrowserTrackerPersistenceImpl 030 * @see BrowserTrackerUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface BrowserTrackerPersistence extends BasePersistence<BrowserTracker> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link BrowserTrackerUtil} to access the browser tracker persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns the browser tracker where userId = ? or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found. 043 * 044 * @param userId the user ID 045 * @return the matching browser tracker 046 * @throws com.liferay.portal.NoSuchBrowserTrackerException if a matching browser tracker could not be found 047 * @throws SystemException if a system exception occurred 048 */ 049 public com.liferay.portal.model.BrowserTracker findByUserId(long userId) 050 throws com.liferay.portal.NoSuchBrowserTrackerException, 051 com.liferay.portal.kernel.exception.SystemException; 052 053 /** 054 * Returns the browser tracker where userId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 055 * 056 * @param userId the user ID 057 * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found 058 * @throws SystemException if a system exception occurred 059 */ 060 public com.liferay.portal.model.BrowserTracker fetchByUserId(long userId) 061 throws com.liferay.portal.kernel.exception.SystemException; 062 063 /** 064 * Returns the browser tracker where userId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 065 * 066 * @param userId the user ID 067 * @param retrieveFromCache whether to use the finder cache 068 * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portal.model.BrowserTracker fetchByUserId(long userId, 072 boolean retrieveFromCache) 073 throws com.liferay.portal.kernel.exception.SystemException; 074 075 /** 076 * Removes the browser tracker where userId = ? from the database. 077 * 078 * @param userId the user ID 079 * @return the browser tracker that was removed 080 * @throws SystemException if a system exception occurred 081 */ 082 public com.liferay.portal.model.BrowserTracker removeByUserId(long userId) 083 throws com.liferay.portal.NoSuchBrowserTrackerException, 084 com.liferay.portal.kernel.exception.SystemException; 085 086 /** 087 * Returns the number of browser trackers where userId = ?. 088 * 089 * @param userId the user ID 090 * @return the number of matching browser trackers 091 * @throws SystemException if a system exception occurred 092 */ 093 public int countByUserId(long userId) 094 throws com.liferay.portal.kernel.exception.SystemException; 095 096 /** 097 * Caches the browser tracker in the entity cache if it is enabled. 098 * 099 * @param browserTracker the browser tracker 100 */ 101 public void cacheResult( 102 com.liferay.portal.model.BrowserTracker browserTracker); 103 104 /** 105 * Caches the browser trackers in the entity cache if it is enabled. 106 * 107 * @param browserTrackers the browser trackers 108 */ 109 public void cacheResult( 110 java.util.List<com.liferay.portal.model.BrowserTracker> browserTrackers); 111 112 /** 113 * Creates a new browser tracker with the primary key. Does not add the browser tracker to the database. 114 * 115 * @param browserTrackerId the primary key for the new browser tracker 116 * @return the new browser tracker 117 */ 118 public com.liferay.portal.model.BrowserTracker create(long browserTrackerId); 119 120 /** 121 * Removes the browser tracker with the primary key from the database. Also notifies the appropriate model listeners. 122 * 123 * @param browserTrackerId the primary key of the browser tracker 124 * @return the browser tracker that was removed 125 * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found 126 * @throws SystemException if a system exception occurred 127 */ 128 public com.liferay.portal.model.BrowserTracker remove(long browserTrackerId) 129 throws com.liferay.portal.NoSuchBrowserTrackerException, 130 com.liferay.portal.kernel.exception.SystemException; 131 132 public com.liferay.portal.model.BrowserTracker updateImpl( 133 com.liferay.portal.model.BrowserTracker browserTracker) 134 throws com.liferay.portal.kernel.exception.SystemException; 135 136 /** 137 * Returns the browser tracker with the primary key or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found. 138 * 139 * @param browserTrackerId the primary key of the browser tracker 140 * @return the browser tracker 141 * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found 142 * @throws SystemException if a system exception occurred 143 */ 144 public com.liferay.portal.model.BrowserTracker findByPrimaryKey( 145 long browserTrackerId) 146 throws com.liferay.portal.NoSuchBrowserTrackerException, 147 com.liferay.portal.kernel.exception.SystemException; 148 149 /** 150 * Returns the browser tracker with the primary key or returns <code>null</code> if it could not be found. 151 * 152 * @param browserTrackerId the primary key of the browser tracker 153 * @return the browser tracker, or <code>null</code> if a browser tracker with the primary key could not be found 154 * @throws SystemException if a system exception occurred 155 */ 156 public com.liferay.portal.model.BrowserTracker fetchByPrimaryKey( 157 long browserTrackerId) 158 throws com.liferay.portal.kernel.exception.SystemException; 159 160 /** 161 * Returns all the browser trackers. 162 * 163 * @return the browser trackers 164 * @throws SystemException if a system exception occurred 165 */ 166 public java.util.List<com.liferay.portal.model.BrowserTracker> findAll() 167 throws com.liferay.portal.kernel.exception.SystemException; 168 169 /** 170 * Returns a range of all the browser trackers. 171 * 172 * <p> 173 * 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.portal.model.impl.BrowserTrackerModelImpl}. 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. 174 * </p> 175 * 176 * @param start the lower bound of the range of browser trackers 177 * @param end the upper bound of the range of browser trackers (not inclusive) 178 * @return the range of browser trackers 179 * @throws SystemException if a system exception occurred 180 */ 181 public java.util.List<com.liferay.portal.model.BrowserTracker> findAll( 182 int start, int end) 183 throws com.liferay.portal.kernel.exception.SystemException; 184 185 /** 186 * Returns an ordered range of all the browser trackers. 187 * 188 * <p> 189 * 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.portal.model.impl.BrowserTrackerModelImpl}. 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. 190 * </p> 191 * 192 * @param start the lower bound of the range of browser trackers 193 * @param end the upper bound of the range of browser trackers (not inclusive) 194 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 195 * @return the ordered range of browser trackers 196 * @throws SystemException if a system exception occurred 197 */ 198 public java.util.List<com.liferay.portal.model.BrowserTracker> findAll( 199 int start, int end, 200 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 201 throws com.liferay.portal.kernel.exception.SystemException; 202 203 /** 204 * Removes all the browser trackers from the database. 205 * 206 * @throws SystemException if a system exception occurred 207 */ 208 public void removeAll() 209 throws com.liferay.portal.kernel.exception.SystemException; 210 211 /** 212 * Returns the number of browser trackers. 213 * 214 * @return the number of browser trackers 215 * @throws SystemException if a system exception occurred 216 */ 217 public int countAll() 218 throws com.liferay.portal.kernel.exception.SystemException; 219 }