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