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