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 void
cacheResult
(CountryLocalization countryLocalization) Caches the country localization in the entity cache if it is enabled.static void
cacheResult
(List<CountryLocalization> countryLocalizations) Caches the country localizations in the entity cache if it is enabled.static void
static void
clearCache
(CountryLocalization countryLocalization) static int
countAll()
Returns the number of country localizations.static int
countByCountryId
(long countryId) Returns the number of country localizations where countryId = ?.static int
countByCountryId_LanguageId
(long countryId, String languageId) Returns the number of country localizations where countryId = ? and languageId = ?.static long
countWithDynamicQuery
(DynamicQuery dynamicQuery) static CountryLocalization
create
(long countryLocalizationId) Creates a new country localization with the primary key.static CountryLocalization
fetchByCountryId_First
(long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the first country localization in the ordered set where countryId = ?.static CountryLocalization
fetchByCountryId_LanguageId
(long countryId, String languageId) Returns the country localization where countryId = ? and languageId = ? or returnsnull
if it could not be found.static CountryLocalization
fetchByCountryId_LanguageId
(long countryId, String languageId, boolean useFinderCache) Returns the country localization where countryId = ? and languageId = ? or returnsnull
if it could not be found, optionally using the finder cache.static CountryLocalization
fetchByCountryId_Last
(long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the last country localization in the ordered set where countryId = ?.static CountryLocalization
fetchByPrimaryKey
(long countryLocalizationId) Returns the country localization with the primary key or returnsnull
if 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 CountryLocalization
findByCountryId_First
(long countryId, OrderByComparator<CountryLocalization> orderByComparator) Returns the first country localization in the ordered set where countryId = ?.static CountryLocalization
findByCountryId_LanguageId
(long countryId, String languageId) Returns the country localization where countryId = ? and languageId = ? or throws aNoSuchCountryLocalizationException
if it could not be found.static CountryLocalization
findByCountryId_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 CountryLocalization
findByPrimaryKey
(long countryLocalizationId) Returns the country localization with the primary key or throws aNoSuchCountryLocalizationException
if 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 CountryLocalization
remove
(long countryLocalizationId) Removes the country localization with the primary key from the database.static void
Removes all the country localizations from the database.static void
removeByCountryId
(long countryId) Removes all the country localizations where countryId = ? from the database.static CountryLocalization
removeByCountryId_LanguageId
(long countryId, String languageId) Removes the country localization where countryId = ? and languageId = ? from the database.static void
setPersistence
(CountryLocalizationPersistence persistence) static CountryLocalization
update
(CountryLocalization countryLocalization) static CountryLocalization
update
(CountryLocalization countryLocalization, ServiceContext serviceContext) static CountryLocalization
updateImpl
(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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is 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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is 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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is 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
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 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
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 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 aNoSuchCountryLocalizationException
if 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 returnsnull
if it could not be found. Uses the finder cache.- Parameters:
countryId
- the country IDlanguageId
- 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 returnsnull
if 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
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 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 aNoSuchCountryLocalizationException
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 foundNoSuchCountryLocalizationException
-
fetchByPrimaryKey
Returns the country localization with the primary key or returnsnull
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
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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is 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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is 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 - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is 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
-