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