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 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 = &#63; or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found.
043            *
044            * @param userId the user ID
045            * @return the matching browser tracker
046            * @throws com.liferay.portal.NoSuchBrowserTrackerException if a matching browser tracker could not be found
047            */
048            public com.liferay.portal.model.BrowserTracker findByUserId(long userId)
049                    throws com.liferay.portal.NoSuchBrowserTrackerException;
050    
051            /**
052            * Returns the browser tracker where userId = &#63; 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 com.liferay.portal.model.BrowserTracker fetchByUserId(long userId);
058    
059            /**
060            * Returns the browser tracker where userId = &#63; 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 use 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 com.liferay.portal.model.BrowserTracker fetchByUserId(long userId,
067                    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 com.liferay.portal.model.BrowserTracker removeByUserId(long userId)
076                    throws com.liferay.portal.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(
092                    com.liferay.portal.model.BrowserTracker browserTracker);
093    
094            /**
095            * Caches the browser trackers in the entity cache if it is enabled.
096            *
097            * @param browserTrackers the browser trackers
098            */
099            public void cacheResult(
100                    java.util.List<com.liferay.portal.model.BrowserTracker> browserTrackers);
101    
102            /**
103            * Creates a new browser tracker with the primary key. Does not add the browser tracker to the database.
104            *
105            * @param browserTrackerId the primary key for the new browser tracker
106            * @return the new browser tracker
107            */
108            public com.liferay.portal.model.BrowserTracker create(long browserTrackerId);
109    
110            /**
111            * Removes the browser tracker with the primary key from the database. Also notifies the appropriate model listeners.
112            *
113            * @param browserTrackerId the primary key of the browser tracker
114            * @return the browser tracker that was removed
115            * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found
116            */
117            public com.liferay.portal.model.BrowserTracker remove(long browserTrackerId)
118                    throws com.liferay.portal.NoSuchBrowserTrackerException;
119    
120            public com.liferay.portal.model.BrowserTracker updateImpl(
121                    com.liferay.portal.model.BrowserTracker browserTracker);
122    
123            /**
124            * Returns the browser tracker with the primary key or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found.
125            *
126            * @param browserTrackerId the primary key of the browser tracker
127            * @return the browser tracker
128            * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found
129            */
130            public com.liferay.portal.model.BrowserTracker findByPrimaryKey(
131                    long browserTrackerId)
132                    throws com.liferay.portal.NoSuchBrowserTrackerException;
133    
134            /**
135            * Returns the browser tracker with the primary key or returns <code>null</code> if it could not be found.
136            *
137            * @param browserTrackerId the primary key of the browser tracker
138            * @return the browser tracker, or <code>null</code> if a browser tracker with the primary key could not be found
139            */
140            public com.liferay.portal.model.BrowserTracker fetchByPrimaryKey(
141                    long browserTrackerId);
142    
143            @Override
144            public java.util.Map<java.io.Serializable, com.liferay.portal.model.BrowserTracker> fetchByPrimaryKeys(
145                    java.util.Set<java.io.Serializable> primaryKeys);
146    
147            /**
148            * Returns all the browser trackers.
149            *
150            * @return the browser trackers
151            */
152            public java.util.List<com.liferay.portal.model.BrowserTracker> findAll();
153    
154            /**
155            * Returns a 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. 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.
159            * </p>
160            *
161            * @param start the lower bound of the range of browser trackers
162            * @param end the upper bound of the range of browser trackers (not inclusive)
163            * @return the range of browser trackers
164            */
165            public java.util.List<com.liferay.portal.model.BrowserTracker> findAll(
166                    int start, int end);
167    
168            /**
169            * Returns an ordered range of all the browser trackers.
170            *
171            * <p>
172            * 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.
173            * </p>
174            *
175            * @param start the lower bound of the range of browser trackers
176            * @param end the upper bound of the range of browser trackers (not inclusive)
177            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
178            * @return the ordered range of browser trackers
179            */
180            public java.util.List<com.liferay.portal.model.BrowserTracker> findAll(
181                    int start, int end,
182                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.BrowserTracker> orderByComparator);
183    
184            /**
185            * Removes all the browser trackers from the database.
186            */
187            public void removeAll();
188    
189            /**
190            * Returns the number of browser trackers.
191            *
192            * @return the number of browser trackers
193            */
194            public int countAll();
195    }