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