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