001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.model.PortalPreferences;
019    
020    /**
021     * The persistence interface for the portal preferences 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 PortalPreferencesPersistenceImpl
029     * @see PortalPreferencesUtil
030     * @generated
031     */
032    public interface PortalPreferencesPersistence extends BasePersistence<PortalPreferences> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * 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.
037             */
038    
039            /**
040            * Caches the portal preferences in the entity cache if it is enabled.
041            *
042            * @param portalPreferences the portal preferences
043            */
044            public void cacheResult(
045                    com.liferay.portal.model.PortalPreferences portalPreferences);
046    
047            /**
048            * Caches the portal preferenceses in the entity cache if it is enabled.
049            *
050            * @param portalPreferenceses the portal preferenceses
051            */
052            public void cacheResult(
053                    java.util.List<com.liferay.portal.model.PortalPreferences> portalPreferenceses);
054    
055            /**
056            * Creates a new portal preferences with the primary key. Does not add the portal preferences to the database.
057            *
058            * @param portalPreferencesId the primary key for the new portal preferences
059            * @return the new portal preferences
060            */
061            public com.liferay.portal.model.PortalPreferences create(
062                    long portalPreferencesId);
063    
064            /**
065            * Removes the portal preferences with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param portalPreferencesId the primary key of the portal preferences
068            * @return the portal preferences that was removed
069            * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portal.model.PortalPreferences remove(
073                    long portalPreferencesId)
074                    throws com.liferay.portal.NoSuchPreferencesException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            public com.liferay.portal.model.PortalPreferences updateImpl(
078                    com.liferay.portal.model.PortalPreferences portalPreferences,
079                    boolean merge)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Returns the portal preferences with the primary key or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found.
084            *
085            * @param portalPreferencesId the primary key of the portal preferences
086            * @return the portal preferences
087            * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.PortalPreferences findByPrimaryKey(
091                    long portalPreferencesId)
092                    throws com.liferay.portal.NoSuchPreferencesException,
093                            com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Returns the portal preferences with the primary key or returns <code>null</code> if it could not be found.
097            *
098            * @param portalPreferencesId the primary key of the portal preferences
099            * @return the portal preferences, or <code>null</code> if a portal preferences with the primary key could not be found
100            * @throws SystemException if a system exception occurred
101            */
102            public com.liferay.portal.model.PortalPreferences fetchByPrimaryKey(
103                    long portalPreferencesId)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Returns the portal preferences where ownerId = &#63; and ownerType = &#63; or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found.
108            *
109            * @param ownerId the owner ID
110            * @param ownerType the owner type
111            * @return the matching portal preferences
112            * @throws com.liferay.portal.NoSuchPreferencesException if a matching portal preferences could not be found
113            * @throws SystemException if a system exception occurred
114            */
115            public com.liferay.portal.model.PortalPreferences findByO_O(long ownerId,
116                    int ownerType)
117                    throws com.liferay.portal.NoSuchPreferencesException,
118                            com.liferay.portal.kernel.exception.SystemException;
119    
120            /**
121            * 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.
122            *
123            * @param ownerId the owner ID
124            * @param ownerType the owner type
125            * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found
126            * @throws SystemException if a system exception occurred
127            */
128            public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId,
129                    int ownerType)
130                    throws com.liferay.portal.kernel.exception.SystemException;
131    
132            /**
133            * 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.
134            *
135            * @param ownerId the owner ID
136            * @param ownerType the owner type
137            * @param retrieveFromCache whether to use the finder cache
138            * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found
139            * @throws SystemException if a system exception occurred
140            */
141            public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId,
142                    int ownerType, boolean retrieveFromCache)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Returns all the portal preferenceses.
147            *
148            * @return the portal preferenceses
149            * @throws SystemException if a system exception occurred
150            */
151            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll()
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            /**
155            * Returns a range of all the portal preferenceses.
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.
159            * </p>
160            *
161            * @param start the lower bound of the range of portal preferenceses
162            * @param end the upper bound of the range of portal preferenceses (not inclusive)
163            * @return the range of portal preferenceses
164            * @throws SystemException if a system exception occurred
165            */
166            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll(
167                    int start, int end)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns an ordered range of all the portal preferenceses.
172            *
173            * <p>
174            * 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.
175            * </p>
176            *
177            * @param start the lower bound of the range of portal preferenceses
178            * @param end the upper bound of the range of portal preferenceses (not inclusive)
179            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
180            * @return the ordered range of portal preferenceses
181            * @throws SystemException if a system exception occurred
182            */
183            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll(
184                    int start, int end,
185                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186                    throws com.liferay.portal.kernel.exception.SystemException;
187    
188            /**
189            * Removes the portal preferences where ownerId = &#63; and ownerType = &#63; from the database.
190            *
191            * @param ownerId the owner ID
192            * @param ownerType the owner type
193            * @throws SystemException if a system exception occurred
194            */
195            public void removeByO_O(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    
227            public PortalPreferences remove(PortalPreferences portalPreferences)
228                    throws SystemException;
229    }