001 /** 002 * Copyright (c) 2000-2013 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 * Caches the portal preferences in the entity cache if it is enabled. 040 * 041 * @param portalPreferences the portal preferences 042 */ 043 public void cacheResult( 044 com.liferay.portal.model.PortalPreferences portalPreferences); 045 046 /** 047 * Caches the portal preferenceses in the entity cache if it is enabled. 048 * 049 * @param portalPreferenceses the portal preferenceses 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portal.model.PortalPreferences> portalPreferenceses); 053 054 /** 055 * Creates a new portal preferences with the primary key. Does not add the portal preferences to the database. 056 * 057 * @param portalPreferencesId the primary key for the new portal preferences 058 * @return the new portal preferences 059 */ 060 public com.liferay.portal.model.PortalPreferences create( 061 long portalPreferencesId); 062 063 /** 064 * Removes the portal preferences with the primary key from the database. Also notifies the appropriate model listeners. 065 * 066 * @param portalPreferencesId the primary key of the portal preferences 067 * @return the portal preferences that was removed 068 * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portal.model.PortalPreferences remove( 072 long portalPreferencesId) 073 throws com.liferay.portal.NoSuchPreferencesException, 074 com.liferay.portal.kernel.exception.SystemException; 075 076 public com.liferay.portal.model.PortalPreferences updateImpl( 077 com.liferay.portal.model.PortalPreferences portalPreferences, 078 boolean merge) 079 throws com.liferay.portal.kernel.exception.SystemException; 080 081 /** 082 * Returns the portal preferences with the primary key or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found. 083 * 084 * @param portalPreferencesId the primary key of the portal preferences 085 * @return the portal preferences 086 * @throws com.liferay.portal.NoSuchPreferencesException if a portal preferences with the primary key could not be found 087 * @throws SystemException if a system exception occurred 088 */ 089 public com.liferay.portal.model.PortalPreferences findByPrimaryKey( 090 long portalPreferencesId) 091 throws com.liferay.portal.NoSuchPreferencesException, 092 com.liferay.portal.kernel.exception.SystemException; 093 094 /** 095 * Returns the portal preferences with the primary key or returns <code>null</code> if it could not be found. 096 * 097 * @param portalPreferencesId the primary key of the portal preferences 098 * @return the portal preferences, or <code>null</code> if a portal preferences with the primary key could not be found 099 * @throws SystemException if a system exception occurred 100 */ 101 public com.liferay.portal.model.PortalPreferences fetchByPrimaryKey( 102 long portalPreferencesId) 103 throws com.liferay.portal.kernel.exception.SystemException; 104 105 /** 106 * Returns the portal preferences where ownerId = ? and ownerType = ? or throws a {@link com.liferay.portal.NoSuchPreferencesException} if it could not be found. 107 * 108 * @param ownerId the owner ID 109 * @param ownerType the owner type 110 * @return the matching portal preferences 111 * @throws com.liferay.portal.NoSuchPreferencesException if a matching portal preferences could not be found 112 * @throws SystemException if a system exception occurred 113 */ 114 public com.liferay.portal.model.PortalPreferences findByO_O(long ownerId, 115 int ownerType) 116 throws com.liferay.portal.NoSuchPreferencesException, 117 com.liferay.portal.kernel.exception.SystemException; 118 119 /** 120 * Returns the portal preferences where ownerId = ? and ownerType = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 121 * 122 * @param ownerId the owner ID 123 * @param ownerType the owner type 124 * @return the matching portal preferences, or <code>null</code> if a matching portal preferences could not be found 125 * @throws SystemException if a system exception occurred 126 */ 127 public com.liferay.portal.model.PortalPreferences fetchByO_O(long ownerId, 128 int ownerType) 129 throws com.liferay.portal.kernel.exception.SystemException; 130 131 /** 132 * Returns the portal preferences where ownerId = ? and ownerType = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 133 * 134 * @param ownerId the owner ID 135 * @param ownerType the owner type 136 * @param retrieveFromCache whether to use the finder cache 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 * Returns 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 * Returns 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 161 * @param end the upper bound of the range of portal preferenceses (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 * 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 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 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 * @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 191 * @param ownerType the owner type 192 * @return the portal preferences that was removed 193 * @throws SystemException if a system exception occurred 194 */ 195 public com.liferay.portal.model.PortalPreferences removeByO_O( 196 long ownerId, int ownerType) 197 throws com.liferay.portal.NoSuchPreferencesException, 198 com.liferay.portal.kernel.exception.SystemException; 199 200 /** 201 * Removes all the portal preferenceses from the database. 202 * 203 * @throws SystemException if a system exception occurred 204 */ 205 public void removeAll() 206 throws com.liferay.portal.kernel.exception.SystemException; 207 208 /** 209 * Returns the number of portal preferenceses where ownerId = ? and ownerType = ?. 210 * 211 * @param ownerId the owner ID 212 * @param ownerType the owner type 213 * @return the number of matching portal preferenceses 214 * @throws SystemException if a system exception occurred 215 */ 216 public int countByO_O(long ownerId, int ownerType) 217 throws com.liferay.portal.kernel.exception.SystemException; 218 219 /** 220 * Returns the number of portal preferenceses. 221 * 222 * @return the number of portal preferenceses 223 * @throws SystemException if a system exception occurred 224 */ 225 public int countAll() 226 throws com.liferay.portal.kernel.exception.SystemException; 227 }