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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.Company; 020 021 /** 022 * The persistence interface for the company 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 CompanyPersistenceImpl 030 * @see CompanyUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface CompanyPersistence extends BasePersistence<Company> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link CompanyUtil} to access the company persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns the company where webId = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 043 * 044 * @param webId the web ID 045 * @return the matching company 046 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 047 * @throws SystemException if a system exception occurred 048 */ 049 public com.liferay.portal.model.Company findByWebId(java.lang.String webId) 050 throws com.liferay.portal.NoSuchCompanyException, 051 com.liferay.portal.kernel.exception.SystemException; 052 053 /** 054 * Returns the company where webId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 055 * 056 * @param webId the web ID 057 * @return the matching company, or <code>null</code> if a matching company could not be found 058 * @throws SystemException if a system exception occurred 059 */ 060 public com.liferay.portal.model.Company fetchByWebId(java.lang.String webId) 061 throws com.liferay.portal.kernel.exception.SystemException; 062 063 /** 064 * Returns the company where webId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 065 * 066 * @param webId the web ID 067 * @param retrieveFromCache whether to use the finder cache 068 * @return the matching company, or <code>null</code> if a matching company could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portal.model.Company fetchByWebId( 072 java.lang.String webId, boolean retrieveFromCache) 073 throws com.liferay.portal.kernel.exception.SystemException; 074 075 /** 076 * Removes the company where webId = ? from the database. 077 * 078 * @param webId the web ID 079 * @return the company that was removed 080 * @throws SystemException if a system exception occurred 081 */ 082 public com.liferay.portal.model.Company removeByWebId( 083 java.lang.String webId) 084 throws com.liferay.portal.NoSuchCompanyException, 085 com.liferay.portal.kernel.exception.SystemException; 086 087 /** 088 * Returns the number of companies where webId = ?. 089 * 090 * @param webId the web ID 091 * @return the number of matching companies 092 * @throws SystemException if a system exception occurred 093 */ 094 public int countByWebId(java.lang.String webId) 095 throws com.liferay.portal.kernel.exception.SystemException; 096 097 /** 098 * Returns the company where mx = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 099 * 100 * @param mx the mx 101 * @return the matching company 102 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 103 * @throws SystemException if a system exception occurred 104 */ 105 public com.liferay.portal.model.Company findByMx(java.lang.String mx) 106 throws com.liferay.portal.NoSuchCompanyException, 107 com.liferay.portal.kernel.exception.SystemException; 108 109 /** 110 * Returns the company where mx = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 111 * 112 * @param mx the mx 113 * @return the matching company, or <code>null</code> if a matching company could not be found 114 * @throws SystemException if a system exception occurred 115 */ 116 public com.liferay.portal.model.Company fetchByMx(java.lang.String mx) 117 throws com.liferay.portal.kernel.exception.SystemException; 118 119 /** 120 * Returns the company where mx = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 121 * 122 * @param mx the mx 123 * @param retrieveFromCache whether to use the finder cache 124 * @return the matching company, or <code>null</code> if a matching company could not be found 125 * @throws SystemException if a system exception occurred 126 */ 127 public com.liferay.portal.model.Company fetchByMx(java.lang.String mx, 128 boolean retrieveFromCache) 129 throws com.liferay.portal.kernel.exception.SystemException; 130 131 /** 132 * Removes the company where mx = ? from the database. 133 * 134 * @param mx the mx 135 * @return the company that was removed 136 * @throws SystemException if a system exception occurred 137 */ 138 public com.liferay.portal.model.Company removeByMx(java.lang.String mx) 139 throws com.liferay.portal.NoSuchCompanyException, 140 com.liferay.portal.kernel.exception.SystemException; 141 142 /** 143 * Returns the number of companies where mx = ?. 144 * 145 * @param mx the mx 146 * @return the number of matching companies 147 * @throws SystemException if a system exception occurred 148 */ 149 public int countByMx(java.lang.String mx) 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Returns the company where logoId = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 154 * 155 * @param logoId the logo ID 156 * @return the matching company 157 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public com.liferay.portal.model.Company findByLogoId(long logoId) 161 throws com.liferay.portal.NoSuchCompanyException, 162 com.liferay.portal.kernel.exception.SystemException; 163 164 /** 165 * Returns the company where logoId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 166 * 167 * @param logoId the logo ID 168 * @return the matching company, or <code>null</code> if a matching company could not be found 169 * @throws SystemException if a system exception occurred 170 */ 171 public com.liferay.portal.model.Company fetchByLogoId(long logoId) 172 throws com.liferay.portal.kernel.exception.SystemException; 173 174 /** 175 * Returns the company where logoId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 176 * 177 * @param logoId the logo ID 178 * @param retrieveFromCache whether to use the finder cache 179 * @return the matching company, or <code>null</code> if a matching company could not be found 180 * @throws SystemException if a system exception occurred 181 */ 182 public com.liferay.portal.model.Company fetchByLogoId(long logoId, 183 boolean retrieveFromCache) 184 throws com.liferay.portal.kernel.exception.SystemException; 185 186 /** 187 * Removes the company where logoId = ? from the database. 188 * 189 * @param logoId the logo ID 190 * @return the company that was removed 191 * @throws SystemException if a system exception occurred 192 */ 193 public com.liferay.portal.model.Company removeByLogoId(long logoId) 194 throws com.liferay.portal.NoSuchCompanyException, 195 com.liferay.portal.kernel.exception.SystemException; 196 197 /** 198 * Returns the number of companies where logoId = ?. 199 * 200 * @param logoId the logo ID 201 * @return the number of matching companies 202 * @throws SystemException if a system exception occurred 203 */ 204 public int countByLogoId(long logoId) 205 throws com.liferay.portal.kernel.exception.SystemException; 206 207 /** 208 * Returns all the companies where system = ?. 209 * 210 * @param system the system 211 * @return the matching companies 212 * @throws SystemException if a system exception occurred 213 */ 214 public java.util.List<com.liferay.portal.model.Company> findBySystem( 215 boolean system) 216 throws com.liferay.portal.kernel.exception.SystemException; 217 218 /** 219 * Returns a range of all the companies where system = ?. 220 * 221 * <p> 222 * 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.CompanyModelImpl}. 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. 223 * </p> 224 * 225 * @param system the system 226 * @param start the lower bound of the range of companies 227 * @param end the upper bound of the range of companies (not inclusive) 228 * @return the range of matching companies 229 * @throws SystemException if a system exception occurred 230 */ 231 public java.util.List<com.liferay.portal.model.Company> findBySystem( 232 boolean system, int start, int end) 233 throws com.liferay.portal.kernel.exception.SystemException; 234 235 /** 236 * Returns an ordered range of all the companies where system = ?. 237 * 238 * <p> 239 * 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.CompanyModelImpl}. 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. 240 * </p> 241 * 242 * @param system the system 243 * @param start the lower bound of the range of companies 244 * @param end the upper bound of the range of companies (not inclusive) 245 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 246 * @return the ordered range of matching companies 247 * @throws SystemException if a system exception occurred 248 */ 249 public java.util.List<com.liferay.portal.model.Company> findBySystem( 250 boolean system, int start, int end, 251 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 252 throws com.liferay.portal.kernel.exception.SystemException; 253 254 /** 255 * Returns the first company in the ordered set where system = ?. 256 * 257 * @param system the system 258 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 259 * @return the first matching company 260 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 261 * @throws SystemException if a system exception occurred 262 */ 263 public com.liferay.portal.model.Company findBySystem_First(boolean system, 264 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 265 throws com.liferay.portal.NoSuchCompanyException, 266 com.liferay.portal.kernel.exception.SystemException; 267 268 /** 269 * Returns the first company in the ordered set where system = ?. 270 * 271 * @param system the system 272 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 273 * @return the first matching company, or <code>null</code> if a matching company could not be found 274 * @throws SystemException if a system exception occurred 275 */ 276 public com.liferay.portal.model.Company fetchBySystem_First( 277 boolean system, 278 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 279 throws com.liferay.portal.kernel.exception.SystemException; 280 281 /** 282 * Returns the last company in the ordered set where system = ?. 283 * 284 * @param system the system 285 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 286 * @return the last matching company 287 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 288 * @throws SystemException if a system exception occurred 289 */ 290 public com.liferay.portal.model.Company findBySystem_Last(boolean system, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.NoSuchCompanyException, 293 com.liferay.portal.kernel.exception.SystemException; 294 295 /** 296 * Returns the last company in the ordered set where system = ?. 297 * 298 * @param system the system 299 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 300 * @return the last matching company, or <code>null</code> if a matching company could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public com.liferay.portal.model.Company fetchBySystem_Last(boolean system, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.kernel.exception.SystemException; 306 307 /** 308 * Returns the companies before and after the current company in the ordered set where system = ?. 309 * 310 * @param companyId the primary key of the current company 311 * @param system the system 312 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 313 * @return the previous, current, and next company 314 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 315 * @throws SystemException if a system exception occurred 316 */ 317 public com.liferay.portal.model.Company[] findBySystem_PrevAndNext( 318 long companyId, boolean system, 319 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 320 throws com.liferay.portal.NoSuchCompanyException, 321 com.liferay.portal.kernel.exception.SystemException; 322 323 /** 324 * Removes all the companies where system = ? from the database. 325 * 326 * @param system the system 327 * @throws SystemException if a system exception occurred 328 */ 329 public void removeBySystem(boolean system) 330 throws com.liferay.portal.kernel.exception.SystemException; 331 332 /** 333 * Returns the number of companies where system = ?. 334 * 335 * @param system the system 336 * @return the number of matching companies 337 * @throws SystemException if a system exception occurred 338 */ 339 public int countBySystem(boolean system) 340 throws com.liferay.portal.kernel.exception.SystemException; 341 342 /** 343 * Caches the company in the entity cache if it is enabled. 344 * 345 * @param company the company 346 */ 347 public void cacheResult(com.liferay.portal.model.Company company); 348 349 /** 350 * Caches the companies in the entity cache if it is enabled. 351 * 352 * @param companies the companies 353 */ 354 public void cacheResult( 355 java.util.List<com.liferay.portal.model.Company> companies); 356 357 /** 358 * Creates a new company with the primary key. Does not add the company to the database. 359 * 360 * @param companyId the primary key for the new company 361 * @return the new company 362 */ 363 public com.liferay.portal.model.Company create(long companyId); 364 365 /** 366 * Removes the company with the primary key from the database. Also notifies the appropriate model listeners. 367 * 368 * @param companyId the primary key of the company 369 * @return the company that was removed 370 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 371 * @throws SystemException if a system exception occurred 372 */ 373 public com.liferay.portal.model.Company remove(long companyId) 374 throws com.liferay.portal.NoSuchCompanyException, 375 com.liferay.portal.kernel.exception.SystemException; 376 377 public com.liferay.portal.model.Company updateImpl( 378 com.liferay.portal.model.Company company) 379 throws com.liferay.portal.kernel.exception.SystemException; 380 381 /** 382 * Returns the company with the primary key or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 383 * 384 * @param companyId the primary key of the company 385 * @return the company 386 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 387 * @throws SystemException if a system exception occurred 388 */ 389 public com.liferay.portal.model.Company findByPrimaryKey(long companyId) 390 throws com.liferay.portal.NoSuchCompanyException, 391 com.liferay.portal.kernel.exception.SystemException; 392 393 /** 394 * Returns the company with the primary key or returns <code>null</code> if it could not be found. 395 * 396 * @param companyId the primary key of the company 397 * @return the company, or <code>null</code> if a company with the primary key could not be found 398 * @throws SystemException if a system exception occurred 399 */ 400 public com.liferay.portal.model.Company fetchByPrimaryKey(long companyId) 401 throws com.liferay.portal.kernel.exception.SystemException; 402 403 /** 404 * Returns all the companies. 405 * 406 * @return the companies 407 * @throws SystemException if a system exception occurred 408 */ 409 public java.util.List<com.liferay.portal.model.Company> findAll() 410 throws com.liferay.portal.kernel.exception.SystemException; 411 412 /** 413 * Returns a range of all the companies. 414 * 415 * <p> 416 * 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.CompanyModelImpl}. 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. 417 * </p> 418 * 419 * @param start the lower bound of the range of companies 420 * @param end the upper bound of the range of companies (not inclusive) 421 * @return the range of companies 422 * @throws SystemException if a system exception occurred 423 */ 424 public java.util.List<com.liferay.portal.model.Company> findAll(int start, 425 int end) throws com.liferay.portal.kernel.exception.SystemException; 426 427 /** 428 * Returns an ordered range of all the companies. 429 * 430 * <p> 431 * 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.CompanyModelImpl}. 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. 432 * </p> 433 * 434 * @param start the lower bound of the range of companies 435 * @param end the upper bound of the range of companies (not inclusive) 436 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 437 * @return the ordered range of companies 438 * @throws SystemException if a system exception occurred 439 */ 440 public java.util.List<com.liferay.portal.model.Company> findAll(int start, 441 int end, 442 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 443 throws com.liferay.portal.kernel.exception.SystemException; 444 445 /** 446 * Removes all the companies from the database. 447 * 448 * @throws SystemException if a system exception occurred 449 */ 450 public void removeAll() 451 throws com.liferay.portal.kernel.exception.SystemException; 452 453 /** 454 * Returns the number of companies. 455 * 456 * @return the number of companies 457 * @throws SystemException if a system exception occurred 458 */ 459 public int countAll() 460 throws com.liferay.portal.kernel.exception.SystemException; 461 }