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