001    /**
002     * Copyright (c) 2000-present 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            */
049            public com.liferay.portal.model.PortalPreferences findByO_O(long ownerId,
050                    int ownerType) throws com.liferay.portal.NoSuchPreferencesException;
051    
052            /**
053            * 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.
054            *
055            * @param ownerId the owner ID
056            * @param ownerType the owner type
057            * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found
058            */
059            public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId,
060                    int ownerType);
061    
062            /**
063            * 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.
064            *
065            * @param ownerId the owner ID
066            * @param ownerType the owner type
067            * @param retrieveFromCache whether to use the finder cache
068            * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found
069            */
070            public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId,
071                    int ownerType, boolean retrieveFromCache);
072    
073            /**
074            * Removes the portal preferences where ownerId = &#63; and ownerType = &#63; from the database.
075            *
076            * @param ownerId the owner ID
077            * @param ownerType the owner type
078            * @return the portal preferences that was removed
079            */
080            public com.liferay.portal.model.PortalPreferences removeByO_O(
081                    long ownerId, int ownerType)
082                    throws com.liferay.portal.NoSuchPreferencesException;
083    
084            /**
085            * Returns the number of portal preferenceses where ownerId = &#63; and ownerType = &#63;.
086            *
087            * @param ownerId the owner ID
088            * @param ownerType the owner type
089            * @return the number of matching portal preferenceses
090            */
091            public int countByO_O(long ownerId, int ownerType);
092    
093            /**
094            * Caches the portal preferences in the entity cache if it is enabled.
095            *
096            * @param portalPreferences the portal preferences
097            */
098            public void cacheResult(
099                    com.liferay.portal.model.PortalPreferences portalPreferences);
100    
101            /**
102            * Caches the portal preferenceses in the entity cache if it is enabled.
103            *
104            * @param portalPreferenceses the portal preferenceses
105            */
106            public void cacheResult(
107                    java.util.List<com.liferay.portal.model.PortalPreferences> portalPreferenceses);
108    
109            /**
110            * Creates a new portal preferences with the primary key. Does not add the portal preferences to the database.
111            *
112            * @param portalPreferencesId the primary key for the new portal preferences
113            * @return the new portal preferences
114            */
115            public com.liferay.portal.model.PortalPreferences create(
116                    long portalPreferencesId);
117    
118            /**
119            * Removes the portal preferences with the primary key from the database. Also notifies the appropriate model listeners.
120            *
121            * @param portalPreferencesId the primary key of the portal preferences
122            * @return the portal preferences that was removed
123            * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found
124            */
125            public com.liferay.portal.model.PortalPreferences remove(
126                    long portalPreferencesId)
127                    throws com.liferay.portal.NoSuchPreferencesException;
128    
129            public com.liferay.portal.model.PortalPreferences updateImpl(
130                    com.liferay.portal.model.PortalPreferences portalPreferences);
131    
132            /**
133            * Returns the portal preferences with the primary key or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found.
134            *
135            * @param portalPreferencesId the primary key of the portal preferences
136            * @return the portal preferences
137            * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found
138            */
139            public com.liferay.portal.model.PortalPreferences findByPrimaryKey(
140                    long portalPreferencesId)
141                    throws com.liferay.portal.NoSuchPreferencesException;
142    
143            /**
144            * Returns the portal preferences with the primary key or returns <code>null</code> if it could not be found.
145            *
146            * @param portalPreferencesId the primary key of the portal preferences
147            * @return the portal preferences, or <code>null</code> if a portal preferences with the primary key could not be found
148            */
149            public com.liferay.portal.model.PortalPreferences fetchByPrimaryKey(
150                    long portalPreferencesId);
151    
152            @Override
153            public java.util.Map<java.io.Serializable, com.liferay.portal.model.PortalPreferences> fetchByPrimaryKeys(
154                    java.util.Set<java.io.Serializable> primaryKeys);
155    
156            /**
157            * Returns all the portal preferenceses.
158            *
159            * @return the portal preferenceses
160            */
161            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll();
162    
163            /**
164            * Returns a range of all the portal preferenceses.
165            *
166            * <p>
167            * 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.
168            * </p>
169            *
170            * @param start the lower bound of the range of portal preferenceses
171            * @param end the upper bound of the range of portal preferenceses (not inclusive)
172            * @return the range of portal preferenceses
173            */
174            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll(
175                    int start, int end);
176    
177            /**
178            * Returns an ordered range of all the portal preferenceses.
179            *
180            * <p>
181            * 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.
182            * </p>
183            *
184            * @param start the lower bound of the range of portal preferenceses
185            * @param end the upper bound of the range of portal preferenceses (not inclusive)
186            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
187            * @return the ordered range of portal preferenceses
188            */
189            public java.util.List<com.liferay.portal.model.PortalPreferences> findAll(
190                    int start, int end,
191                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PortalPreferences> orderByComparator);
192    
193            /**
194            * Removes all the portal preferenceses from the database.
195            */
196            public void removeAll();
197    
198            /**
199            * Returns the number of portal preferenceses.
200            *
201            * @return the number of portal preferenceses
202            */
203            public int countAll();
204    }