001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.exception.SystemException; 018 import com.liferay.portal.model.Company; 019 020 /** 021 * The persistence interface for the company service. 022 * 023 * <p> 024 * Caching information and settings can be found in <code>portal.properties</code> 025 * </p> 026 * 027 * @author Brian Wing Shun Chan 028 * @see CompanyPersistenceImpl 029 * @see CompanyUtil 030 * @generated 031 */ 032 public interface CompanyPersistence extends BasePersistence<Company> { 033 /* 034 * NOTE FOR DEVELOPERS: 035 * 036 * 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. 037 */ 038 039 /** 040 * Caches the company in the entity cache if it is enabled. 041 * 042 * @param company the company to cache 043 */ 044 public void cacheResult(com.liferay.portal.model.Company company); 045 046 /** 047 * Caches the companies in the entity cache if it is enabled. 048 * 049 * @param companies the companies to cache 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portal.model.Company> companies); 053 054 /** 055 * Creates a new company with the primary key. Does not add the company to the database. 056 * 057 * @param companyId the primary key for the new company 058 * @return the new company 059 */ 060 public com.liferay.portal.model.Company create(long companyId); 061 062 /** 063 * Removes the company with the primary key from the database. Also notifies the appropriate model listeners. 064 * 065 * @param companyId the primary key of the company to remove 066 * @return the company that was removed 067 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 068 * @throws SystemException if a system exception occurred 069 */ 070 public com.liferay.portal.model.Company remove(long companyId) 071 throws com.liferay.portal.NoSuchCompanyException, 072 com.liferay.portal.kernel.exception.SystemException; 073 074 public com.liferay.portal.model.Company updateImpl( 075 com.liferay.portal.model.Company company, boolean merge) 076 throws com.liferay.portal.kernel.exception.SystemException; 077 078 /** 079 * Finds the company with the primary key or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 080 * 081 * @param companyId the primary key of the company to find 082 * @return the company 083 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 084 * @throws SystemException if a system exception occurred 085 */ 086 public com.liferay.portal.model.Company findByPrimaryKey(long companyId) 087 throws com.liferay.portal.NoSuchCompanyException, 088 com.liferay.portal.kernel.exception.SystemException; 089 090 /** 091 * Finds the company with the primary key or returns <code>null</code> if it could not be found. 092 * 093 * @param companyId the primary key of the company to find 094 * @return the company, or <code>null</code> if a company with the primary key could not be found 095 * @throws SystemException if a system exception occurred 096 */ 097 public com.liferay.portal.model.Company fetchByPrimaryKey(long companyId) 098 throws com.liferay.portal.kernel.exception.SystemException; 099 100 /** 101 * Finds the company where webId = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 102 * 103 * @param webId the web ID to search with 104 * @return the matching company 105 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 106 * @throws SystemException if a system exception occurred 107 */ 108 public com.liferay.portal.model.Company findByWebId(java.lang.String webId) 109 throws com.liferay.portal.NoSuchCompanyException, 110 com.liferay.portal.kernel.exception.SystemException; 111 112 /** 113 * Finds the company where webId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 114 * 115 * @param webId the web ID to search with 116 * @return the matching company, or <code>null</code> if a matching company could not be found 117 * @throws SystemException if a system exception occurred 118 */ 119 public com.liferay.portal.model.Company fetchByWebId(java.lang.String webId) 120 throws com.liferay.portal.kernel.exception.SystemException; 121 122 /** 123 * Finds the company where webId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 124 * 125 * @param webId the web ID to search with 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 * Finds the company where mx = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 135 * 136 * @param mx the mx to search with 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 * Finds 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 to search with 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 * Finds 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 to search with 159 * @return the matching company, or <code>null</code> if a matching company could not be found 160 * @throws SystemException if a system exception occurred 161 */ 162 public com.liferay.portal.model.Company fetchByMx(java.lang.String mx, 163 boolean retrieveFromCache) 164 throws com.liferay.portal.kernel.exception.SystemException; 165 166 /** 167 * Finds the company where logoId = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 168 * 169 * @param logoId the logo ID to search with 170 * @return the matching company 171 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public com.liferay.portal.model.Company findByLogoId(long logoId) 175 throws com.liferay.portal.NoSuchCompanyException, 176 com.liferay.portal.kernel.exception.SystemException; 177 178 /** 179 * Finds the company where logoId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 180 * 181 * @param logoId the logo ID to search with 182 * @return the matching company, or <code>null</code> if a matching company could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public com.liferay.portal.model.Company fetchByLogoId(long logoId) 186 throws com.liferay.portal.kernel.exception.SystemException; 187 188 /** 189 * Finds the company where logoId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 190 * 191 * @param logoId the logo ID to search with 192 * @return the matching company, or <code>null</code> if a matching company could not be found 193 * @throws SystemException if a system exception occurred 194 */ 195 public com.liferay.portal.model.Company fetchByLogoId(long logoId, 196 boolean retrieveFromCache) 197 throws com.liferay.portal.kernel.exception.SystemException; 198 199 /** 200 * Finds all the companies where system = ?. 201 * 202 * @param system the system to search with 203 * @return the matching companies 204 * @throws SystemException if a system exception occurred 205 */ 206 public java.util.List<com.liferay.portal.model.Company> findBySystem( 207 boolean system) 208 throws com.liferay.portal.kernel.exception.SystemException; 209 210 /** 211 * Finds a range of all the companies where system = ?. 212 * 213 * <p> 214 * 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. 215 * </p> 216 * 217 * @param system the system to search with 218 * @param start the lower bound of the range of companies to return 219 * @param end the upper bound of the range of companies to return (not inclusive) 220 * @return the range of matching companies 221 * @throws SystemException if a system exception occurred 222 */ 223 public java.util.List<com.liferay.portal.model.Company> findBySystem( 224 boolean system, int start, int end) 225 throws com.liferay.portal.kernel.exception.SystemException; 226 227 /** 228 * Finds an ordered range of all the companies where system = ?. 229 * 230 * <p> 231 * 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. 232 * </p> 233 * 234 * @param system the system to search with 235 * @param start the lower bound of the range of companies to return 236 * @param end the upper bound of the range of companies to return (not inclusive) 237 * @param orderByComparator the comparator to order the results by 238 * @return the ordered range of matching companies 239 * @throws SystemException if a system exception occurred 240 */ 241 public java.util.List<com.liferay.portal.model.Company> findBySystem( 242 boolean system, int start, int end, 243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 244 throws com.liferay.portal.kernel.exception.SystemException; 245 246 /** 247 * Finds the first company in the ordered set where system = ?. 248 * 249 * <p> 250 * 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. 251 * </p> 252 * 253 * @param system the system to search with 254 * @param orderByComparator the comparator to order the set by 255 * @return the first matching company 256 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public com.liferay.portal.model.Company findBySystem_First(boolean system, 260 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 261 throws com.liferay.portal.NoSuchCompanyException, 262 com.liferay.portal.kernel.exception.SystemException; 263 264 /** 265 * Finds the last company in the ordered set where system = ?. 266 * 267 * <p> 268 * 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. 269 * </p> 270 * 271 * @param system the system to search with 272 * @param orderByComparator the comparator to order the set by 273 * @return the last matching company 274 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 275 * @throws SystemException if a system exception occurred 276 */ 277 public com.liferay.portal.model.Company findBySystem_Last(boolean system, 278 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 279 throws com.liferay.portal.NoSuchCompanyException, 280 com.liferay.portal.kernel.exception.SystemException; 281 282 /** 283 * Finds the companies before and after the current company in the ordered set where system = ?. 284 * 285 * <p> 286 * 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. 287 * </p> 288 * 289 * @param companyId the primary key of the current company 290 * @param system the system to search with 291 * @param orderByComparator the comparator to order the set by 292 * @return the previous, current, and next company 293 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 294 * @throws SystemException if a system exception occurred 295 */ 296 public com.liferay.portal.model.Company[] findBySystem_PrevAndNext( 297 long companyId, boolean system, 298 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 299 throws com.liferay.portal.NoSuchCompanyException, 300 com.liferay.portal.kernel.exception.SystemException; 301 302 /** 303 * Finds all the companies. 304 * 305 * @return the companies 306 * @throws SystemException if a system exception occurred 307 */ 308 public java.util.List<com.liferay.portal.model.Company> findAll() 309 throws com.liferay.portal.kernel.exception.SystemException; 310 311 /** 312 * Finds a range of all the companies. 313 * 314 * <p> 315 * 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. 316 * </p> 317 * 318 * @param start the lower bound of the range of companies to return 319 * @param end the upper bound of the range of companies to return (not inclusive) 320 * @return the range of companies 321 * @throws SystemException if a system exception occurred 322 */ 323 public java.util.List<com.liferay.portal.model.Company> findAll(int start, 324 int end) throws com.liferay.portal.kernel.exception.SystemException; 325 326 /** 327 * Finds an ordered 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 to return 334 * @param end the upper bound of the range of companies to return (not inclusive) 335 * @param orderByComparator the comparator to order the results by 336 * @return the ordered range of companies 337 * @throws SystemException if a system exception occurred 338 */ 339 public java.util.List<com.liferay.portal.model.Company> findAll(int start, 340 int end, 341 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 342 throws com.liferay.portal.kernel.exception.SystemException; 343 344 /** 345 * Removes the company where webId = ? from the database. 346 * 347 * @param webId the web ID to search with 348 * @throws SystemException if a system exception occurred 349 */ 350 public void removeByWebId(java.lang.String webId) 351 throws com.liferay.portal.NoSuchCompanyException, 352 com.liferay.portal.kernel.exception.SystemException; 353 354 /** 355 * Removes the company where mx = ? from the database. 356 * 357 * @param mx the mx to search with 358 * @throws SystemException if a system exception occurred 359 */ 360 public void removeByMx(java.lang.String mx) 361 throws com.liferay.portal.NoSuchCompanyException, 362 com.liferay.portal.kernel.exception.SystemException; 363 364 /** 365 * Removes the company where logoId = ? from the database. 366 * 367 * @param logoId the logo ID to search with 368 * @throws SystemException if a system exception occurred 369 */ 370 public void removeByLogoId(long logoId) 371 throws com.liferay.portal.NoSuchCompanyException, 372 com.liferay.portal.kernel.exception.SystemException; 373 374 /** 375 * Removes all the companies where system = ? from the database. 376 * 377 * @param system the system to search with 378 * @throws SystemException if a system exception occurred 379 */ 380 public void removeBySystem(boolean system) 381 throws com.liferay.portal.kernel.exception.SystemException; 382 383 /** 384 * Removes all the companies from the database. 385 * 386 * @throws SystemException if a system exception occurred 387 */ 388 public void removeAll() 389 throws com.liferay.portal.kernel.exception.SystemException; 390 391 /** 392 * Counts all the companies where webId = ?. 393 * 394 * @param webId the web ID to search with 395 * @return the number of matching companies 396 * @throws SystemException if a system exception occurred 397 */ 398 public int countByWebId(java.lang.String webId) 399 throws com.liferay.portal.kernel.exception.SystemException; 400 401 /** 402 * Counts all the companies where mx = ?. 403 * 404 * @param mx the mx to search with 405 * @return the number of matching companies 406 * @throws SystemException if a system exception occurred 407 */ 408 public int countByMx(java.lang.String mx) 409 throws com.liferay.portal.kernel.exception.SystemException; 410 411 /** 412 * Counts all the companies where logoId = ?. 413 * 414 * @param logoId the logo ID to search with 415 * @return the number of matching companies 416 * @throws SystemException if a system exception occurred 417 */ 418 public int countByLogoId(long logoId) 419 throws com.liferay.portal.kernel.exception.SystemException; 420 421 /** 422 * Counts all the companies where system = ?. 423 * 424 * @param system the system to search with 425 * @return the number of matching companies 426 * @throws SystemException if a system exception occurred 427 */ 428 public int countBySystem(boolean system) 429 throws com.liferay.portal.kernel.exception.SystemException; 430 431 /** 432 * Counts all the companies. 433 * 434 * @return the number of companies 435 * @throws SystemException if a system exception occurred 436 */ 437 public int countAll() 438 throws com.liferay.portal.kernel.exception.SystemException; 439 440 public Company remove(Company company) throws SystemException; 441 }