public class CountryLocalizationUtil
extends java.lang.Object
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
CountryLocalizationPersistence
Constructor and Description |
---|
CountryLocalizationUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CountryLocalization countryLocalization)
Caches the country localization in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CountryLocalization> countryLocalizations)
Caches the country localizations in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CountryLocalization countryLocalization) |
static int |
countAll()
Returns the number of country localizations.
|
static int |
countByCountryId_LanguageId(long countryId,
java.lang.String languageId)
Returns the number of country localizations where countryId = ? and languageId = ?.
|
static int |
countByCountryId(long countryId)
Returns the number of country localizations where countryId = ?.
|
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,
java.lang.String languageId)
Returns the country localization where countryId = ? and languageId = ? or returns
null if it could not be found. |
static CountryLocalization |
fetchByCountryId_LanguageId(long countryId,
java.lang.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. |
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 returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CountryLocalization> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CountryLocalization> |
findAll()
Returns all the country localizations.
|
static java.util.List<CountryLocalization> |
findAll(int start,
int end)
Returns a range of all the country localizations.
|
static java.util.List<CountryLocalization> |
findAll(int start,
int end,
OrderByComparator<CountryLocalization> orderByComparator)
Returns an ordered range of all the country localizations.
|
static java.util.List<CountryLocalization> |
findAll(int start,
int end,
OrderByComparator<CountryLocalization> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the country localizations.
|
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,
java.lang.String languageId)
Returns the country localization where countryId = ? and languageId = ? or throws a
NoSuchCountryLocalizationException 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 java.util.List<CountryLocalization> |
findByCountryId(long countryId)
Returns all the country localizations where countryId = ?.
|
static java.util.List<CountryLocalization> |
findByCountryId(long countryId,
int start,
int end)
Returns a range of all the country localizations where countryId = ?.
|
static java.util.List<CountryLocalization> |
findByCountryId(long countryId,
int start,
int end,
OrderByComparator<CountryLocalization> orderByComparator)
Returns an ordered range of all the country localizations where countryId = ?.
|
static java.util.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 |
findByPrimaryKey(long countryLocalizationId)
Returns the country localization with the primary key or throws a
NoSuchCountryLocalizationException if it could not be found. |
static java.util.List<CountryLocalization> |
findWithDynamicQuery(DynamicQuery dynamicQuery) |
static java.util.List<CountryLocalization> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CountryLocalization> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<CountryLocalization> orderByComparator) |
static CountryLocalizationPersistence |
getPersistence() |
static CountryLocalization |
remove(long countryLocalizationId)
Removes the country localization with the primary key from the database.
|
static void |
removeAll()
Removes all the country localizations from the database.
|
static CountryLocalization |
removeByCountryId_LanguageId(long countryId,
java.lang.String languageId)
Removes the country localization where countryId = ? and languageId = ? from the database.
|
static void |
removeByCountryId(long countryId)
Removes all the country localizations where countryId = ? 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) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CountryLocalization countryLocalization)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static java.util.Map<java.io.Serializable,CountryLocalization> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CountryLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static java.util.List<CountryLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static java.util.List<CountryLocalization> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<CountryLocalization> orderByComparator)
public static CountryLocalization update(CountryLocalization countryLocalization)
public static CountryLocalization update(CountryLocalization countryLocalization, ServiceContext serviceContext)
public static java.util.List<CountryLocalization> findByCountryId(long countryId)
countryId
- the country IDpublic static java.util.List<CountryLocalization> findByCountryId(long countryId, 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 CountryLocalizationModelImpl
.
countryId
- the country IDstart
- the lower bound of the range of country localizationsend
- the upper bound of the range of country localizations (not inclusive)public static java.util.List<CountryLocalization> findByCountryId(long countryId, int start, int end, OrderByComparator<CountryLocalization> 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 CountryLocalizationModelImpl
.
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 (optionally null
)public static java.util.List<CountryLocalization> findByCountryId(long countryId, int start, int end, OrderByComparator<CountryLocalization> 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 CountryLocalizationModelImpl
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static CountryLocalization findByCountryId_First(long countryId, OrderByComparator<CountryLocalization> orderByComparator) throws NoSuchCountryLocalizationException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCountryLocalizationException
- if a matching country localization could not be foundpublic static CountryLocalization fetchByCountryId_First(long countryId, OrderByComparator<CountryLocalization> orderByComparator)
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching country localization could not be foundpublic static CountryLocalization findByCountryId_Last(long countryId, OrderByComparator<CountryLocalization> orderByComparator) throws NoSuchCountryLocalizationException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCountryLocalizationException
- if a matching country localization could not be foundpublic static CountryLocalization fetchByCountryId_Last(long countryId, OrderByComparator<CountryLocalization> orderByComparator)
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching country localization could not be foundpublic static CountryLocalization[] findByCountryId_PrevAndNext(long countryLocalizationId, long countryId, OrderByComparator<CountryLocalization> orderByComparator) throws NoSuchCountryLocalizationException
countryLocalizationId
- the primary key of the current country localizationcountryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCountryLocalizationException
- if a country localization with the primary key could not be foundpublic static void removeByCountryId(long countryId)
countryId
- the country IDpublic static int countByCountryId(long countryId)
countryId
- the country IDpublic static CountryLocalization findByCountryId_LanguageId(long countryId, java.lang.String languageId) throws NoSuchCountryLocalizationException
NoSuchCountryLocalizationException
if it could not be found.countryId
- the country IDlanguageId
- the language IDNoSuchCountryLocalizationException
- if a matching country localization could not be foundpublic static CountryLocalization fetchByCountryId_LanguageId(long countryId, java.lang.String languageId)
null
if it could not be found. Uses the finder cache.countryId
- the country IDlanguageId
- the language IDnull
if a matching country localization could not be foundpublic static CountryLocalization fetchByCountryId_LanguageId(long countryId, java.lang.String languageId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.countryId
- the country IDlanguageId
- the language IDuseFinderCache
- whether to use the finder cachenull
if a matching country localization could not be foundpublic static CountryLocalization removeByCountryId_LanguageId(long countryId, java.lang.String languageId) throws NoSuchCountryLocalizationException
countryId
- the country IDlanguageId
- the language IDNoSuchCountryLocalizationException
public static int countByCountryId_LanguageId(long countryId, java.lang.String languageId)
countryId
- the country IDlanguageId
- the language IDpublic static void cacheResult(CountryLocalization countryLocalization)
countryLocalization
- the country localizationpublic static void cacheResult(java.util.List<CountryLocalization> countryLocalizations)
countryLocalizations
- the country localizationspublic static CountryLocalization create(long countryLocalizationId)
countryLocalizationId
- the primary key for the new country localizationpublic static CountryLocalization remove(long countryLocalizationId) throws NoSuchCountryLocalizationException
countryLocalizationId
- the primary key of the country localizationNoSuchCountryLocalizationException
- if a country localization with the primary key could not be foundpublic static CountryLocalization updateImpl(CountryLocalization countryLocalization)
public static CountryLocalization findByPrimaryKey(long countryLocalizationId) throws NoSuchCountryLocalizationException
NoSuchCountryLocalizationException
if it could not be found.countryLocalizationId
- the primary key of the country localizationNoSuchCountryLocalizationException
- if a country localization with the primary key could not be foundpublic static CountryLocalization fetchByPrimaryKey(long countryLocalizationId)
null
if it could not be found.countryLocalizationId
- the primary key of the country localizationnull
if a country localization with the primary key could not be foundpublic static java.util.List<CountryLocalization> findAll()
public static java.util.List<CountryLocalization> 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 CountryLocalizationModelImpl
.
start
- the lower bound of the range of country localizationsend
- the upper bound of the range of country localizations (not inclusive)public static java.util.List<CountryLocalization> findAll(int start, int end, OrderByComparator<CountryLocalization> 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 CountryLocalizationModelImpl
.
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 (optionally null
)public static java.util.List<CountryLocalization> findAll(int start, int end, OrderByComparator<CountryLocalization> 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 CountryLocalizationModelImpl
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static CountryLocalizationPersistence getPersistence()
public static void setPersistence(CountryLocalizationPersistence persistence)