001    /**
002     * Copyright (c) 2000-2013 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     * Caching information and settings can be found in <code>portal.properties</code>
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             * NOTE FOR DEVELOPERS:
034             *
035             * 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.
036             */
037    
038            /**
039            * Caches the browser tracker in the entity cache if it is enabled.
040            *
041            * @param browserTracker the browser tracker
042            */
043            public void cacheResult(
044                    com.liferay.portal.model.BrowserTracker browserTracker);
045    
046            /**
047            * Caches the browser trackers in the entity cache if it is enabled.
048            *
049            * @param browserTrackers the browser trackers
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.BrowserTracker> browserTrackers);
053    
054            /**
055            * Creates a new browser tracker with the primary key. Does not add the browser tracker to the database.
056            *
057            * @param browserTrackerId the primary key for the new browser tracker
058            * @return the new browser tracker
059            */
060            public com.liferay.portal.model.BrowserTracker create(long browserTrackerId);
061    
062            /**
063            * Removes the browser tracker with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param browserTrackerId the primary key of the browser tracker
066            * @return the browser tracker that was removed
067            * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found
068            * @throws SystemException if a system exception occurred
069            */
070            public com.liferay.portal.model.BrowserTracker remove(long browserTrackerId)
071                    throws com.liferay.portal.NoSuchBrowserTrackerException,
072                            com.liferay.portal.kernel.exception.SystemException;
073    
074            public com.liferay.portal.model.BrowserTracker updateImpl(
075                    com.liferay.portal.model.BrowserTracker browserTracker, boolean merge)
076                    throws com.liferay.portal.kernel.exception.SystemException;
077    
078            /**
079            * Returns the browser tracker with the primary key or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found.
080            *
081            * @param browserTrackerId the primary key of the browser tracker
082            * @return the browser tracker
083            * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found
084            * @throws SystemException if a system exception occurred
085            */
086            public com.liferay.portal.model.BrowserTracker findByPrimaryKey(
087                    long browserTrackerId)
088                    throws com.liferay.portal.NoSuchBrowserTrackerException,
089                            com.liferay.portal.kernel.exception.SystemException;
090    
091            /**
092            * Returns the browser tracker with the primary key or returns <code>null</code> if it could not be found.
093            *
094            * @param browserTrackerId the primary key of the browser tracker
095            * @return the browser tracker, or <code>null</code> if a browser tracker with the primary key could not be found
096            * @throws SystemException if a system exception occurred
097            */
098            public com.liferay.portal.model.BrowserTracker fetchByPrimaryKey(
099                    long browserTrackerId)
100                    throws com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * Returns the browser tracker where userId = &#63; or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found.
104            *
105            * @param userId the user ID
106            * @return the matching browser tracker
107            * @throws com.liferay.portal.NoSuchBrowserTrackerException if a matching browser tracker could not be found
108            * @throws SystemException if a system exception occurred
109            */
110            public com.liferay.portal.model.BrowserTracker findByUserId(long userId)
111                    throws com.liferay.portal.NoSuchBrowserTrackerException,
112                            com.liferay.portal.kernel.exception.SystemException;
113    
114            /**
115            * Returns the browser tracker where userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
116            *
117            * @param userId the user ID
118            * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found
119            * @throws SystemException if a system exception occurred
120            */
121            public com.liferay.portal.model.BrowserTracker fetchByUserId(long userId)
122                    throws com.liferay.portal.kernel.exception.SystemException;
123    
124            /**
125            * Returns the browser tracker where userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
126            *
127            * @param userId the user ID
128            * @param retrieveFromCache whether to use the finder cache
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            * Returns 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            * Returns 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
153            * @param end the upper bound of the range of browser trackers (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            * 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 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
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            * @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 = &#63; from the database.
181            *
182            * @param userId the user ID
183            * @return the browser tracker that was removed
184            * @throws SystemException if a system exception occurred
185            */
186            public com.liferay.portal.model.BrowserTracker removeByUserId(long userId)
187                    throws com.liferay.portal.NoSuchBrowserTrackerException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Removes all the browser trackers from the database.
192            *
193            * @throws SystemException if a system exception occurred
194            */
195            public void removeAll()
196                    throws com.liferay.portal.kernel.exception.SystemException;
197    
198            /**
199            * Returns the number of browser trackers where userId = &#63;.
200            *
201            * @param userId the user ID
202            * @return the number of matching browser trackers
203            * @throws SystemException if a system exception occurred
204            */
205            public int countByUserId(long userId)
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            /**
209            * Returns the number of browser trackers.
210            *
211            * @return the number of browser trackers
212            * @throws SystemException if a system exception occurred
213            */
214            public int countAll()
215                    throws com.liferay.portal.kernel.exception.SystemException;
216    }