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