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.exception.NoSuchPreferencesException;
020    import com.liferay.portal.model.PortalPreferences;
021    
022    /**
023     * The persistence interface for the portal preferences service.
024     *
025     * <p>
026     * Caching information and settings can be found in <code>portal.properties</code>
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see com.liferay.portal.service.persistence.impl.PortalPreferencesPersistenceImpl
031     * @see PortalPreferencesUtil
032     * @generated
033     */
034    @ProviderType
035    public interface PortalPreferencesPersistence extends BasePersistence<PortalPreferences> {
036            /*
037             * NOTE FOR DEVELOPERS:
038             *
039             * 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.
040             */
041    
042            /**
043            * Returns the portal preferences where ownerId = &#63; and ownerType = &#63; or throws a {@link NoSuchPreferencesException} if it could not be found.
044            *
045            * @param ownerId the owner ID
046            * @param ownerType the owner type
047            * @return the matching portal preferences
048            * @throws NoSuchPreferencesException if a matching portal preferences could not be found
049            */
050            public PortalPreferences findByO_O(long ownerId, int ownerType)
051                    throws NoSuchPreferencesException;
052    
053            /**
054            * 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.
055            *
056            * @param ownerId the owner ID
057            * @param ownerType the owner type
058            * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found
059            */
060            public PortalPreferences fetchByO_O(long ownerId, 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 retrieve from 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 PortalPreferences fetchByO_O(long ownerId, int ownerType,
071                    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 PortalPreferences removeByO_O(long ownerId, int ownerType)
081                    throws NoSuchPreferencesException;
082    
083            /**
084            * Returns the number of portal preferenceses where ownerId = &#63; and ownerType = &#63;.
085            *
086            * @param ownerId the owner ID
087            * @param ownerType the owner type
088            * @return the number of matching portal preferenceses
089            */
090            public int countByO_O(long ownerId, int ownerType);
091    
092            /**
093            * Caches the portal preferences in the entity cache if it is enabled.
094            *
095            * @param portalPreferences the portal preferences
096            */
097            public void cacheResult(PortalPreferences portalPreferences);
098    
099            /**
100            * Caches the portal preferenceses in the entity cache if it is enabled.
101            *
102            * @param portalPreferenceses the portal preferenceses
103            */
104            public void cacheResult(
105                    java.util.List<PortalPreferences> portalPreferenceses);
106    
107            /**
108            * Creates a new portal preferences with the primary key. Does not add the portal preferences to the database.
109            *
110            * @param portalPreferencesId the primary key for the new portal preferences
111            * @return the new portal preferences
112            */
113            public PortalPreferences create(long portalPreferencesId);
114    
115            /**
116            * Removes the portal preferences with the primary key from the database. Also notifies the appropriate model listeners.
117            *
118            * @param portalPreferencesId the primary key of the portal preferences
119            * @return the portal preferences that was removed
120            * @throws NoSuchPreferencesException if a portal preferences with the primary key could not be found
121            */
122            public PortalPreferences remove(long portalPreferencesId)
123                    throws NoSuchPreferencesException;
124    
125            public PortalPreferences updateImpl(PortalPreferences portalPreferences);
126    
127            /**
128            * Returns the portal preferences with the primary key or throws a {@link NoSuchPreferencesException} if it could not be found.
129            *
130            * @param portalPreferencesId the primary key of the portal preferences
131            * @return the portal preferences
132            * @throws NoSuchPreferencesException if a portal preferences with the primary key could not be found
133            */
134            public PortalPreferences findByPrimaryKey(long portalPreferencesId)
135                    throws NoSuchPreferencesException;
136    
137            /**
138            * Returns the portal preferences with the primary key or returns <code>null</code> if it could not be found.
139            *
140            * @param portalPreferencesId the primary key of the portal preferences
141            * @return the portal preferences, or <code>null</code> if a portal preferences with the primary key could not be found
142            */
143            public PortalPreferences fetchByPrimaryKey(long portalPreferencesId);
144    
145            @Override
146            public java.util.Map<java.io.Serializable, PortalPreferences> fetchByPrimaryKeys(
147                    java.util.Set<java.io.Serializable> primaryKeys);
148    
149            /**
150            * Returns all the portal preferenceses.
151            *
152            * @return the portal preferenceses
153            */
154            public java.util.List<PortalPreferences> findAll();
155    
156            /**
157            * Returns a range of all the portal preferenceses.
158            *
159            * <p>
160            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
161            * </p>
162            *
163            * @param start the lower bound of the range of portal preferenceses
164            * @param end the upper bound of the range of portal preferenceses (not inclusive)
165            * @return the range of portal preferenceses
166            */
167            public java.util.List<PortalPreferences> findAll(int start, int end);
168    
169            /**
170            * Returns an ordered range of all the portal preferenceses.
171            *
172            * <p>
173            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
174            * </p>
175            *
176            * @param start the lower bound of the range of portal preferenceses
177            * @param end the upper bound of the range of portal preferenceses (not inclusive)
178            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
179            * @return the ordered range of portal preferenceses
180            */
181            public java.util.List<PortalPreferences> findAll(int start, int end,
182                    com.liferay.portal.kernel.util.OrderByComparator<PortalPreferences> orderByComparator);
183    
184            /**
185            * Returns an ordered range of all the portal preferenceses.
186            *
187            * <p>
188            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
189            * </p>
190            *
191            * @param start the lower bound of the range of portal preferenceses
192            * @param end the upper bound of the range of portal preferenceses (not inclusive)
193            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
194            * @param retrieveFromCache whether to retrieve from the finder cache
195            * @return the ordered range of portal preferenceses
196            */
197            public java.util.List<PortalPreferences> findAll(int start, int end,
198                    com.liferay.portal.kernel.util.OrderByComparator<PortalPreferences> orderByComparator,
199                    boolean retrieveFromCache);
200    
201            /**
202            * Removes all the portal preferenceses from the database.
203            */
204            public void removeAll();
205    
206            /**
207            * Returns the number of portal preferenceses.
208            *
209            * @return the number of portal preferenceses
210            */
211            public int countAll();
212    }