public class RegionLocalizationUtil
extends Object
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
RegionLocalizationPersistence
Constructor and Description |
---|
RegionLocalizationUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(List<RegionLocalization> regionLocalizations)
Caches the region localizations in the entity cache if it is enabled.
|
static void |
cacheResult(RegionLocalization regionLocalization)
Caches the region localization in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(RegionLocalization regionLocalization) |
static int |
countAll()
Returns the number of region localizations.
|
static int |
countByRegionId_LanguageId(long regionId,
String languageId)
Returns the number of region localizations where regionId = ? and languageId = ?.
|
static int |
countByRegionId(long regionId)
Returns the number of region localizations where regionId = ?.
|
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 returns
null 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 returns
null 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 returns
null 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 a
NoSuchRegionLocalizationException if it could not be found. |
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 a
NoSuchRegionLocalizationException 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> |
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 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 RegionLocalizationPersistence |
getPersistence() |
static RegionLocalization |
remove(long regionLocalizationId)
Removes the region localization with the primary key from the database.
|
static void |
removeAll()
Removes all the region localizations from the database.
|
static RegionLocalization |
removeByRegionId_LanguageId(long regionId,
String languageId)
Removes the region localization where regionId = ? and languageId = ? from the database.
|
static void |
removeByRegionId(long regionId)
Removes all the region localizations where regionId = ? 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) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(RegionLocalization regionLocalization)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static Map<Serializable,RegionLocalization> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static List<RegionLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<RegionLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static List<RegionLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<RegionLocalization> orderByComparator)
public static RegionLocalization update(RegionLocalization regionLocalization)
public static RegionLocalization update(RegionLocalization regionLocalization, ServiceContext serviceContext)
public static List<RegionLocalization> findByRegionId(long regionId)
regionId
- the region IDpublic static List<RegionLocalization> findByRegionId(long regionId, int start, int end)
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
.
regionId
- the region IDstart
- the lower bound of the range of region localizationsend
- the upper bound of the range of region localizations (not inclusive)public static List<RegionLocalization> findByRegionId(long regionId, int start, int end, OrderByComparator<RegionLocalization> orderByComparator)
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
.
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 (optionally null
)public static List<RegionLocalization> findByRegionId(long regionId, int start, int end, OrderByComparator<RegionLocalization> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static RegionLocalization findByRegionId_First(long regionId, OrderByComparator<RegionLocalization> orderByComparator) throws NoSuchRegionLocalizationException
regionId
- the region IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionLocalizationException
- if a matching region localization could not be foundpublic static RegionLocalization fetchByRegionId_First(long regionId, OrderByComparator<RegionLocalization> orderByComparator)
regionId
- the region IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region localization could not be foundpublic static RegionLocalization findByRegionId_Last(long regionId, OrderByComparator<RegionLocalization> orderByComparator) throws NoSuchRegionLocalizationException
regionId
- the region IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionLocalizationException
- if a matching region localization could not be foundpublic static RegionLocalization fetchByRegionId_Last(long regionId, OrderByComparator<RegionLocalization> orderByComparator)
regionId
- the region IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region localization could not be foundpublic static RegionLocalization[] findByRegionId_PrevAndNext(long regionLocalizationId, long regionId, OrderByComparator<RegionLocalization> orderByComparator) throws NoSuchRegionLocalizationException
regionLocalizationId
- the primary key of the current region localizationregionId
- the region IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionLocalizationException
- if a region localization with the primary key could not be foundpublic static void removeByRegionId(long regionId)
regionId
- the region IDpublic static int countByRegionId(long regionId)
regionId
- the region IDpublic static RegionLocalization findByRegionId_LanguageId(long regionId, String languageId) throws NoSuchRegionLocalizationException
NoSuchRegionLocalizationException
if it could not be found.regionId
- the region IDlanguageId
- the language IDNoSuchRegionLocalizationException
- if a matching region localization could not be foundpublic static RegionLocalization fetchByRegionId_LanguageId(long regionId, String languageId)
null
if it could not be found. Uses the finder cache.regionId
- the region IDlanguageId
- the language IDnull
if a matching region localization could not be foundpublic static RegionLocalization fetchByRegionId_LanguageId(long regionId, String languageId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.regionId
- the region IDlanguageId
- the language IDuseFinderCache
- whether to use the finder cachenull
if a matching region localization could not be foundpublic static RegionLocalization removeByRegionId_LanguageId(long regionId, String languageId) throws NoSuchRegionLocalizationException
regionId
- the region IDlanguageId
- the language IDNoSuchRegionLocalizationException
public static int countByRegionId_LanguageId(long regionId, String languageId)
regionId
- the region IDlanguageId
- the language IDpublic static void cacheResult(RegionLocalization regionLocalization)
regionLocalization
- the region localizationpublic static void cacheResult(List<RegionLocalization> regionLocalizations)
regionLocalizations
- the region localizationspublic static RegionLocalization create(long regionLocalizationId)
regionLocalizationId
- the primary key for the new region localizationpublic static RegionLocalization remove(long regionLocalizationId) throws NoSuchRegionLocalizationException
regionLocalizationId
- the primary key of the region localizationNoSuchRegionLocalizationException
- if a region localization with the primary key could not be foundpublic static RegionLocalization updateImpl(RegionLocalization regionLocalization)
public static RegionLocalization findByPrimaryKey(long regionLocalizationId) throws NoSuchRegionLocalizationException
NoSuchRegionLocalizationException
if it could not be found.regionLocalizationId
- the primary key of the region localizationNoSuchRegionLocalizationException
- if a region localization with the primary key could not be foundpublic static RegionLocalization fetchByPrimaryKey(long regionLocalizationId)
null
if it could not be found.regionLocalizationId
- the primary key of the region localizationnull
if a region localization with the primary key could not be foundpublic static List<RegionLocalization> findAll()
public static List<RegionLocalization> findAll(int start, int end)
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
.
start
- the lower bound of the range of region localizationsend
- the upper bound of the range of region localizations (not inclusive)public static List<RegionLocalization> findAll(int start, int end, OrderByComparator<RegionLocalization> orderByComparator)
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
.
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 (optionally null
)public static List<RegionLocalization> findAll(int start, int end, OrderByComparator<RegionLocalization> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static RegionLocalizationPersistence getPersistence()
public static void setPersistence(RegionLocalizationPersistence persistence)