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 to cache 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 to cache 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 to remove 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 * Finds 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 to find 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 * Finds 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 to find 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 * Finds the portal preferences where ownerId = ? and ownerType = ? or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found. 108 * 109 * @param ownerId the owner ID to search with 110 * @param ownerType the owner type to search with 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 * Finds the portal preferences where ownerId = ? and ownerType = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 122 * 123 * @param ownerId the owner ID to search with 124 * @param ownerType the owner type to search with 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 * Finds the portal preferences where ownerId = ? and ownerType = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 134 * 135 * @param ownerId the owner ID to search with 136 * @param ownerType the owner type to search with 137 * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found 138 * @throws SystemException if a system exception occurred 139 */ 140 public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId, 141 int ownerType, boolean retrieveFromCache) 142 throws com.liferay.portal.kernel.exception.SystemException; 143 144 /** 145 * Finds all the portal preferenceses. 146 * 147 * @return the portal preferenceses 148 * @throws SystemException if a system exception occurred 149 */ 150 public java.util.List<com.liferay.portal.model.PortalPreferences> findAll() 151 throws com.liferay.portal.kernel.exception.SystemException; 152 153 /** 154 * Finds a range of all the portal preferenceses. 155 * 156 * <p> 157 * 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. 158 * </p> 159 * 160 * @param start the lower bound of the range of portal preferenceses to return 161 * @param end the upper bound of the range of portal preferenceses to return (not inclusive) 162 * @return the range of portal preferenceses 163 * @throws SystemException if a system exception occurred 164 */ 165 public java.util.List<com.liferay.portal.model.PortalPreferences> findAll( 166 int start, int end) 167 throws com.liferay.portal.kernel.exception.SystemException; 168 169 /** 170 * Finds 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 174 * </p> 175 * 176 * @param start the lower bound of the range of portal preferenceses to return 177 * @param end the upper bound of the range of portal preferenceses to return (not inclusive) 178 * @param orderByComparator the comparator to order the results by 179 * @return the ordered range of portal preferenceses 180 * @throws SystemException if a system exception occurred 181 */ 182 public java.util.List<com.liferay.portal.model.PortalPreferences> findAll( 183 int start, int end, 184 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 185 throws com.liferay.portal.kernel.exception.SystemException; 186 187 /** 188 * Removes the portal preferences where ownerId = ? and ownerType = ? from the database. 189 * 190 * @param ownerId the owner ID to search with 191 * @param ownerType the owner type to search with 192 * @throws SystemException if a system exception occurred 193 */ 194 public void removeByO_O(long ownerId, int ownerType) 195 throws com.liferay.portal.NoSuchPreferencesException, 196 com.liferay.portal.kernel.exception.SystemException; 197 198 /** 199 * Removes all the portal preferenceses from the database. 200 * 201 * @throws SystemException if a system exception occurred 202 */ 203 public void removeAll() 204 throws com.liferay.portal.kernel.exception.SystemException; 205 206 /** 207 * Counts all the portal preferenceses where ownerId = ? and ownerType = ?. 208 * 209 * @param ownerId the owner ID to search with 210 * @param ownerType the owner type to search with 211 * @return the number of matching portal preferenceses 212 * @throws SystemException if a system exception occurred 213 */ 214 public int countByO_O(long ownerId, int ownerType) 215 throws com.liferay.portal.kernel.exception.SystemException; 216 217 /** 218 * Counts all the portal preferenceses. 219 * 220 * @return the number of portal preferenceses 221 * @throws SystemException if a system exception occurred 222 */ 223 public int countAll() 224 throws com.liferay.portal.kernel.exception.SystemException; 225 226 public PortalPreferences remove(PortalPreferences portalPreferences) 227 throws SystemException; 228 }