public class CProductUtil
extends java.lang.Object
com.liferay.commerce.product.service.persistence.impl.CProductPersistenceImpl
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
CProductPersistence
Constructor and Description |
---|
CProductUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CProduct cProduct)
Caches the c product in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CProduct> cProducts)
Caches the c products in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CProduct cProduct) |
static int |
countAll()
Returns the number of c products.
|
static int |
countByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Returns the number of c products where companyId = ? and externalReferenceCode = ?.
|
static int |
countByGroupId(long groupId)
Returns the number of c products where groupId = ?.
|
static int |
countByUuid_C(java.lang.String uuid,
long companyId)
Returns the number of c products where uuid = ? and companyId = ?.
|
static int |
countByUUID_G(java.lang.String uuid,
long groupId)
Returns the number of c products where uuid = ? and groupId = ?.
|
static int |
countByUuid(java.lang.String uuid)
Returns the number of c products where uuid = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CProduct |
create(long CProductId)
Creates a new c product with the primary key.
|
static CProduct |
fetchByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Returns the c product where companyId = ? and externalReferenceCode = ? or returns
null if it could not be found. |
static CProduct |
fetchByC_ERC(long companyId,
java.lang.String externalReferenceCode,
boolean useFinderCache)
Returns the c product where companyId = ? and externalReferenceCode = ? or returns
null if it could not be found, optionally using the finder cache. |
static CProduct |
fetchByGroupId_First(long groupId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the first c product in the ordered set where groupId = ?.
|
static CProduct |
fetchByGroupId_Last(long groupId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the last c product in the ordered set where groupId = ?.
|
static CProduct |
fetchByPrimaryKey(long CProductId)
Returns the c product with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CProduct> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static CProduct |
fetchByUuid_C_First(java.lang.String uuid,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the first c product in the ordered set where uuid = ? and companyId = ?.
|
static CProduct |
fetchByUuid_C_Last(java.lang.String uuid,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the last c product in the ordered set where uuid = ? and companyId = ?.
|
static CProduct |
fetchByUuid_First(java.lang.String uuid,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the first c product in the ordered set where uuid = ?.
|
static CProduct |
fetchByUUID_G(java.lang.String uuid,
long groupId)
Returns the c product where uuid = ? and groupId = ? or returns
null if it could not be found. |
static CProduct |
fetchByUUID_G(java.lang.String uuid,
long groupId,
boolean useFinderCache)
Returns the c product where uuid = ? and groupId = ? or returns
null if it could not be found, optionally using the finder cache. |
static CProduct |
fetchByUuid_Last(java.lang.String uuid,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the last c product in the ordered set where uuid = ?.
|
static java.util.List<CProduct> |
findAll()
Returns all the c products.
|
static java.util.List<CProduct> |
findAll(int start,
int end)
Returns a range of all the c products.
|
static java.util.List<CProduct> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns an ordered range of all the c products.
|
static java.util.List<CProduct> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the c products.
|
static CProduct |
findByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Returns the c product where companyId = ? and externalReferenceCode = ? or throws a
NoSuchCProductException if it could not be found. |
static CProduct |
findByGroupId_First(long groupId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the first c product in the ordered set where groupId = ?.
|
static CProduct |
findByGroupId_Last(long groupId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the last c product in the ordered set where groupId = ?.
|
static CProduct[] |
findByGroupId_PrevAndNext(long CProductId,
long groupId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the c products before and after the current c product in the ordered set where groupId = ?.
|
static java.util.List<CProduct> |
findByGroupId(long groupId)
Returns all the c products where groupId = ?.
|
static java.util.List<CProduct> |
findByGroupId(long groupId,
int start,
int end)
Returns a range of all the c products where groupId = ?.
|
static java.util.List<CProduct> |
findByGroupId(long groupId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns an ordered range of all the c products where groupId = ?.
|
static java.util.List<CProduct> |
findByGroupId(long groupId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the c products where groupId = ?.
|
static CProduct |
findByPrimaryKey(long CProductId)
Returns the c product with the primary key or throws a
NoSuchCProductException if it could not be found. |
static CProduct |
findByUuid_C_First(java.lang.String uuid,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the first c product in the ordered set where uuid = ? and companyId = ?.
|
static CProduct |
findByUuid_C_Last(java.lang.String uuid,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the last c product in the ordered set where uuid = ? and companyId = ?.
|
static CProduct[] |
findByUuid_C_PrevAndNext(long CProductId,
java.lang.String uuid,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the c products before and after the current c product in the ordered set where uuid = ? and companyId = ?.
|
static java.util.List<CProduct> |
findByUuid_C(java.lang.String uuid,
long companyId)
Returns all the c products where uuid = ? and companyId = ?.
|
static java.util.List<CProduct> |
findByUuid_C(java.lang.String uuid,
long companyId,
int start,
int end)
Returns a range of all the c products where uuid = ? and companyId = ?.
|
static java.util.List<CProduct> |
findByUuid_C(java.lang.String uuid,
long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns an ordered range of all the c products where uuid = ? and companyId = ?.
|
static java.util.List<CProduct> |
findByUuid_C(java.lang.String uuid,
long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the c products where uuid = ? and companyId = ?.
|
static CProduct |
findByUuid_First(java.lang.String uuid,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the first c product in the ordered set where uuid = ?.
|
static CProduct |
findByUUID_G(java.lang.String uuid,
long groupId)
Returns the c product where uuid = ? and groupId = ? or throws a
NoSuchCProductException if it could not be found. |
static CProduct |
findByUuid_Last(java.lang.String uuid,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the last c product in the ordered set where uuid = ?.
|
static CProduct[] |
findByUuid_PrevAndNext(long CProductId,
java.lang.String uuid,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns the c products before and after the current c product in the ordered set where uuid = ?.
|
static java.util.List<CProduct> |
findByUuid(java.lang.String uuid)
Returns all the c products where uuid = ?.
|
static java.util.List<CProduct> |
findByUuid(java.lang.String uuid,
int start,
int end)
Returns a range of all the c products where uuid = ?.
|
static java.util.List<CProduct> |
findByUuid(java.lang.String uuid,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
Returns an ordered range of all the c products where uuid = ?.
|
static java.util.List<CProduct> |
findByUuid(java.lang.String uuid,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the c products where uuid = ?.
|
static java.util.List<CProduct> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CProduct> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CProduct> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) |
static CProductPersistence |
getPersistence() |
static CProduct |
remove(long CProductId)
Removes the c product with the primary key from the database.
|
static void |
removeAll()
Removes all the c products from the database.
|
static CProduct |
removeByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Removes the c product where companyId = ? and externalReferenceCode = ? from the database.
|
static void |
removeByGroupId(long groupId)
Removes all the c products where groupId = ? from the database.
|
static void |
removeByUuid_C(java.lang.String uuid,
long companyId)
Removes all the c products where uuid = ? and companyId = ? from the database.
|
static CProduct |
removeByUUID_G(java.lang.String uuid,
long groupId)
Removes the c product where uuid = ? and groupId = ? from the database.
|
static void |
removeByUuid(java.lang.String uuid)
Removes all the c products where uuid = ? from the database.
|
static CProduct |
update(CProduct cProduct) |
static CProduct |
update(CProduct cProduct,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CProduct |
updateImpl(CProduct cProduct) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CProduct cProduct)
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,CProduct> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CProduct> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<CProduct> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<CProduct> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static CProduct update(CProduct cProduct)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static CProduct update(CProduct cProduct, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<CProduct> findByUuid(java.lang.String uuid)
uuid
- the uuidpublic static java.util.List<CProduct> findByUuid(java.lang.String uuid, 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 CProductModelImpl
.
uuid
- the uuidstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)public static java.util.List<CProduct> findByUuid(java.lang.String uuid, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
uuid
- the uuidstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CProduct> findByUuid(java.lang.String uuid, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
uuid
- the uuidstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static CProduct findByUuid_First(java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
uuid
- the uuidorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByUuid_First(java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
uuid
- the uuidorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching c product could not be foundpublic static CProduct findByUuid_Last(java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
uuid
- the uuidorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByUuid_Last(java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
uuid
- the uuidorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching c product could not be foundpublic static CProduct[] findByUuid_PrevAndNext(long CProductId, java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
CProductId
- the primary key of the current c productuuid
- the uuidorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a c product with the primary key could not be foundpublic static void removeByUuid(java.lang.String uuid)
uuid
- the uuidpublic static int countByUuid(java.lang.String uuid)
uuid
- the uuidpublic static CProduct findByUUID_G(java.lang.String uuid, long groupId) throws NoSuchCProductException
NoSuchCProductException
if it could not be found.uuid
- the uuidgroupId
- the group IDNoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByUUID_G(java.lang.String uuid, long groupId)
null
if it could not be found. Uses the finder cache.uuid
- the uuidgroupId
- the group IDnull
if a matching c product could not be foundpublic static CProduct fetchByUUID_G(java.lang.String uuid, long groupId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.uuid
- the uuidgroupId
- the group IDuseFinderCache
- whether to use the finder cachenull
if a matching c product could not be foundpublic static CProduct removeByUUID_G(java.lang.String uuid, long groupId) throws NoSuchCProductException
uuid
- the uuidgroupId
- the group IDNoSuchCProductException
public static int countByUUID_G(java.lang.String uuid, long groupId)
uuid
- the uuidgroupId
- the group IDpublic static java.util.List<CProduct> findByUuid_C(java.lang.String uuid, long companyId)
uuid
- the uuidcompanyId
- the company IDpublic static java.util.List<CProduct> findByUuid_C(java.lang.String uuid, long companyId, 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 CProductModelImpl
.
uuid
- the uuidcompanyId
- the company IDstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)public static java.util.List<CProduct> findByUuid_C(java.lang.String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
uuid
- the uuidcompanyId
- the company IDstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CProduct> findByUuid_C(java.lang.String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
uuid
- the uuidcompanyId
- the company IDstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static CProduct findByUuid_C_First(java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
uuid
- the uuidcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByUuid_C_First(java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
uuid
- the uuidcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching c product could not be foundpublic static CProduct findByUuid_C_Last(java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
uuid
- the uuidcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByUuid_C_Last(java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
uuid
- the uuidcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching c product could not be foundpublic static CProduct[] findByUuid_C_PrevAndNext(long CProductId, java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
CProductId
- the primary key of the current c productuuid
- the uuidcompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a c product with the primary key could not be foundpublic static void removeByUuid_C(java.lang.String uuid, long companyId)
uuid
- the uuidcompanyId
- the company IDpublic static int countByUuid_C(java.lang.String uuid, long companyId)
uuid
- the uuidcompanyId
- the company IDpublic static java.util.List<CProduct> findByGroupId(long groupId)
groupId
- the group IDpublic static java.util.List<CProduct> findByGroupId(long groupId, 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 CProductModelImpl
.
groupId
- the group IDstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)public static java.util.List<CProduct> findByGroupId(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
groupId
- the group IDstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CProduct> findByGroupId(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
groupId
- the group IDstart
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static CProduct findByGroupId_First(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByGroupId_First(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching c product could not be foundpublic static CProduct findByGroupId_Last(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByGroupId_Last(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator)
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching c product could not be foundpublic static CProduct[] findByGroupId_PrevAndNext(long CProductId, long groupId, com.liferay.portal.kernel.util.OrderByComparator<CProduct> orderByComparator) throws NoSuchCProductException
CProductId
- the primary key of the current c productgroupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchCProductException
- if a c product with the primary key could not be foundpublic static void removeByGroupId(long groupId)
groupId
- the group IDpublic static int countByGroupId(long groupId)
groupId
- the group IDpublic static CProduct findByC_ERC(long companyId, java.lang.String externalReferenceCode) throws NoSuchCProductException
NoSuchCProductException
if it could not be found.companyId
- the company IDexternalReferenceCode
- the external reference codeNoSuchCProductException
- if a matching c product could not be foundpublic static CProduct fetchByC_ERC(long companyId, java.lang.String externalReferenceCode)
null
if it could not be found. Uses the finder cache.companyId
- the company IDexternalReferenceCode
- the external reference codenull
if a matching c product could not be foundpublic static CProduct fetchByC_ERC(long companyId, java.lang.String externalReferenceCode, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.companyId
- the company IDexternalReferenceCode
- the external reference codeuseFinderCache
- whether to use the finder cachenull
if a matching c product could not be foundpublic static CProduct removeByC_ERC(long companyId, java.lang.String externalReferenceCode) throws NoSuchCProductException
companyId
- the company IDexternalReferenceCode
- the external reference codeNoSuchCProductException
public static int countByC_ERC(long companyId, java.lang.String externalReferenceCode)
companyId
- the company IDexternalReferenceCode
- the external reference codepublic static void cacheResult(CProduct cProduct)
cProduct
- the c productpublic static void cacheResult(java.util.List<CProduct> cProducts)
cProducts
- the c productspublic static CProduct create(long CProductId)
CProductId
- the primary key for the new c productpublic static CProduct remove(long CProductId) throws NoSuchCProductException
CProductId
- the primary key of the c productNoSuchCProductException
- if a c product with the primary key could not be foundpublic static CProduct findByPrimaryKey(long CProductId) throws NoSuchCProductException
NoSuchCProductException
if it could not be found.CProductId
- the primary key of the c productNoSuchCProductException
- if a c product with the primary key could not be foundpublic static CProduct fetchByPrimaryKey(long CProductId)
null
if it could not be found.CProductId
- the primary key of the c productnull
if a c product with the primary key could not be foundpublic static java.util.List<CProduct> findAll()
public static java.util.List<CProduct> 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 CProductModelImpl
.
start
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)public static java.util.List<CProduct> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
start
- the lower bound of the range of c productsend
- the upper bound of the range of c products (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CProduct> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CProduct> 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 CProductModelImpl
.
start
- the lower bound of the range of c productsend
- the upper bound of the range of c products (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 CProductPersistence getPersistence()