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 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 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 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 * Returns 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 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 * Returns 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 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 * Returns 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 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 * Returns 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 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 * Returns 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 126 * @param retrieveFromCache whether to use the finder cache 127 * @return the matching company, or <code>null</code> if a matching company could not be found 128 * @throws SystemException if a system exception occurred 129 */ 130 public com.liferay.portal.model.Company fetchByWebId( 131 java.lang.String webId, boolean retrieveFromCache) 132 throws com.liferay.portal.kernel.exception.SystemException; 133 134 /** 135 * Returns the company where mx = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 136 * 137 * @param mx the mx 138 * @return the matching company 139 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 140 * @throws SystemException if a system exception occurred 141 */ 142 public com.liferay.portal.model.Company findByMx(java.lang.String mx) 143 throws com.liferay.portal.NoSuchCompanyException, 144 com.liferay.portal.kernel.exception.SystemException; 145 146 /** 147 * Returns the company where mx = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 148 * 149 * @param mx the mx 150 * @return the matching company, or <code>null</code> if a matching company could not be found 151 * @throws SystemException if a system exception occurred 152 */ 153 public com.liferay.portal.model.Company fetchByMx(java.lang.String mx) 154 throws com.liferay.portal.kernel.exception.SystemException; 155 156 /** 157 * Returns the company where mx = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 158 * 159 * @param mx the mx 160 * @param retrieveFromCache whether to use the finder cache 161 * @return the matching company, or <code>null</code> if a matching company could not be found 162 * @throws SystemException if a system exception occurred 163 */ 164 public com.liferay.portal.model.Company fetchByMx(java.lang.String mx, 165 boolean retrieveFromCache) 166 throws com.liferay.portal.kernel.exception.SystemException; 167 168 /** 169 * Returns the company where logoId = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 170 * 171 * @param logoId the logo ID 172 * @return the matching company 173 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 174 * @throws SystemException if a system exception occurred 175 */ 176 public com.liferay.portal.model.Company findByLogoId(long logoId) 177 throws com.liferay.portal.NoSuchCompanyException, 178 com.liferay.portal.kernel.exception.SystemException; 179 180 /** 181 * Returns the company where logoId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 182 * 183 * @param logoId the logo ID 184 * @return the matching company, or <code>null</code> if a matching company could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public com.liferay.portal.model.Company fetchByLogoId(long logoId) 188 throws com.liferay.portal.kernel.exception.SystemException; 189 190 /** 191 * Returns the company where logoId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 192 * 193 * @param logoId the logo ID 194 * @param retrieveFromCache whether to use the finder cache 195 * @return the matching company, or <code>null</code> if a matching company could not be found 196 * @throws SystemException if a system exception occurred 197 */ 198 public com.liferay.portal.model.Company fetchByLogoId(long logoId, 199 boolean retrieveFromCache) 200 throws com.liferay.portal.kernel.exception.SystemException; 201 202 /** 203 * Returns all the companies where system = ?. 204 * 205 * @param system the system 206 * @return the matching companies 207 * @throws SystemException if a system exception occurred 208 */ 209 public java.util.List<com.liferay.portal.model.Company> findBySystem( 210 boolean system) 211 throws com.liferay.portal.kernel.exception.SystemException; 212 213 /** 214 * Returns a range of all the companies where system = ?. 215 * 216 * <p> 217 * 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. 218 * </p> 219 * 220 * @param system the system 221 * @param start the lower bound of the range of companies 222 * @param end the upper bound of the range of companies (not inclusive) 223 * @return the range of matching companies 224 * @throws SystemException if a system exception occurred 225 */ 226 public java.util.List<com.liferay.portal.model.Company> findBySystem( 227 boolean system, int start, int end) 228 throws com.liferay.portal.kernel.exception.SystemException; 229 230 /** 231 * Returns an ordered range of all the companies where system = ?. 232 * 233 * <p> 234 * 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. 235 * </p> 236 * 237 * @param system the system 238 * @param start the lower bound of the range of companies 239 * @param end the upper bound of the range of companies (not inclusive) 240 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 241 * @return the ordered range of matching companies 242 * @throws SystemException if a system exception occurred 243 */ 244 public java.util.List<com.liferay.portal.model.Company> findBySystem( 245 boolean system, int start, int end, 246 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 247 throws com.liferay.portal.kernel.exception.SystemException; 248 249 /** 250 * Returns the first company in the ordered set where system = ?. 251 * 252 * <p> 253 * 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. 254 * </p> 255 * 256 * @param system the system 257 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 258 * @return the first matching company 259 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 260 * @throws SystemException if a system exception occurred 261 */ 262 public com.liferay.portal.model.Company findBySystem_First(boolean system, 263 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 264 throws com.liferay.portal.NoSuchCompanyException, 265 com.liferay.portal.kernel.exception.SystemException; 266 267 /** 268 * Returns the last company in the ordered set where system = ?. 269 * 270 * <p> 271 * 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. 272 * </p> 273 * 274 * @param system the system 275 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 276 * @return the last matching company 277 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public com.liferay.portal.model.Company findBySystem_Last(boolean system, 281 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 282 throws com.liferay.portal.NoSuchCompanyException, 283 com.liferay.portal.kernel.exception.SystemException; 284 285 /** 286 * Returns the companies before and after the current company in the ordered set where system = ?. 287 * 288 * <p> 289 * 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. 290 * </p> 291 * 292 * @param companyId the primary key of the current company 293 * @param system the system 294 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 295 * @return the previous, current, and next company 296 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 297 * @throws SystemException if a system exception occurred 298 */ 299 public com.liferay.portal.model.Company[] findBySystem_PrevAndNext( 300 long companyId, boolean system, 301 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 302 throws com.liferay.portal.NoSuchCompanyException, 303 com.liferay.portal.kernel.exception.SystemException; 304 305 /** 306 * Returns all the companies. 307 * 308 * @return the companies 309 * @throws SystemException if a system exception occurred 310 */ 311 public java.util.List<com.liferay.portal.model.Company> findAll() 312 throws com.liferay.portal.kernel.exception.SystemException; 313 314 /** 315 * Returns a range of all the companies. 316 * 317 * <p> 318 * 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. 319 * </p> 320 * 321 * @param start the lower bound of the range of companies 322 * @param end the upper bound of the range of companies (not inclusive) 323 * @return the range of companies 324 * @throws SystemException if a system exception occurred 325 */ 326 public java.util.List<com.liferay.portal.model.Company> findAll(int start, 327 int end) throws com.liferay.portal.kernel.exception.SystemException; 328 329 /** 330 * Returns an ordered range of all the companies. 331 * 332 * <p> 333 * 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. 334 * </p> 335 * 336 * @param start the lower bound of the range of companies 337 * @param end the upper bound of the range of companies (not inclusive) 338 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 339 * @return the ordered range of companies 340 * @throws SystemException if a system exception occurred 341 */ 342 public java.util.List<com.liferay.portal.model.Company> findAll(int start, 343 int end, 344 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 345 throws com.liferay.portal.kernel.exception.SystemException; 346 347 /** 348 * Removes the company where webId = ? from the database. 349 * 350 * @param webId the web ID 351 * @throws SystemException if a system exception occurred 352 */ 353 public void removeByWebId(java.lang.String webId) 354 throws com.liferay.portal.NoSuchCompanyException, 355 com.liferay.portal.kernel.exception.SystemException; 356 357 /** 358 * Removes the company where mx = ? from the database. 359 * 360 * @param mx the mx 361 * @throws SystemException if a system exception occurred 362 */ 363 public void removeByMx(java.lang.String mx) 364 throws com.liferay.portal.NoSuchCompanyException, 365 com.liferay.portal.kernel.exception.SystemException; 366 367 /** 368 * Removes the company where logoId = ? from the database. 369 * 370 * @param logoId the logo ID 371 * @throws SystemException if a system exception occurred 372 */ 373 public void removeByLogoId(long logoId) 374 throws com.liferay.portal.NoSuchCompanyException, 375 com.liferay.portal.kernel.exception.SystemException; 376 377 /** 378 * Removes all the companies where system = ? from the database. 379 * 380 * @param system the system 381 * @throws SystemException if a system exception occurred 382 */ 383 public void removeBySystem(boolean system) 384 throws com.liferay.portal.kernel.exception.SystemException; 385 386 /** 387 * Removes all the companies from the database. 388 * 389 * @throws SystemException if a system exception occurred 390 */ 391 public void removeAll() 392 throws com.liferay.portal.kernel.exception.SystemException; 393 394 /** 395 * Returns the number of companies where webId = ?. 396 * 397 * @param webId the web ID 398 * @return the number of matching companies 399 * @throws SystemException if a system exception occurred 400 */ 401 public int countByWebId(java.lang.String webId) 402 throws com.liferay.portal.kernel.exception.SystemException; 403 404 /** 405 * Returns the number of companies where mx = ?. 406 * 407 * @param mx the mx 408 * @return the number of matching companies 409 * @throws SystemException if a system exception occurred 410 */ 411 public int countByMx(java.lang.String mx) 412 throws com.liferay.portal.kernel.exception.SystemException; 413 414 /** 415 * Returns the number of companies where logoId = ?. 416 * 417 * @param logoId the logo ID 418 * @return the number of matching companies 419 * @throws SystemException if a system exception occurred 420 */ 421 public int countByLogoId(long logoId) 422 throws com.liferay.portal.kernel.exception.SystemException; 423 424 /** 425 * Returns the number of companies where system = ?. 426 * 427 * @param system the system 428 * @return the number of matching companies 429 * @throws SystemException if a system exception occurred 430 */ 431 public int countBySystem(boolean system) 432 throws com.liferay.portal.kernel.exception.SystemException; 433 434 /** 435 * Returns the number of companies. 436 * 437 * @return the number of companies 438 * @throws SystemException if a system exception occurred 439 */ 440 public int countAll() 441 throws com.liferay.portal.kernel.exception.SystemException; 442 443 public Company remove(Company company) throws SystemException; 444 }