public class CPDefinitionLocalizationUtil
extends java.lang.Object
com.liferay.commerce.product.service.persistence.impl.CPDefinitionLocalizationPersistenceImpl
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
CPDefinitionLocalizationPersistence
Constructor and Description |
---|
CPDefinitionLocalizationUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CPDefinitionLocalization cpDefinitionLocalization)
Caches the cp definition localization in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CPDefinitionLocalization> cpDefinitionLocalizations)
Caches the cp definition localizations in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CPDefinitionLocalization cpDefinitionLocalization) |
static int |
countAll()
Returns the number of cp definition localizations.
|
static int |
countByCPDefinitionId_LanguageId(long CPDefinitionId,
java.lang.String languageId)
Returns the number of cp definition localizations where CPDefinitionId = ? and languageId = ?.
|
static int |
countByCPDefinitionId(long CPDefinitionId)
Returns the number of cp definition localizations where CPDefinitionId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CPDefinitionLocalization |
create(long cpDefinitionLocalizationId)
Creates a new cp definition localization with the primary key.
|
static CPDefinitionLocalization |
fetchByCPDefinitionId_First(long CPDefinitionId,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
Returns the first cp definition localization in the ordered set where CPDefinitionId = ?.
|
static CPDefinitionLocalization |
fetchByCPDefinitionId_LanguageId(long CPDefinitionId,
java.lang.String languageId)
Returns the cp definition localization where CPDefinitionId = ? and languageId = ? or returns
null if it could not be found. |
static CPDefinitionLocalization |
fetchByCPDefinitionId_LanguageId(long CPDefinitionId,
java.lang.String languageId,
boolean useFinderCache)
Returns the cp definition localization where CPDefinitionId = ? and languageId = ? or returns
null if it could not be found, optionally using the finder cache. |
static CPDefinitionLocalization |
fetchByCPDefinitionId_Last(long CPDefinitionId,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
Returns the last cp definition localization in the ordered set where CPDefinitionId = ?.
|
static CPDefinitionLocalization |
fetchByPrimaryKey(long cpDefinitionLocalizationId)
Returns the cp definition localization with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CPDefinitionLocalization> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CPDefinitionLocalization> |
findAll()
Returns all the cp definition localizations.
|
static java.util.List<CPDefinitionLocalization> |
findAll(int start,
int end)
Returns a range of all the cp definition localizations.
|
static java.util.List<CPDefinitionLocalization> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
Returns an ordered range of all the cp definition localizations.
|
static java.util.List<CPDefinitionLocalization> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the cp definition localizations.
|
static CPDefinitionLocalization |
findByCPDefinitionId_First(long CPDefinitionId,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
Returns the first cp definition localization in the ordered set where CPDefinitionId = ?.
|
static CPDefinitionLocalization |
findByCPDefinitionId_LanguageId(long CPDefinitionId,
java.lang.String languageId)
Returns the cp definition localization where CPDefinitionId = ? and languageId = ? or throws a
NoSuchCPDefinitionLocalizationException if it could not be found. |
static CPDefinitionLocalization |
findByCPDefinitionId_Last(long CPDefinitionId,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
Returns the last cp definition localization in the ordered set where CPDefinitionId = ?.
|
static CPDefinitionLocalization[] |
findByCPDefinitionId_PrevAndNext(long cpDefinitionLocalizationId,
long CPDefinitionId,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
Returns the cp definition localizations before and after the current cp definition localization in the ordered set where CPDefinitionId = ?.
|
static java.util.List<CPDefinitionLocalization> |
findByCPDefinitionId(long CPDefinitionId)
Returns all the cp definition localizations where CPDefinitionId = ?.
|
static java.util.List<CPDefinitionLocalization> |
findByCPDefinitionId(long CPDefinitionId,
int start,
int end)
Returns a range of all the cp definition localizations where CPDefinitionId = ?.
|
static java.util.List<CPDefinitionLocalization> |
findByCPDefinitionId(long CPDefinitionId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
Returns an ordered range of all the cp definition localizations where CPDefinitionId = ?.
|
static java.util.List<CPDefinitionLocalization> |
findByCPDefinitionId(long CPDefinitionId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the cp definition localizations where CPDefinitionId = ?.
|
static CPDefinitionLocalization |
findByPrimaryKey(long cpDefinitionLocalizationId)
Returns the cp definition localization with the primary key or throws a
NoSuchCPDefinitionLocalizationException if it could not be found. |
static java.util.List<CPDefinitionLocalization> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CPDefinitionLocalization> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CPDefinitionLocalization> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator) |
static CPDefinitionLocalizationPersistence |
getPersistence() |
static CPDefinitionLocalization |
remove(long cpDefinitionLocalizationId)
Removes the cp definition localization with the primary key from the database.
|
static void |
removeAll()
Removes all the cp definition localizations from the database.
|
static CPDefinitionLocalization |
removeByCPDefinitionId_LanguageId(long CPDefinitionId,
java.lang.String languageId)
Removes the cp definition localization where CPDefinitionId = ? and languageId = ? from the database.
|
static void |
removeByCPDefinitionId(long CPDefinitionId)
Removes all the cp definition localizations where CPDefinitionId = ? from the database.
|
static CPDefinitionLocalization |
update(CPDefinitionLocalization cpDefinitionLocalization) |
static CPDefinitionLocalization |
update(CPDefinitionLocalization cpDefinitionLocalization,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CPDefinitionLocalization |
updateImpl(CPDefinitionLocalization cpDefinitionLocalization) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CPDefinitionLocalization cpDefinitionLocalization)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,CPDefinitionLocalization> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CPDefinitionLocalization> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<CPDefinitionLocalization> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<CPDefinitionLocalization> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static CPDefinitionLocalization update(CPDefinitionLocalization cpDefinitionLocalization)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static CPDefinitionLocalization update(CPDefinitionLocalization cpDefinitionLocalization, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<CPDefinitionLocalization> findByCPDefinitionId(long CPDefinitionId)
CPDefinitionId
- the cp definition IDpublic static java.util.List<CPDefinitionLocalization> findByCPDefinitionId(long CPDefinitionId, 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 CPDefinitionLocalizationModelImpl
.
CPDefinitionId
- the cp definition IDstart
- the lower bound of the range of cp definition localizationsend
- the upper bound of the range of cp definition localizations (not inclusive)public static java.util.List<CPDefinitionLocalization> findByCPDefinitionId(long CPDefinitionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> 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 CPDefinitionLocalizationModelImpl
.
CPDefinitionId
- the cp definition IDstart
- the lower bound of the range of cp definition localizationsend
- the upper bound of the range of cp definition localizations (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CPDefinitionLocalization> findByCPDefinitionId(long CPDefinitionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> 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 CPDefinitionLocalizationModelImpl
.
CPDefinitionId
- the cp definition IDstart
- the lower bound of the range of cp definition localizationsend
- the upper bound of the range of cp definition localizations (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static CPDefinitionLocalization findByCPDefinitionId_First(long CPDefinitionId, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator) throws NoSuchCPDefinitionLocalizationException
CPDefinitionId
- the cp definition IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCPDefinitionLocalizationException
- if a matching cp definition localization could not be foundpublic static CPDefinitionLocalization fetchByCPDefinitionId_First(long CPDefinitionId, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
CPDefinitionId
- the cp definition IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching cp definition localization could not be foundpublic static CPDefinitionLocalization findByCPDefinitionId_Last(long CPDefinitionId, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator) throws NoSuchCPDefinitionLocalizationException
CPDefinitionId
- the cp definition IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCPDefinitionLocalizationException
- if a matching cp definition localization could not be foundpublic static CPDefinitionLocalization fetchByCPDefinitionId_Last(long CPDefinitionId, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator)
CPDefinitionId
- the cp definition IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching cp definition localization could not be foundpublic static CPDefinitionLocalization[] findByCPDefinitionId_PrevAndNext(long cpDefinitionLocalizationId, long CPDefinitionId, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> orderByComparator) throws NoSuchCPDefinitionLocalizationException
cpDefinitionLocalizationId
- the primary key of the current cp definition localizationCPDefinitionId
- the cp definition IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCPDefinitionLocalizationException
- if a cp definition localization with the primary key could not be foundpublic static void removeByCPDefinitionId(long CPDefinitionId)
CPDefinitionId
- the cp definition IDpublic static int countByCPDefinitionId(long CPDefinitionId)
CPDefinitionId
- the cp definition IDpublic static CPDefinitionLocalization findByCPDefinitionId_LanguageId(long CPDefinitionId, java.lang.String languageId) throws NoSuchCPDefinitionLocalizationException
NoSuchCPDefinitionLocalizationException
if it could not be found.CPDefinitionId
- the cp definition IDlanguageId
- the language IDNoSuchCPDefinitionLocalizationException
- if a matching cp definition localization could not be foundpublic static CPDefinitionLocalization fetchByCPDefinitionId_LanguageId(long CPDefinitionId, java.lang.String languageId)
null
if it could not be found. Uses the finder cache.CPDefinitionId
- the cp definition IDlanguageId
- the language IDnull
if a matching cp definition localization could not be foundpublic static CPDefinitionLocalization fetchByCPDefinitionId_LanguageId(long CPDefinitionId, java.lang.String languageId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.CPDefinitionId
- the cp definition IDlanguageId
- the language IDuseFinderCache
- whether to use the finder cachenull
if a matching cp definition localization could not be foundpublic static CPDefinitionLocalization removeByCPDefinitionId_LanguageId(long CPDefinitionId, java.lang.String languageId) throws NoSuchCPDefinitionLocalizationException
CPDefinitionId
- the cp definition IDlanguageId
- the language IDNoSuchCPDefinitionLocalizationException
public static int countByCPDefinitionId_LanguageId(long CPDefinitionId, java.lang.String languageId)
CPDefinitionId
- the cp definition IDlanguageId
- the language IDpublic static void cacheResult(CPDefinitionLocalization cpDefinitionLocalization)
cpDefinitionLocalization
- the cp definition localizationpublic static void cacheResult(java.util.List<CPDefinitionLocalization> cpDefinitionLocalizations)
cpDefinitionLocalizations
- the cp definition localizationspublic static CPDefinitionLocalization create(long cpDefinitionLocalizationId)
cpDefinitionLocalizationId
- the primary key for the new cp definition localizationpublic static CPDefinitionLocalization remove(long cpDefinitionLocalizationId) throws NoSuchCPDefinitionLocalizationException
cpDefinitionLocalizationId
- the primary key of the cp definition localizationNoSuchCPDefinitionLocalizationException
- if a cp definition localization with the primary key could not be foundpublic static CPDefinitionLocalization updateImpl(CPDefinitionLocalization cpDefinitionLocalization)
public static CPDefinitionLocalization findByPrimaryKey(long cpDefinitionLocalizationId) throws NoSuchCPDefinitionLocalizationException
NoSuchCPDefinitionLocalizationException
if it could not be found.cpDefinitionLocalizationId
- the primary key of the cp definition localizationNoSuchCPDefinitionLocalizationException
- if a cp definition localization with the primary key could not be foundpublic static CPDefinitionLocalization fetchByPrimaryKey(long cpDefinitionLocalizationId)
null
if it could not be found.cpDefinitionLocalizationId
- the primary key of the cp definition localizationnull
if a cp definition localization with the primary key could not be foundpublic static java.util.List<CPDefinitionLocalization> findAll()
public static java.util.List<CPDefinitionLocalization> 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 CPDefinitionLocalizationModelImpl
.
start
- the lower bound of the range of cp definition localizationsend
- the upper bound of the range of cp definition localizations (not inclusive)public static java.util.List<CPDefinitionLocalization> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> 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 CPDefinitionLocalizationModelImpl
.
start
- the lower bound of the range of cp definition localizationsend
- the upper bound of the range of cp definition localizations (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CPDefinitionLocalization> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinitionLocalization> 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 CPDefinitionLocalizationModelImpl
.
start
- the lower bound of the range of cp definition localizationsend
- the upper bound of the range of cp definition 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 CPDefinitionLocalizationPersistence getPersistence()