Class RegionLocalizationUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cacheResult
(RegionLocalization regionLocalization) Caches the region localization in the entity cache if it is enabled.static void
cacheResult
(List<RegionLocalization> regionLocalizations) Caches the region localizations in the entity cache if it is enabled.static void
static void
clearCache
(RegionLocalization regionLocalization) static int
countAll()
Returns the number of region localizations.static int
countByRegionId
(long regionId) Returns the number of region localizations where regionId = ?.static int
countByRegionId_LanguageId
(long regionId, String languageId) Returns the number of region localizations where regionId = ? and languageId = ?.static long
countWithDynamicQuery
(DynamicQuery dynamicQuery) static RegionLocalization
create
(long regionLocalizationId) Creates a new region localization with the primary key.static RegionLocalization
fetchByPrimaryKey
(long regionLocalizationId) Returns the region localization with the primary key or returnsnull
if it could not be found.static Map<Serializable,
RegionLocalization> fetchByPrimaryKeys
(Set<Serializable> primaryKeys) static RegionLocalization
fetchByRegionId_First
(long regionId, OrderByComparator<RegionLocalization> orderByComparator) Returns the first region localization in the ordered set where regionId = ?.static RegionLocalization
fetchByRegionId_LanguageId
(long regionId, String languageId) Returns the region localization where regionId = ? and languageId = ? or returnsnull
if it could not be found.static RegionLocalization
fetchByRegionId_LanguageId
(long regionId, String languageId, boolean useFinderCache) Returns the region localization where regionId = ? and languageId = ? or returnsnull
if it could not be found, optionally using the finder cache.static RegionLocalization
fetchByRegionId_Last
(long regionId, OrderByComparator<RegionLocalization> orderByComparator) Returns the last region localization in the ordered set where regionId = ?.static List<RegionLocalization>
findAll()
Returns all the region localizations.static List<RegionLocalization>
findAll
(int start, int end) Returns a range of all the region localizations.static List<RegionLocalization>
findAll
(int start, int end, OrderByComparator<RegionLocalization> orderByComparator) Returns an ordered range of all the region localizations.static List<RegionLocalization>
findAll
(int start, int end, OrderByComparator<RegionLocalization> orderByComparator, boolean useFinderCache) Returns an ordered range of all the region localizations.static RegionLocalization
findByPrimaryKey
(long regionLocalizationId) Returns the region localization with the primary key or throws aNoSuchRegionLocalizationException
if it could not be found.static List<RegionLocalization>
findByRegionId
(long regionId) Returns all the region localizations where regionId = ?.static List<RegionLocalization>
findByRegionId
(long regionId, int start, int end) Returns a range of all the region localizations where regionId = ?.static List<RegionLocalization>
findByRegionId
(long regionId, int start, int end, OrderByComparator<RegionLocalization> orderByComparator) Returns an ordered range of all the region localizations where regionId = ?.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 = ?.static RegionLocalization
findByRegionId_First
(long regionId, OrderByComparator<RegionLocalization> orderByComparator) Returns the first region localization in the ordered set where regionId = ?.static RegionLocalization
findByRegionId_LanguageId
(long regionId, String languageId) Returns the region localization where regionId = ? and languageId = ? or throws aNoSuchRegionLocalizationException
if it could not be found.static RegionLocalization
findByRegionId_Last
(long regionId, OrderByComparator<RegionLocalization> orderByComparator) Returns the last region localization in the ordered set where regionId = ?.static RegionLocalization[]
findByRegionId_PrevAndNext
(long regionLocalizationId, long regionId, OrderByComparator<RegionLocalization> orderByComparator) Returns the region localizations before and after the current region localization in the ordered set where regionId = ?.static List<RegionLocalization>
findWithDynamicQuery
(DynamicQuery dynamicQuery) static List<RegionLocalization>
findWithDynamicQuery
(DynamicQuery dynamicQuery, int start, int end) static List<RegionLocalization>
findWithDynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<RegionLocalization> orderByComparator) static RegionLocalization
remove
(long regionLocalizationId) Removes the region localization with the primary key from the database.static void
Removes all the region localizations from the database.static void
removeByRegionId
(long regionId) Removes all the region localizations where regionId = ? from the database.static RegionLocalization
removeByRegionId_LanguageId
(long regionId, String languageId) Removes the region localization where regionId = ? and languageId = ? from the database.static void
setPersistence
(RegionLocalizationPersistence persistence) static RegionLocalization
update
(RegionLocalization regionLocalization) static RegionLocalization
update
(RegionLocalization regionLocalization, ServiceContext serviceContext) static RegionLocalization
updateImpl
(RegionLocalization regionLocalization)
-
Constructor Details
-
RegionLocalizationUtil
public RegionLocalizationUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
-
countWithDynamicQuery
-
fetchByPrimaryKeys
public static Map<Serializable,RegionLocalization> fetchByPrimaryKeys(Set<Serializable> primaryKeys) - See Also:
-
findWithDynamicQuery
-
findWithDynamicQuery
public static List<RegionLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) -
findWithDynamicQuery
public static List<RegionLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<RegionLocalization> orderByComparator) -
update
-
update
public static RegionLocalization update(RegionLocalization regionLocalization, ServiceContext serviceContext) -
findByRegionId
Returns all the region localizations where regionId = ?.- Parameters:
regionId
- the region ID- Returns:
- the matching region localizations
-
findByRegionId
Returns a range of all the region localizations where regionId = ?.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 fromRegionLocalizationModelImpl
.- Parameters:
regionId
- the region IDstart
- the lower bound of the range of region localizationsend
- 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
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 fromRegionLocalizationModelImpl
.- Parameters:
regionId
- the region IDstart
- the lower bound of the range of region localizationsend
- the upper bound of the range of region localizations (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- 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
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 fromRegionLocalizationModelImpl
.- Parameters:
regionId
- the region IDstart
- the lower bound of the range of region localizationsend
- the upper bound of the range of region 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 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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching region localization
- Throws:
NoSuchRegionLocalizationException
- if a matching region localization could not be foundNoSuchRegionLocalizationException
-
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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- 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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching region localization
- Throws:
NoSuchRegionLocalizationException
- if a matching region localization could not be foundNoSuchRegionLocalizationException
-
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 IDorderByComparator
- the comparator to order the set by (optionallynull
)- 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 localizationregionId
- the region IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next region localization
- Throws:
NoSuchRegionLocalizationException
- if a region localization with the primary key could not be foundNoSuchRegionLocalizationException
-
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 aNoSuchRegionLocalizationException
if it could not be found.- Parameters:
regionId
- the region IDlanguageId
- the language ID- Returns:
- the matching region localization
- Throws:
NoSuchRegionLocalizationException
- if a matching region localization could not be foundNoSuchRegionLocalizationException
-
fetchByRegionId_LanguageId
Returns the region localization where regionId = ? and languageId = ? or returnsnull
if it could not be found. Uses the finder cache.- Parameters:
regionId
- the region IDlanguageId
- 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 returnsnull
if it could not be found, optionally using the finder cache.- Parameters:
regionId
- the region IDlanguageId
- the language IDuseFinderCache
- 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 IDlanguageId
- the language ID- Returns:
- the region localization that was removed
- Throws:
NoSuchRegionLocalizationException
-
countByRegionId_LanguageId
Returns the number of region localizations where regionId = ? and languageId = ?.- Parameters:
regionId
- the region IDlanguageId
- the language ID- Returns:
- the number of matching region localizations
-
cacheResult
Caches the region localization in the entity cache if it is enabled.- Parameters:
regionLocalization
- the region localization
-
cacheResult
Caches the region localizations in the entity cache if it is enabled.- Parameters:
regionLocalizations
- the region localizations
-
create
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 foundNoSuchRegionLocalizationException
-
updateImpl
-
findByPrimaryKey
public static RegionLocalization findByPrimaryKey(long regionLocalizationId) throws NoSuchRegionLocalizationException Returns the region localization with the primary key or throws aNoSuchRegionLocalizationException
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 foundNoSuchRegionLocalizationException
-
fetchByPrimaryKey
Returns the region localization with the primary key or returnsnull
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
Returns all the region localizations.- Returns:
- the region localizations
-
findAll
Returns a range of all the region 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 fromRegionLocalizationModelImpl
.- Parameters:
start
- the lower bound of the range of region localizationsend
- 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
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 fromRegionLocalizationModelImpl
.- Parameters:
start
- the lower bound of the range of region localizationsend
- the upper bound of the range of region localizations (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- 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
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 fromRegionLocalizationModelImpl
.- Parameters:
start
- the lower bound of the range of region localizationsend
- the upper bound of the range of region localizations (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)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
-
setPersistence
-