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