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