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