Interface CompanyPersistence

All Superinterfaces:
BasePersistence<Company>

@ProviderType public interface CompanyPersistence extends BasePersistence<Company>
The persistence interface for the company service.

Caching information and settings can be found in portal.properties

Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Method Details

    • findByWebId

      Company findByWebId(String webId) throws NoSuchCompanyException
      Returns the company where webId = ? or throws a NoSuchCompanyException if it could not be found.
      Parameters:
      webId - the web ID
      Returns:
      the matching company
      Throws:
      NoSuchCompanyException - if a matching company could not be found
    • fetchByWebId

      Company fetchByWebId(String webId)
      Returns the company where webId = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      webId - the web ID
      Returns:
      the matching company, or null if a matching company could not be found
    • fetchByWebId

      Company fetchByWebId(String webId, boolean useFinderCache)
      Returns the company where webId = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      webId - the web ID
      useFinderCache - whether to use the finder cache
      Returns:
      the matching company, or null if a matching company could not be found
    • removeByWebId

      Company removeByWebId(String webId) throws NoSuchCompanyException
      Removes the company where webId = ? from the database.
      Parameters:
      webId - the web ID
      Returns:
      the company that was removed
      Throws:
      NoSuchCompanyException
    • countByWebId

      int countByWebId(String webId)
      Returns the number of companies where webId = ?.
      Parameters:
      webId - the web ID
      Returns:
      the number of matching companies
    • findByMx

      Company findByMx(String mx) throws NoSuchCompanyException
      Returns the company where mx = ? or throws a NoSuchCompanyException if it could not be found.
      Parameters:
      mx - the mx
      Returns:
      the matching company
      Throws:
      NoSuchCompanyException - if a matching company could not be found
    • fetchByMx

      Company fetchByMx(String mx)
      Returns the company where mx = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      mx - the mx
      Returns:
      the matching company, or null if a matching company could not be found
    • fetchByMx

      Company fetchByMx(String mx, boolean useFinderCache)
      Returns the company where mx = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      mx - the mx
      useFinderCache - whether to use the finder cache
      Returns:
      the matching company, or null if a matching company could not be found
    • removeByMx

      Company removeByMx(String mx) throws NoSuchCompanyException
      Removes the company where mx = ? from the database.
      Parameters:
      mx - the mx
      Returns:
      the company that was removed
      Throws:
      NoSuchCompanyException
    • countByMx

      int countByMx(String mx)
      Returns the number of companies where mx = ?.
      Parameters:
      mx - the mx
      Returns:
      the number of matching companies
    • findByLogoId

      Company findByLogoId(long logoId) throws NoSuchCompanyException
      Returns the company where logoId = ? or throws a NoSuchCompanyException if it could not be found.
      Parameters:
      logoId - the logo ID
      Returns:
      the matching company
      Throws:
      NoSuchCompanyException - if a matching company could not be found
    • fetchByLogoId

      Company fetchByLogoId(long logoId)
      Returns the company where logoId = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      logoId - the logo ID
      Returns:
      the matching company, or null if a matching company could not be found
    • fetchByLogoId

      Company fetchByLogoId(long logoId, boolean useFinderCache)
      Returns the company where logoId = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      logoId - the logo ID
      useFinderCache - whether to use the finder cache
      Returns:
      the matching company, or null if a matching company could not be found
    • removeByLogoId

      Company removeByLogoId(long logoId) throws NoSuchCompanyException
      Removes the company where logoId = ? from the database.
      Parameters:
      logoId - the logo ID
      Returns:
      the company that was removed
      Throws:
      NoSuchCompanyException
    • countByLogoId

      int countByLogoId(long logoId)
      Returns the number of companies where logoId = ?.
      Parameters:
      logoId - the logo ID
      Returns:
      the number of matching companies
    • cacheResult

      void cacheResult(Company company)
      Caches the company in the entity cache if it is enabled.
      Parameters:
      company - the company
    • cacheResult

      void cacheResult(List<Company> companies)
      Caches the companies in the entity cache if it is enabled.
      Parameters:
      companies - the companies
    • create

      Company create(long companyId)
      Creates a new company with the primary key. Does not add the company to the database.
      Parameters:
      companyId - the primary key for the new company
      Returns:
      the new company
    • remove

      Company remove(long companyId) throws NoSuchCompanyException
      Removes the company with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      companyId - the primary key of the company
      Returns:
      the company that was removed
      Throws:
      NoSuchCompanyException - if a company with the primary key could not be found
    • updateImpl

      Company updateImpl(Company company)
    • findByPrimaryKey

      Company findByPrimaryKey(long companyId) throws NoSuchCompanyException
      Returns the company with the primary key or throws a NoSuchCompanyException if it could not be found.
      Parameters:
      companyId - the primary key of the company
      Returns:
      the company
      Throws:
      NoSuchCompanyException - if a company with the primary key could not be found
    • fetchByPrimaryKey

      Company fetchByPrimaryKey(long companyId)
      Returns the company with the primary key or returns null if it could not be found.
      Parameters:
      companyId - the primary key of the company
      Returns:
      the company, or null if a company with the primary key could not be found
    • findAll

      List<Company> findAll()
      Returns all the companies.
      Returns:
      the companies
    • findAll

      List<Company> findAll(int start, int end)
      Returns a range of all the companies.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CompanyModelImpl.

      Parameters:
      start - the lower bound of the range of companies
      end - the upper bound of the range of companies (not inclusive)
      Returns:
      the range of companies
    • findAll

      List<Company> findAll(int start, int end, OrderByComparator<Company> orderByComparator)
      Returns an ordered range of all the companies.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CompanyModelImpl.

      Parameters:
      start - the lower bound of the range of companies
      end - the upper bound of the range of companies (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of companies
    • findAll

      List<Company> findAll(int start, int end, OrderByComparator<Company> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the companies.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CompanyModelImpl.

      Parameters:
      start - the lower bound of the range of companies
      end - the upper bound of the range of companies (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of companies
    • removeAll

      void removeAll()
      Removes all the companies from the database.
    • countAll

      int countAll()
      Returns the number of companies.
      Returns:
      the number of companies