Class CompanyInfoUtil

Object
com.liferay.portal.kernel.service.persistence.CompanyInfoUtil

public class CompanyInfoUtil extends Object
The persistence utility for the company info service. This utility wraps com.liferay.portal.service.persistence.impl.CompanyInfoPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

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

    • CompanyInfoUtil

      public CompanyInfoUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
    • clearCache

      public static void clearCache(CompanyInfo companyInfo)
      See Also:
    • countWithDynamicQuery

      public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
      See Also:
    • fetchByPrimaryKeys

      public static Map<Serializable,CompanyInfo> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
    • findWithDynamicQuery

      public static List<CompanyInfo> findWithDynamicQuery(DynamicQuery dynamicQuery)
      See Also:
    • findWithDynamicQuery

      public static List<CompanyInfo> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
      See Also:
    • findWithDynamicQuery

      public static List<CompanyInfo> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<CompanyInfo> orderByComparator)
      See Also:
    • update

      public static CompanyInfo update(CompanyInfo companyInfo)
      See Also:
    • update

      public static CompanyInfo update(CompanyInfo companyInfo, ServiceContext serviceContext)
      See Also:
    • findByCompanyId

      public static CompanyInfo findByCompanyId(long companyId) throws NoSuchCompanyInfoException
      Returns the company info where companyId = ? or throws a NoSuchCompanyInfoException if it could not be found.
      Parameters:
      companyId - the company ID
      Returns:
      the matching company info
      Throws:
      NoSuchCompanyInfoException - if a matching company info could not be found
      NoSuchCompanyInfoException
    • fetchByCompanyId

      public static CompanyInfo fetchByCompanyId(long companyId)
      Returns the company info where companyId = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      companyId - the company ID
      Returns:
      the matching company info, or null if a matching company info could not be found
    • fetchByCompanyId

      public static CompanyInfo fetchByCompanyId(long companyId, boolean useFinderCache)
      Returns the company info where companyId = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      companyId - the company ID
      useFinderCache - whether to use the finder cache
      Returns:
      the matching company info, or null if a matching company info could not be found
    • removeByCompanyId

      public static CompanyInfo removeByCompanyId(long companyId) throws NoSuchCompanyInfoException
      Removes the company info where companyId = ? from the database.
      Parameters:
      companyId - the company ID
      Returns:
      the company info that was removed
      Throws:
      NoSuchCompanyInfoException
    • countByCompanyId

      public static int countByCompanyId(long companyId)
      Returns the number of company infos where companyId = ?.
      Parameters:
      companyId - the company ID
      Returns:
      the number of matching company infos
    • cacheResult

      public static void cacheResult(CompanyInfo companyInfo)
      Caches the company info in the entity cache if it is enabled.
      Parameters:
      companyInfo - the company info
    • cacheResult

      public static void cacheResult(List<CompanyInfo> companyInfos)
      Caches the company infos in the entity cache if it is enabled.
      Parameters:
      companyInfos - the company infos
    • create

      public static CompanyInfo create(long companyInfoId)
      Creates a new company info with the primary key. Does not add the company info to the database.
      Parameters:
      companyInfoId - the primary key for the new company info
      Returns:
      the new company info
    • remove

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

      public static CompanyInfo updateImpl(CompanyInfo companyInfo)
    • findByPrimaryKey

      public static CompanyInfo findByPrimaryKey(long companyInfoId) throws NoSuchCompanyInfoException
      Returns the company info with the primary key or throws a NoSuchCompanyInfoException if it could not be found.
      Parameters:
      companyInfoId - the primary key of the company info
      Returns:
      the company info
      Throws:
      NoSuchCompanyInfoException - if a company info with the primary key could not be found
      NoSuchCompanyInfoException
    • fetchByPrimaryKey

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

      public static List<CompanyInfo> findAll()
      Returns all the company infos.
      Returns:
      the company infos
    • findAll

      public static List<CompanyInfo> findAll(int start, int end)
      Returns a range of all the company infos.

      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 CompanyInfoModelImpl.

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

      public static List<CompanyInfo> findAll(int start, int end, OrderByComparator<CompanyInfo> orderByComparator)
      Returns an ordered range of all the company infos.

      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 CompanyInfoModelImpl.

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

      public static List<CompanyInfo> findAll(int start, int end, OrderByComparator<CompanyInfo> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the company infos.

      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 CompanyInfoModelImpl.

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

      public static void removeAll()
      Removes all the company infos from the database.
    • countAll

      public static int countAll()
      Returns the number of company infos.
      Returns:
      the number of company infos
    • getPersistence

      public static CompanyInfoPersistence getPersistence()
    • setPersistence

      public static void setPersistence(CompanyInfoPersistence persistence)