Class RegionLocalizationUtil

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

public class RegionLocalizationUtil extends Object
The persistence utility for the region localization service. This utility wraps com.liferay.portal.service.persistence.impl.RegionLocalizationPersistenceImpl 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

    • RegionLocalizationUtil

      public RegionLocalizationUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
    • clearCache

      public static void clearCache(RegionLocalization regionLocalization)
      See Also:
    • countWithDynamicQuery

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

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

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

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

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

      public static RegionLocalization update(RegionLocalization regionLocalization)
      See Also:
    • update

      public static RegionLocalization update(RegionLocalization regionLocalization, ServiceContext serviceContext)
      See Also:
    • findByRegionId

      public static List<RegionLocalization> findByRegionId(long regionId)
      Returns all the region localizations where regionId = ?.
      Parameters:
      regionId - the region ID
      Returns:
      the matching region localizations
    • findByRegionId

      public static List<RegionLocalization> findByRegionId(long regionId, int start, int end)
      Returns a range of all the region localizations where regionId = ?.

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

      Parameters:
      regionId - the region ID
      start - the lower bound of the range of region localizations
      end - the upper bound of the range of region localizations (not inclusive)
      Returns:
      the range of matching region localizations
    • findByRegionId

      public static List<RegionLocalization> findByRegionId(long regionId, int start, int end, OrderByComparator<RegionLocalization> orderByComparator)
      Returns an ordered range of all the region localizations where regionId = ?.

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

      Parameters:
      regionId - the region ID
      start - the lower bound of the range of region localizations
      end - the upper bound of the range of region localizations (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching region localizations
    • findByRegionId

      public static List<RegionLocalization> findByRegionId(long regionId, int start, int end, OrderByComparator<RegionLocalization> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the region localizations where regionId = ?.

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

      Parameters:
      regionId - the region ID
      start - the lower bound of the range of region localizations
      end - the upper bound of the range of region localizations (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching region localizations
    • findByRegionId_First

      public static RegionLocalization findByRegionId_First(long regionId, OrderByComparator<RegionLocalization> orderByComparator) throws NoSuchRegionLocalizationException
      Returns the first region localization in the ordered set where regionId = ?.
      Parameters:
      regionId - the region ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching region localization
      Throws:
      NoSuchRegionLocalizationException - if a matching region localization could not be found
      NoSuchRegionLocalizationException
    • fetchByRegionId_First

      public static RegionLocalization fetchByRegionId_First(long regionId, OrderByComparator<RegionLocalization> orderByComparator)
      Returns the first region localization in the ordered set where regionId = ?.
      Parameters:
      regionId - the region ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching region localization, or null if a matching region localization could not be found
    • findByRegionId_Last

      public static RegionLocalization findByRegionId_Last(long regionId, OrderByComparator<RegionLocalization> orderByComparator) throws NoSuchRegionLocalizationException
      Returns the last region localization in the ordered set where regionId = ?.
      Parameters:
      regionId - the region ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching region localization
      Throws:
      NoSuchRegionLocalizationException - if a matching region localization could not be found
      NoSuchRegionLocalizationException
    • fetchByRegionId_Last

      public static RegionLocalization fetchByRegionId_Last(long regionId, OrderByComparator<RegionLocalization> orderByComparator)
      Returns the last region localization in the ordered set where regionId = ?.
      Parameters:
      regionId - the region ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching region localization, or null if a matching region localization could not be found
    • findByRegionId_PrevAndNext

      public static RegionLocalization[] findByRegionId_PrevAndNext(long regionLocalizationId, long regionId, OrderByComparator<RegionLocalization> orderByComparator) throws NoSuchRegionLocalizationException
      Returns the region localizations before and after the current region localization in the ordered set where regionId = ?.
      Parameters:
      regionLocalizationId - the primary key of the current region localization
      regionId - the region ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next region localization
      Throws:
      NoSuchRegionLocalizationException - if a region localization with the primary key could not be found
      NoSuchRegionLocalizationException
    • removeByRegionId

      public static void removeByRegionId(long regionId)
      Removes all the region localizations where regionId = ? from the database.
      Parameters:
      regionId - the region ID
    • countByRegionId

      public static int countByRegionId(long regionId)
      Returns the number of region localizations where regionId = ?.
      Parameters:
      regionId - the region ID
      Returns:
      the number of matching region localizations
    • findByRegionId_LanguageId

      public static RegionLocalization findByRegionId_LanguageId(long regionId, String languageId) throws NoSuchRegionLocalizationException
      Returns the region localization where regionId = ? and languageId = ? or throws a NoSuchRegionLocalizationException if it could not be found.
      Parameters:
      regionId - the region ID
      languageId - the language ID
      Returns:
      the matching region localization
      Throws:
      NoSuchRegionLocalizationException - if a matching region localization could not be found
      NoSuchRegionLocalizationException
    • fetchByRegionId_LanguageId

      public static RegionLocalization fetchByRegionId_LanguageId(long regionId, String languageId)
      Returns the region localization where regionId = ? and languageId = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      regionId - the region ID
      languageId - the language ID
      Returns:
      the matching region localization, or null if a matching region localization could not be found
    • fetchByRegionId_LanguageId

      public static RegionLocalization fetchByRegionId_LanguageId(long regionId, String languageId, boolean useFinderCache)
      Returns the region localization where regionId = ? and languageId = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      regionId - the region ID
      languageId - the language ID
      useFinderCache - whether to use the finder cache
      Returns:
      the matching region localization, or null if a matching region localization could not be found
    • removeByRegionId_LanguageId

      public static RegionLocalization removeByRegionId_LanguageId(long regionId, String languageId) throws NoSuchRegionLocalizationException
      Removes the region localization where regionId = ? and languageId = ? from the database.
      Parameters:
      regionId - the region ID
      languageId - the language ID
      Returns:
      the region localization that was removed
      Throws:
      NoSuchRegionLocalizationException
    • countByRegionId_LanguageId

      public static int countByRegionId_LanguageId(long regionId, String languageId)
      Returns the number of region localizations where regionId = ? and languageId = ?.
      Parameters:
      regionId - the region ID
      languageId - the language ID
      Returns:
      the number of matching region localizations
    • cacheResult

      public static void cacheResult(RegionLocalization regionLocalization)
      Caches the region localization in the entity cache if it is enabled.
      Parameters:
      regionLocalization - the region localization
    • cacheResult

      public static void cacheResult(List<RegionLocalization> regionLocalizations)
      Caches the region localizations in the entity cache if it is enabled.
      Parameters:
      regionLocalizations - the region localizations
    • create

      public static RegionLocalization create(long regionLocalizationId)
      Creates a new region localization with the primary key. Does not add the region localization to the database.
      Parameters:
      regionLocalizationId - the primary key for the new region localization
      Returns:
      the new region localization
    • remove

      public static RegionLocalization remove(long regionLocalizationId) throws NoSuchRegionLocalizationException
      Removes the region localization with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      regionLocalizationId - the primary key of the region localization
      Returns:
      the region localization that was removed
      Throws:
      NoSuchRegionLocalizationException - if a region localization with the primary key could not be found
      NoSuchRegionLocalizationException
    • updateImpl

      public static RegionLocalization updateImpl(RegionLocalization regionLocalization)
    • findByPrimaryKey

      public static RegionLocalization findByPrimaryKey(long regionLocalizationId) throws NoSuchRegionLocalizationException
      Returns the region localization with the primary key or throws a NoSuchRegionLocalizationException if it could not be found.
      Parameters:
      regionLocalizationId - the primary key of the region localization
      Returns:
      the region localization
      Throws:
      NoSuchRegionLocalizationException - if a region localization with the primary key could not be found
      NoSuchRegionLocalizationException
    • fetchByPrimaryKey

      public static RegionLocalization fetchByPrimaryKey(long regionLocalizationId)
      Returns the region localization with the primary key or returns null if it could not be found.
      Parameters:
      regionLocalizationId - the primary key of the region localization
      Returns:
      the region localization, or null if a region localization with the primary key could not be found
    • findAll

      public static List<RegionLocalization> findAll()
      Returns all the region localizations.
      Returns:
      the region localizations
    • findAll

      public static List<RegionLocalization> findAll(int start, int end)
      Returns a range of all the region localizations.

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

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

      public static List<RegionLocalization> findAll(int start, int end, OrderByComparator<RegionLocalization> orderByComparator)
      Returns an ordered range of all the region localizations.

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

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

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

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

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

      public static void removeAll()
      Removes all the region localizations from the database.
    • countAll

      public static int countAll()
      Returns the number of region localizations.
      Returns:
      the number of region localizations
    • getPersistence

      public static RegionLocalizationPersistence getPersistence()
    • setPersistence

      public static void setPersistence(RegionLocalizationPersistence persistence)