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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.PortalPreferences;
020    
021    /**
022     * The persistence interface for the portal preferences 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 PortalPreferencesPersistenceImpl
030     * @see PortalPreferencesUtil
031     * @generated
032     */
033    @ProviderType
034    public interface PortalPreferencesPersistence extends BasePersistence<PortalPreferences> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link PortalPreferencesUtil} to access the portal preferences persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns the portal preferences where ownerId = &#63; and ownerType = &#63; or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found.
043            *
044            * @param ownerId the owner ID
045            * @param ownerType the owner type
046            * @return the matching portal preferences
047            * @throws com.liferay.portal.NoSuchPreferencesException if a matching portal preferences could not be found
048            * @throws SystemException if a system exception occurred
049            */
050            public com.liferay.portal.model.PortalPreferences findByO_O(long ownerId,
051                    int ownerType)
052                    throws com.liferay.portal.NoSuchPreferencesException,
053                            com.liferay.portal.kernel.exception.SystemException;
054    
055            /**
056            * Returns the portal preferences where ownerId = &#63; and ownerType = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
057            *
058            * @param ownerId the owner ID
059            * @param ownerType the owner type
060            * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId,
064                    int ownerType)
065                    throws com.liferay.portal.kernel.exception.SystemException;
066    
067            /**
068            * Returns the portal preferences where ownerId = &#63; and ownerType = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
069            *
070            * @param ownerId the owner ID
071            * @param ownerType the owner type
072            * @param retrieveFromCache whether to use the finder cache
073            * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found
074            * @throws SystemException if a system exception occurred
075            */
076            public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId,
077                    int ownerType, boolean retrieveFromCache)
078                    throws com.liferay.portal.kernel.exception.SystemException;
079    
080            /**
081            * Removes the portal preferences where ownerId = &#63; and ownerType = &#63; from the database.
082            *
083            * @param ownerId the owner ID
084            * @param ownerType the owner type
085            * @return the portal preferences that was removed
086            * @throws SystemException if a system exception occurred
087            */
088            public com.liferay.portal.model.PortalPreferences removeByO_O(
089                    long ownerId, int ownerType)
090                    throws com.liferay.portal.NoSuchPreferencesException,
091                            com.liferay.portal.kernel.exception.SystemException;
092    
093            /**
094            * Returns the number of portal preferenceses where ownerId = &#63; and ownerType = &#63;.
095            *
096            * @param ownerId the owner ID
097            * @param ownerType the owner type
098            * @return the number of matching portal preferenceses
099            * @throws SystemException if a system exception occurred
100            */
101            public int countByO_O(long ownerId, int ownerType)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            /**
105            * Caches the portal preferences in the entity cache if it is enabled.
106            *
107            * @param portalPreferences the portal preferences
108            */
109            public void cacheResult(
110                    com.liferay.portal.model.PortalPreferences portalPreferences);
111    
112            /**
113            * Caches the portal preferenceses in the entity cache if it is enabled.
114            *
115            * @param portalPreferenceses the portal preferenceses
116            */
117            public void cacheResult(
118                    java.util.List<com.liferay.portal.model.PortalPreferences> portalPreferenceses);
119    
120            /**
121            * Creates a new portal preferences with the primary key. Does not add the portal preferences to the database.
122            *
123            * @param portalPreferencesId the primary key for the new portal preferences
124            * @return the new portal preferences
125            */
126            public com.liferay.portal.model.PortalPreferences create(
127                    long portalPreferencesId);
128    
129            /**
130            * Removes the portal preferences with the primary key from the database. Also notifies the appropriate model listeners.
131            *
132            * @param portalPreferencesId the primary key of the portal preferences
133            * @return the portal preferences that was removed
134            * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found
135            * @throws SystemException if a system exception occurred
136            */
137            public com.liferay.portal.model.PortalPreferences remove(
138                    long portalPreferencesId)
139                    throws com.liferay.portal.NoSuchPreferencesException,
140                            com.liferay.portal.kernel.exception.SystemException;
141    
142            public com.liferay.portal.model.PortalPreferences updateImpl(
143                    com.liferay.portal.model.PortalPreferences portalPreferences)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Returns the portal preferences with the primary key or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found.
148            *
149            * @param portalPreferencesId the primary key of the portal preferences
150            * @return the portal preferences
151            * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.PortalPreferences findByPrimaryKey(
155                    long portalPreferencesId)
156                    throws com.liferay.portal.NoSuchPreferencesException,
157                            com.liferay.portal.kernel.exception.SystemException;
158    
159            /**
160            * Returns the portal preferences with the primary key or returns <code>null</code> if it could not be found.
161            *
162            * @param portalPreferencesId the primary key of the portal preferences
163            * @return the portal preferences, or <code>null</code> if a portal preferences with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.PortalPreferences fetchByPrimaryKey(
167                    long portalPreferencesId)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns all the portal preferenceses.
172            *
173            * @return the portal preferenceses
174            * @throws SystemException if a system exception occurred
175            */
176            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll()
177                    throws com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Returns a range of all the portal preferenceses.
181            *
182            * <p>
183            * 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.PortalPreferencesModelImpl}. 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.
184            * </p>
185            *
186            * @param start the lower bound of the range of portal preferenceses
187            * @param end the upper bound of the range of portal preferenceses (not inclusive)
188            * @return the range of portal preferenceses
189            * @throws SystemException if a system exception occurred
190            */
191            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll(
192                    int start, int end)
193                    throws com.liferay.portal.kernel.exception.SystemException;
194    
195            /**
196            * Returns an ordered range of all the portal preferenceses.
197            *
198            * <p>
199            * 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.PortalPreferencesModelImpl}. 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.
200            * </p>
201            *
202            * @param start the lower bound of the range of portal preferenceses
203            * @param end the upper bound of the range of portal preferenceses (not inclusive)
204            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
205            * @return the ordered range of portal preferenceses
206            * @throws SystemException if a system exception occurred
207            */
208            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll(
209                    int start, int end,
210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211                    throws com.liferay.portal.kernel.exception.SystemException;
212    
213            /**
214            * Removes all the portal preferenceses from the database.
215            *
216            * @throws SystemException if a system exception occurred
217            */
218            public void removeAll()
219                    throws com.liferay.portal.kernel.exception.SystemException;
220    
221            /**
222            * Returns the number of portal preferenceses.
223            *
224            * @return the number of portal preferenceses
225            * @throws SystemException if a system exception occurred
226            */
227            public int countAll()
228                    throws com.liferay.portal.kernel.exception.SystemException;
229    }