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