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