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