001    /**
002     * Copyright (c) 2000-2011 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.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
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
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
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            * Returns 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
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            * Returns 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
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            * Returns the browser tracker where userId = &#63; or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found.
105            *
106            * @param userId the user ID
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            * Returns the browser tracker where userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
117            *
118            * @param userId the user ID
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            * Returns the browser tracker where userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
127            *
128            * @param userId the user ID
129            * @param retrieveFromCache whether to use the finder cache
130            * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found
131            * @throws SystemException if a system exception occurred
132            */
133            public com.liferay.portal.model.BrowserTracker fetchByUserId(long userId,
134                    boolean retrieveFromCache)
135                    throws com.liferay.portal.kernel.exception.SystemException;
136    
137            /**
138            * Returns all the browser trackers.
139            *
140            * @return the browser trackers
141            * @throws SystemException if a system exception occurred
142            */
143            public java.util.List<com.liferay.portal.model.BrowserTracker> findAll()
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Returns a range of all the browser trackers.
148            *
149            * <p>
150            * 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.
151            * </p>
152            *
153            * @param start the lower bound of the range of browser trackers
154            * @param end the upper bound of the range of browser trackers (not inclusive)
155            * @return the range of browser trackers
156            * @throws SystemException if a system exception occurred
157            */
158            public java.util.List<com.liferay.portal.model.BrowserTracker> findAll(
159                    int start, int end)
160                    throws com.liferay.portal.kernel.exception.SystemException;
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
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            * @throws SystemException if a system exception occurred
174            */
175            public java.util.List<com.liferay.portal.model.BrowserTracker> findAll(
176                    int start, int end,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.kernel.exception.SystemException;
179    
180            /**
181            * Removes the browser tracker where userId = &#63; from the database.
182            *
183            * @param userId the user ID
184            * @throws SystemException if a system exception occurred
185            */
186            public void 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    
217            public BrowserTracker remove(BrowserTracker browserTracker)
218                    throws SystemException;
219    }