Class CountryLocalizationUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(CountryLocalization countryLocalization) Caches the country localization in the entity cache if it is enabled.static voidcacheResult(List<CountryLocalization> countryLocalizations) Caches the country localizations in the entity cache if it is enabled.static voidstatic voidclearCache(CountryLocalization countryLocalization) static intcountAll()Returns the number of country localizations.static intcountByCountryId(long countryId) Returns the number of country localizations where countryId = ?.static intcountByCountryId_LanguageId(long countryId, String languageId) Returns the number of country localizations where countryId = ? and languageId = ?.static longcountWithDynamicQuery(DynamicQuery dynamicQuery) static CountryLocalizationcreate(long countryLocalizationId) Creates a new country localization with the primary key.static CountryLocalizationfetchByCountryId_First(long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the first country localization in the ordered set where countryId = ?.static CountryLocalizationfetchByCountryId_LanguageId(long countryId, String languageId) Returns the country localization where countryId = ? and languageId = ? or returnsnullif it could not be found.static CountryLocalizationfetchByCountryId_LanguageId(long countryId, String languageId, boolean useFinderCache) Returns the country localization where countryId = ? and languageId = ? or returnsnullif it could not be found, optionally using the finder cache.static CountryLocalizationfetchByCountryId_Last(long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the last country localization in the ordered set where countryId = ?.static CountryLocalizationfetchByPrimaryKey(long countryLocalizationId) Returns the country localization with the primary key or returnsnullif it could not be found.static Map<Serializable,CountryLocalization> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static List<CountryLocalization>findAll()Returns all the country localizations.static List<CountryLocalization>findAll(int start, int end) Returns a range of all the country localizations.static List<CountryLocalization>findAll(int start, int end, OrderByComparator<CountryLocalization> orderByComparator) Returns an ordered range of all the country localizations.static List<CountryLocalization>findAll(int start, int end, OrderByComparator<CountryLocalization> orderByComparator, boolean useFinderCache) Returns an ordered range of all the country localizations.static List<CountryLocalization>findByCountryId(long countryId) Returns all the country localizations where countryId = ?.static List<CountryLocalization>findByCountryId(long countryId, int start, int end) Returns a range of all the country localizations where countryId = ?.static List<CountryLocalization>findByCountryId(long countryId, int start, int end, OrderByComparator<CountryLocalization> orderByComparator) Returns an ordered range of all the country localizations where countryId = ?.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 = ?.static CountryLocalizationfindByCountryId_First(long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the first country localization in the ordered set where countryId = ?.static CountryLocalizationfindByCountryId_LanguageId(long countryId, String languageId) Returns the country localization where countryId = ? and languageId = ? or throws aNoSuchCountryLocalizationExceptionif it could not be found.static CountryLocalizationfindByCountryId_Last(long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the last country localization in the ordered set where countryId = ?.static CountryLocalization[]findByCountryId_PrevAndNext(long countryLocalizationId, long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the country localizations before and after the current country localization in the ordered set where countryId = ?.static CountryLocalizationfindByPrimaryKey(long countryLocalizationId) Returns the country localization with the primary key or throws aNoSuchCountryLocalizationExceptionif it could not be found.static List<CountryLocalization>findWithDynamicQuery(DynamicQuery dynamicQuery) static List<CountryLocalization>findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) static List<CountryLocalization>findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<CountryLocalization> orderByComparator) static CountryLocalizationremove(long countryLocalizationId) Removes the country localization with the primary key from the database.static voidRemoves all the country localizations from the database.static voidremoveByCountryId(long countryId) Removes all the country localizations where countryId = ? from the database.static CountryLocalizationremoveByCountryId_LanguageId(long countryId, String languageId) Removes the country localization where countryId = ? and languageId = ? from the database.static voidsetPersistence(CountryLocalizationPersistence persistence) static CountryLocalizationupdate(CountryLocalization countryLocalization) static CountryLocalizationupdate(CountryLocalization countryLocalization, ServiceContext serviceContext) static CountryLocalizationupdateImpl(CountryLocalization countryLocalization)
-
Constructor Details
-
CountryLocalizationUtil
public CountryLocalizationUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
-
countWithDynamicQuery
-
fetchByPrimaryKeys
public static Map<Serializable,CountryLocalization> fetchByPrimaryKeys(Set<Serializable> primaryKeys) - See Also:
-
findWithDynamicQuery
-
findWithDynamicQuery
public static List<CountryLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) -
findWithDynamicQuery
public static List<CountryLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<CountryLocalization> orderByComparator) -
update
-
update
public static CountryLocalization update(CountryLocalization countryLocalization, ServiceContext serviceContext) -
findByCountryId
Returns all the country localizations where countryId = ?.- Parameters:
countryId- the country ID- Returns:
- the matching country localizations
-
findByCountryId
Returns a range of all the country localizations where countryId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCountryLocalizationModelImpl.- Parameters:
countryId- the country IDstart- the lower bound of the range of country localizationsend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCountryLocalizationModelImpl.- Parameters:
countryId- the country IDstart- the lower bound of the range of country localizationsend- the upper bound of the range of country localizations (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCountryLocalizationModelImpl.- Parameters:
countryId- the country IDstart- the lower bound of the range of country localizationsend- the upper bound of the range of country localizations (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching country localization
- Throws:
NoSuchCountryLocalizationException- if a matching country localization could not be foundNoSuchCountryLocalizationException
-
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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching country localization, or
nullif 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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the last matching country localization
- Throws:
NoSuchCountryLocalizationException- if a matching country localization could not be foundNoSuchCountryLocalizationException
-
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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the last matching country localization, or
nullif 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 localizationcountryId- the country IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the previous, current, and next country localization
- Throws:
NoSuchCountryLocalizationException- if a country localization with the primary key could not be foundNoSuchCountryLocalizationException
-
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 aNoSuchCountryLocalizationExceptionif it could not be found.- Parameters:
countryId- the country IDlanguageId- the language ID- Returns:
- the matching country localization
- Throws:
NoSuchCountryLocalizationException- if a matching country localization could not be foundNoSuchCountryLocalizationException
-
fetchByCountryId_LanguageId
Returns the country localization where countryId = ? and languageId = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
countryId- the country IDlanguageId- the language ID- Returns:
- the matching country localization, or
nullif 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 returnsnullif it could not be found, optionally using the finder cache.- Parameters:
countryId- the country IDlanguageId- the language IDuseFinderCache- whether to use the finder cache- Returns:
- the matching country localization, or
nullif 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 IDlanguageId- the language ID- Returns:
- the country localization that was removed
- Throws:
NoSuchCountryLocalizationException
-
countByCountryId_LanguageId
Returns the number of country localizations where countryId = ? and languageId = ?.- Parameters:
countryId- the country IDlanguageId- the language ID- Returns:
- the number of matching country localizations
-
cacheResult
Caches the country localization in the entity cache if it is enabled.- Parameters:
countryLocalization- the country localization
-
cacheResult
Caches the country localizations in the entity cache if it is enabled.- Parameters:
countryLocalizations- the country localizations
-
create
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 foundNoSuchCountryLocalizationException
-
updateImpl
-
findByPrimaryKey
public static CountryLocalization findByPrimaryKey(long countryLocalizationId) throws NoSuchCountryLocalizationException Returns the country localization with the primary key or throws aNoSuchCountryLocalizationExceptionif 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 foundNoSuchCountryLocalizationException
-
fetchByPrimaryKey
Returns the country localization with the primary key or returnsnullif it could not be found.- Parameters:
countryLocalizationId- the primary key of the country localization- Returns:
- the country localization, or
nullif a country localization with the primary key could not be found
-
findAll
Returns all the country localizations.- Returns:
- the country localizations
-
findAll
Returns a range of all the country localizations.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCountryLocalizationModelImpl.- Parameters:
start- the lower bound of the range of country localizationsend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCountryLocalizationModelImpl.- Parameters:
start- the lower bound of the range of country localizationsend- the upper bound of the range of country localizations (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromCountryLocalizationModelImpl.- Parameters:
start- the lower bound of the range of country localizationsend- the upper bound of the range of country localizations (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)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
-
setPersistence
-