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