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.PluginSetting; 020 021 /** 022 * The persistence interface for the plugin setting 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.PluginSettingPersistenceImpl 030 * @see PluginSettingUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface PluginSettingPersistence extends BasePersistence<PluginSetting> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link PluginSettingUtil} to access the plugin setting persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the plugin settings where companyId = ?. 043 * 044 * @param companyId the company ID 045 * @return the matching plugin settings 046 */ 047 public java.util.List<PluginSetting> findByCompanyId(long companyId); 048 049 /** 050 * Returns a range of all the plugin settings where companyId = ?. 051 * 052 * <p> 053 * 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 PluginSettingModelImpl}. 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. 054 * </p> 055 * 056 * @param companyId the company ID 057 * @param start the lower bound of the range of plugin settings 058 * @param end the upper bound of the range of plugin settings (not inclusive) 059 * @return the range of matching plugin settings 060 */ 061 public java.util.List<PluginSetting> findByCompanyId(long companyId, 062 int start, int end); 063 064 /** 065 * Returns an ordered range of all the plugin settings where companyId = ?. 066 * 067 * <p> 068 * 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 PluginSettingModelImpl}. 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. 069 * </p> 070 * 071 * @param companyId the company ID 072 * @param start the lower bound of the range of plugin settings 073 * @param end the upper bound of the range of plugin settings (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching plugin settings 076 */ 077 public java.util.List<PluginSetting> findByCompanyId(long companyId, 078 int start, int end, 079 com.liferay.portal.kernel.util.OrderByComparator<PluginSetting> orderByComparator); 080 081 /** 082 * Returns the first plugin setting in the ordered set where companyId = ?. 083 * 084 * @param companyId the company ID 085 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 086 * @return the first matching plugin setting 087 * @throws NoSuchPluginSettingException if a matching plugin setting could not be found 088 */ 089 public PluginSetting findByCompanyId_First(long companyId, 090 com.liferay.portal.kernel.util.OrderByComparator<PluginSetting> orderByComparator) 091 throws com.liferay.portal.NoSuchPluginSettingException; 092 093 /** 094 * Returns the first plugin setting in the ordered set where companyId = ?. 095 * 096 * @param companyId the company ID 097 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 098 * @return the first matching plugin setting, or <code>null</code> if a matching plugin setting could not be found 099 */ 100 public PluginSetting fetchByCompanyId_First(long companyId, 101 com.liferay.portal.kernel.util.OrderByComparator<PluginSetting> orderByComparator); 102 103 /** 104 * Returns the last plugin setting in the ordered set where companyId = ?. 105 * 106 * @param companyId the company ID 107 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 108 * @return the last matching plugin setting 109 * @throws NoSuchPluginSettingException if a matching plugin setting could not be found 110 */ 111 public PluginSetting findByCompanyId_Last(long companyId, 112 com.liferay.portal.kernel.util.OrderByComparator<PluginSetting> orderByComparator) 113 throws com.liferay.portal.NoSuchPluginSettingException; 114 115 /** 116 * Returns the last plugin setting in the ordered set where companyId = ?. 117 * 118 * @param companyId the company ID 119 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 120 * @return the last matching plugin setting, or <code>null</code> if a matching plugin setting could not be found 121 */ 122 public PluginSetting fetchByCompanyId_Last(long companyId, 123 com.liferay.portal.kernel.util.OrderByComparator<PluginSetting> orderByComparator); 124 125 /** 126 * Returns the plugin settings before and after the current plugin setting in the ordered set where companyId = ?. 127 * 128 * @param pluginSettingId the primary key of the current plugin setting 129 * @param companyId the company ID 130 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 131 * @return the previous, current, and next plugin setting 132 * @throws NoSuchPluginSettingException if a plugin setting with the primary key could not be found 133 */ 134 public PluginSetting[] findByCompanyId_PrevAndNext(long pluginSettingId, 135 long companyId, 136 com.liferay.portal.kernel.util.OrderByComparator<PluginSetting> orderByComparator) 137 throws com.liferay.portal.NoSuchPluginSettingException; 138 139 /** 140 * Removes all the plugin settings where companyId = ? from the database. 141 * 142 * @param companyId the company ID 143 */ 144 public void removeByCompanyId(long companyId); 145 146 /** 147 * Returns the number of plugin settings where companyId = ?. 148 * 149 * @param companyId the company ID 150 * @return the number of matching plugin settings 151 */ 152 public int countByCompanyId(long companyId); 153 154 /** 155 * Returns the plugin setting where companyId = ? and pluginId = ? and pluginType = ? or throws a {@link NoSuchPluginSettingException} if it could not be found. 156 * 157 * @param companyId the company ID 158 * @param pluginId the plugin ID 159 * @param pluginType the plugin type 160 * @return the matching plugin setting 161 * @throws NoSuchPluginSettingException if a matching plugin setting could not be found 162 */ 163 public PluginSetting findByC_I_T(long companyId, java.lang.String pluginId, 164 java.lang.String pluginType) 165 throws com.liferay.portal.NoSuchPluginSettingException; 166 167 /** 168 * Returns the plugin setting where companyId = ? and pluginId = ? and pluginType = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 169 * 170 * @param companyId the company ID 171 * @param pluginId the plugin ID 172 * @param pluginType the plugin type 173 * @return the matching plugin setting, or <code>null</code> if a matching plugin setting could not be found 174 */ 175 public PluginSetting fetchByC_I_T(long companyId, 176 java.lang.String pluginId, java.lang.String pluginType); 177 178 /** 179 * Returns the plugin setting where companyId = ? and pluginId = ? and pluginType = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 180 * 181 * @param companyId the company ID 182 * @param pluginId the plugin ID 183 * @param pluginType the plugin type 184 * @param retrieveFromCache whether to use the finder cache 185 * @return the matching plugin setting, or <code>null</code> if a matching plugin setting could not be found 186 */ 187 public PluginSetting fetchByC_I_T(long companyId, 188 java.lang.String pluginId, java.lang.String pluginType, 189 boolean retrieveFromCache); 190 191 /** 192 * Removes the plugin setting where companyId = ? and pluginId = ? and pluginType = ? from the database. 193 * 194 * @param companyId the company ID 195 * @param pluginId the plugin ID 196 * @param pluginType the plugin type 197 * @return the plugin setting that was removed 198 */ 199 public PluginSetting removeByC_I_T(long companyId, 200 java.lang.String pluginId, java.lang.String pluginType) 201 throws com.liferay.portal.NoSuchPluginSettingException; 202 203 /** 204 * Returns the number of plugin settings where companyId = ? and pluginId = ? and pluginType = ?. 205 * 206 * @param companyId the company ID 207 * @param pluginId the plugin ID 208 * @param pluginType the plugin type 209 * @return the number of matching plugin settings 210 */ 211 public int countByC_I_T(long companyId, java.lang.String pluginId, 212 java.lang.String pluginType); 213 214 /** 215 * Caches the plugin setting in the entity cache if it is enabled. 216 * 217 * @param pluginSetting the plugin setting 218 */ 219 public void cacheResult(PluginSetting pluginSetting); 220 221 /** 222 * Caches the plugin settings in the entity cache if it is enabled. 223 * 224 * @param pluginSettings the plugin settings 225 */ 226 public void cacheResult(java.util.List<PluginSetting> pluginSettings); 227 228 /** 229 * Creates a new plugin setting with the primary key. Does not add the plugin setting to the database. 230 * 231 * @param pluginSettingId the primary key for the new plugin setting 232 * @return the new plugin setting 233 */ 234 public PluginSetting create(long pluginSettingId); 235 236 /** 237 * Removes the plugin setting with the primary key from the database. Also notifies the appropriate model listeners. 238 * 239 * @param pluginSettingId the primary key of the plugin setting 240 * @return the plugin setting that was removed 241 * @throws NoSuchPluginSettingException if a plugin setting with the primary key could not be found 242 */ 243 public PluginSetting remove(long pluginSettingId) 244 throws com.liferay.portal.NoSuchPluginSettingException; 245 246 public PluginSetting updateImpl(PluginSetting pluginSetting); 247 248 /** 249 * Returns the plugin setting with the primary key or throws a {@link NoSuchPluginSettingException} if it could not be found. 250 * 251 * @param pluginSettingId the primary key of the plugin setting 252 * @return the plugin setting 253 * @throws NoSuchPluginSettingException if a plugin setting with the primary key could not be found 254 */ 255 public PluginSetting findByPrimaryKey(long pluginSettingId) 256 throws com.liferay.portal.NoSuchPluginSettingException; 257 258 /** 259 * Returns the plugin setting with the primary key or returns <code>null</code> if it could not be found. 260 * 261 * @param pluginSettingId the primary key of the plugin setting 262 * @return the plugin setting, or <code>null</code> if a plugin setting with the primary key could not be found 263 */ 264 public PluginSetting fetchByPrimaryKey(long pluginSettingId); 265 266 @Override 267 public java.util.Map<java.io.Serializable, PluginSetting> fetchByPrimaryKeys( 268 java.util.Set<java.io.Serializable> primaryKeys); 269 270 /** 271 * Returns all the plugin settings. 272 * 273 * @return the plugin settings 274 */ 275 public java.util.List<PluginSetting> findAll(); 276 277 /** 278 * Returns a range of all the plugin settings. 279 * 280 * <p> 281 * 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 PluginSettingModelImpl}. 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. 282 * </p> 283 * 284 * @param start the lower bound of the range of plugin settings 285 * @param end the upper bound of the range of plugin settings (not inclusive) 286 * @return the range of plugin settings 287 */ 288 public java.util.List<PluginSetting> findAll(int start, int end); 289 290 /** 291 * Returns an ordered range of all the plugin settings. 292 * 293 * <p> 294 * 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 PluginSettingModelImpl}. 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. 295 * </p> 296 * 297 * @param start the lower bound of the range of plugin settings 298 * @param end the upper bound of the range of plugin settings (not inclusive) 299 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 300 * @return the ordered range of plugin settings 301 */ 302 public java.util.List<PluginSetting> findAll(int start, int end, 303 com.liferay.portal.kernel.util.OrderByComparator<PluginSetting> orderByComparator); 304 305 /** 306 * Removes all the plugin settings from the database. 307 */ 308 public void removeAll(); 309 310 /** 311 * Returns the number of plugin settings. 312 * 313 * @return the number of plugin settings 314 */ 315 public int countAll(); 316 }