Class CountryLocalizationUtil

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

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

    • CountryLocalizationUtil

      public CountryLocalizationUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
    • clearCache

      public static void clearCache(CountryLocalization countryLocalization)
      See Also:
    • countWithDynamicQuery

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

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

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

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

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

      public static CountryLocalization update(CountryLocalization countryLocalization)
      See Also:
    • update

      public static CountryLocalization update(CountryLocalization countryLocalization, ServiceContext serviceContext)
      See Also:
    • findByCountryId

      public static List<CountryLocalization> findByCountryId(long countryId)
      Returns all the country localizations where countryId = ?.
      Parameters:
      countryId - the country ID
      Returns:
      the matching country localizations
    • findByCountryId

      public static List<CountryLocalization> findByCountryId(long countryId, int start, int end)
      Returns a range of all the country localizations where countryId = ?.

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

      Parameters:
      countryId - the country ID
      start - the lower bound of the range of country localizations
      end - the upper bound of the range of country localizations (not inclusive)
      Returns:
      the range of matching country localizations
    • findByCountryId

      public static List<CountryLocalization> findByCountryId(long countryId, int start, int end, OrderByComparator<CountryLocalization> orderByComparator)
      Returns an ordered range of all the country localizations where countryId = ?.

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

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

      public static List<CountryLocalization> findByCountryId(long countryId, int start, int end, OrderByComparator<CountryLocalization> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the country localizations where countryId = ?.

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

      Parameters:
      countryId - the country ID
      start - the lower bound of the range of country localizations
      end - the upper bound of the range of country 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 country localizations
    • findByCountryId_First

      public static CountryLocalization findByCountryId_First(long countryId, OrderByComparator<CountryLocalization> orderByComparator) throws NoSuchCountryLocalizationException
      Returns the first country localization in the ordered set where countryId = ?.
      Parameters:
      countryId - the country ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching country localization
      Throws:
      NoSuchCountryLocalizationException - if a matching country localization could not be found
      NoSuchCountryLocalizationException
    • fetchByCountryId_First

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

      public static CountryLocalization findByCountryId_Last(long countryId, OrderByComparator<CountryLocalization> orderByComparator) throws NoSuchCountryLocalizationException
      Returns the last country localization in the ordered set where countryId = ?.
      Parameters:
      countryId - the country ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching country localization
      Throws:
      NoSuchCountryLocalizationException - if a matching country localization could not be found
      NoSuchCountryLocalizationException
    • fetchByCountryId_Last

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

      public static CountryLocalization[] findByCountryId_PrevAndNext(long countryLocalizationId, long countryId, OrderByComparator<CountryLocalization> orderByComparator) throws NoSuchCountryLocalizationException
      Returns the country localizations before and after the current country localization in the ordered set where countryId = ?.
      Parameters:
      countryLocalizationId - the primary key of the current country localization
      countryId - the country ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next country localization
      Throws:
      NoSuchCountryLocalizationException - if a country localization with the primary key could not be found
      NoSuchCountryLocalizationException
    • removeByCountryId

      public static void removeByCountryId(long countryId)
      Removes all the country localizations where countryId = ? from the database.
      Parameters:
      countryId - the country ID
    • countByCountryId

      public static int countByCountryId(long countryId)
      Returns the number of country localizations where countryId = ?.
      Parameters:
      countryId - the country ID
      Returns:
      the number of matching country localizations
    • findByCountryId_LanguageId

      public static CountryLocalization findByCountryId_LanguageId(long countryId, String languageId) throws NoSuchCountryLocalizationException
      Returns the country localization where countryId = ? and languageId = ? or throws a NoSuchCountryLocalizationException if it could not be found.
      Parameters:
      countryId - the country ID
      languageId - the language ID
      Returns:
      the matching country localization
      Throws:
      NoSuchCountryLocalizationException - if a matching country localization could not be found
      NoSuchCountryLocalizationException
    • fetchByCountryId_LanguageId

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

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

      public static CountryLocalization removeByCountryId_LanguageId(long countryId, String languageId) throws NoSuchCountryLocalizationException
      Removes the country localization where countryId = ? and languageId = ? from the database.
      Parameters:
      countryId - the country ID
      languageId - the language ID
      Returns:
      the country localization that was removed
      Throws:
      NoSuchCountryLocalizationException
    • countByCountryId_LanguageId

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

      public static void cacheResult(CountryLocalization countryLocalization)
      Caches the country localization in the entity cache if it is enabled.
      Parameters:
      countryLocalization - the country localization
    • cacheResult

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

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

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

      public static CountryLocalization updateImpl(CountryLocalization countryLocalization)
    • findByPrimaryKey

      public static CountryLocalization findByPrimaryKey(long countryLocalizationId) throws NoSuchCountryLocalizationException
      Returns the country localization with the primary key or throws a NoSuchCountryLocalizationException if it could not be found.
      Parameters:
      countryLocalizationId - the primary key of the country localization
      Returns:
      the country localization
      Throws:
      NoSuchCountryLocalizationException - if a country localization with the primary key could not be found
      NoSuchCountryLocalizationException
    • fetchByPrimaryKey

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

      public static List<CountryLocalization> findAll()
      Returns all the country localizations.
      Returns:
      the country localizations
    • findAll

      public static List<CountryLocalization> findAll(int start, int end)
      Returns a range of all the country 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 CountryLocalizationModelImpl.

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

      public static List<CountryLocalization> findAll(int start, int end, OrderByComparator<CountryLocalization> orderByComparator)
      Returns an ordered range of all the country 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 CountryLocalizationModelImpl.

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

      public static List<CountryLocalization> findAll(int start, int end, OrderByComparator<CountryLocalization> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the country 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 CountryLocalizationModelImpl.

      Parameters:
      start - the lower bound of the range of country localizations
      end - the upper bound of the range of country 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 country localizations
    • removeAll

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

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

      public static CountryLocalizationPersistence getPersistence()
    • setPersistence

      public static void setPersistence(CountryLocalizationPersistence persistence)