Class CPInstanceLocalServiceUtil
com.liferay.commerce.product.service.impl.CPInstanceLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CPInstance
addCPInstance
(CPInstance cpInstance) Adds the cp instance to the database.static CPInstance
addCPInstance
(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, Map<Long, List<Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) static CPInstance
addOrUpdateCPInstance
(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, String json, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) static List<CPInstance>
buildCPInstances
(long cpDefinitionId, com.liferay.portal.kernel.service.ServiceContext serviceContext) static void
checkCPInstances
(long cpDefinitionId) static void
checkCPInstancesByDisplayDate
(long cpDefinitionId) static CPInstance
createCPInstance
(long CPInstanceId) Creates a new cp instance with the primary key.static com.liferay.portal.kernel.model.PersistedModel
createPersistedModel
(Serializable primaryKeyObj) static CPInstance
deleteCPInstance
(long CPInstanceId) Deletes the cp instance with the primary key from the database.static CPInstance
deleteCPInstance
(CPInstance cpInstance) Deletes the cp instance from the database.static CPInstance
deleteCPInstance
(CPInstance cpInstance, boolean makeCopy) static void
deleteCPInstances
(long cpDefinitionId) static com.liferay.portal.kernel.model.PersistedModel
deletePersistedModel
(com.liferay.portal.kernel.model.PersistedModel persistedModel) static <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static com.liferay.portal.kernel.dao.orm.DynamicQuery
static <T> List<T>
dynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <T> List<T>
dynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.static <T> List<T>
dynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.static long
dynamicQueryCount
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static long
dynamicQueryCount
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection) Returns the number of rows matching the dynamic query.static CPInstance
fetchCPInstance
(long CPInstanceId) static CPInstance
fetchCPInstance
(long cProductId, String cpInstanceUuid) static CPInstance
fetchCPInstanceByExternalReferenceCode
(String externalReferenceCode, long companyId) static CPInstance
fetchCPInstanceByUuidAndGroupId
(String uuid, long groupId) Returns the cp instance matching the UUID and group.static CPInstance
fetchCProductInstance
(long cProductId, String cpInstanceUuid) static CPInstance
fetchDefaultCPInstance
(long cpDefinitionId) static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
static List<CPInstance>
getCPDefinitionApprovedCPInstances
(long cpDefinitionId) static List<CPInstance>
getCPDefinitionInstances
(long cpDefinitionId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) static int
getCPDefinitionInstancesCount
(long cpDefinitionId, int status) static CPInstance
getCPInstance
(long CPInstanceId) Returns the cp instance with the primary key.static CPInstance
getCPInstance
(long cpDefinitionId, String sku) static CPInstance
getCPInstanceByExternalReferenceCode
(String externalReferenceCode, long companyId) static CPInstance
getCPInstanceByUuidAndGroupId
(String uuid, long groupId) Returns the cp instance matching the UUID and group.static List<CPInstance>
getCPInstances
(int start, int end) Returns a range of all the cp instances.static List<CPInstance>
getCPInstances
(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) static List<CPInstance>
getCPInstances
(long companyId, String sku) static List<CPInstance>
getCPInstances
(String replacementCPInstanceUuid, long replacementCProductId, int status) static List<CPInstance>
getCPInstancesByUuidAndCompanyId
(String uuid, long companyId) Returns all the cp instances matching the UUID and company.static List<CPInstance>
getCPInstancesByUuidAndCompanyId
(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) Returns a range of cp instances matching the UUID and company.static int
Returns the number of cp instances.static int
getCPInstancesCount
(long groupId, int status) static int
getCPInstancesCount
(String cpInstanceUuid) static CPInstance
getCProductInstance
(long cProductId, String cpInstanceUuid) static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
getExportActionableDynamicQuery
(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
static String
Returns the OSGi service identifier.static com.liferay.portal.kernel.model.PersistedModel
getPersistedModel
(Serializable primaryKeyObj) static CPInstanceLocalService
static String[]
getSKUs
(long cpDefinitionId) static void
inactivateCPDefinitionOptionRelCPInstances
(long userId, long cpDefinitionId, long cpDefinitionOptionRelId) static void
inactivateCPDefinitionOptionValueRelCPInstances
(long userId, long cpDefinitionId, long cpDefinitionOptionValueRelId) static void
inactivateIncompatibleCPInstances
(long userId, long cpDefinitionId) static com.liferay.portal.kernel.search.Hits
search
(com.liferay.portal.kernel.search.SearchContext searchContext) static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
searchCPDefinitionInstances
(long companyId, long cpDefinitionId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
searchCPDefinitionInstances
(long companyId, long cpDefinitionId, String keywords, int status, com.liferay.portal.kernel.search.Sort sort) static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
searchCPInstances
(long companyId, long[] groupIds, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
searchCPInstances
(long companyId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
searchCPInstances
(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>
searchCPInstances
(com.liferay.portal.kernel.search.SearchContext searchContext) static int
searchCPInstancesCount
(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status) static CPInstance
updateCPInstance
(CPInstance cpInstance) Updates the cp instance in the database or adds it if it does not yet exist.static CPInstance
updateCPInstance
(String externalReferenceCode, long cpInstanceId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) static CPInstance
updateExternalReferenceCode
(long cpInstanceId, String externalReferenceCode) static CPInstance
updatePricingInfo
(long cpInstanceId, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, com.liferay.portal.kernel.service.ServiceContext serviceContext) static CPInstance
updateShippingInfo
(long cpInstanceId, double width, double height, double depth, double weight, com.liferay.portal.kernel.service.ServiceContext serviceContext) static CPInstance
updateStatus
(long userId, long cpInstanceId, int status) static CPInstance
updateSubscriptionInfo
(long cpInstanceId, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles)
-
Constructor Details
-
CPInstanceLocalServiceUtil
public CPInstanceLocalServiceUtil()
-
-
Method Details
-
addCPInstance
Adds the cp instance to the database. Also notifies the appropriate model listeners.Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
cpInstance
- the cp instance- Returns:
- the cp instance that was added
-
addCPInstance
public static CPInstance addCPInstance(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, Map<Long, List<Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addOrUpdateCPInstance
public static CPInstance addOrUpdateCPInstance(String externalReferenceCode, long cpDefinitionId, long groupId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, String json, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
buildCPInstances
public static List<CPInstance> buildCPInstances(long cpDefinitionId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkCPInstances
public static void checkCPInstances(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkCPInstancesByDisplayDate
public static void checkCPInstancesByDisplayDate(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
createCPInstance
Creates a new cp instance with the primary key. Does not add the cp instance to the database.- Parameters:
CPInstanceId
- the primary key for the new cp instance- Returns:
- the new cp instance
-
createPersistedModel
public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteCPInstance
public static CPInstance deleteCPInstance(CPInstance cpInstance) throws com.liferay.portal.kernel.exception.PortalException Deletes the cp instance from the database. Also notifies the appropriate model listeners.Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
cpInstance
- the cp instance- Returns:
- the cp instance that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteCPInstance
public static CPInstance deleteCPInstance(CPInstance cpInstance, boolean makeCopy) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteCPInstance
public static CPInstance deleteCPInstance(long CPInstanceId) throws com.liferay.portal.kernel.exception.PortalException Deletes the cp instance with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
CPInstanceId
- the primary key of the cp instance- Returns:
- the cp instance that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a cp instance with the primary key could not be found
-
deleteCPInstances
public static void deleteCPInstances(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deletePersistedModel
public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() -
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.commerce.product.model.impl.CPInstanceModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.commerce.product.model.impl.CPInstanceModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchCPInstance
-
fetchCPInstance
-
fetchCPInstanceByExternalReferenceCode
public static CPInstance fetchCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId) -
fetchCPInstanceByUuidAndGroupId
Returns the cp instance matching the UUID and group.- Parameters:
uuid
- the cp instance's UUIDgroupId
- the primary key of the group- Returns:
- the matching cp instance, or
null
if a matching cp instance could not be found
-
fetchCProductInstance
-
fetchDefaultCPInstance
-
getActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() -
getCPDefinitionApprovedCPInstances
-
getCPDefinitionInstances
public static List<CPInstance> getCPDefinitionInstances(long cpDefinitionId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) -
getCPDefinitionInstancesCount
public static int getCPDefinitionInstancesCount(long cpDefinitionId, int status) -
getCPInstance
public static CPInstance getCPInstance(long CPInstanceId) throws com.liferay.portal.kernel.exception.PortalException Returns the cp instance with the primary key.- Parameters:
CPInstanceId
- the primary key of the cp instance- Returns:
- the cp instance
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a cp instance with the primary key could not be found
-
getCPInstance
public static CPInstance getCPInstance(long cpDefinitionId, String sku) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCPInstanceByExternalReferenceCode
public static CPInstance getCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCPInstanceByUuidAndGroupId
public static CPInstance getCPInstanceByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException Returns the cp instance matching the UUID and group.- Parameters:
uuid
- the cp instance's UUIDgroupId
- the primary key of the group- Returns:
- the matching cp instance
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a matching cp instance could not be found
-
getCPInstances
Returns a range of all the cp instances.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
tocom.liferay.portal.kernel.dao.orm.QueryUtil#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 fromcom.liferay.commerce.product.model.impl.CPInstanceModelImpl
.- Parameters:
start
- the lower bound of the range of cp instancesend
- the upper bound of the range of cp instances (not inclusive)- Returns:
- the range of cp instances
-
getCPInstances
public static List<CPInstance> getCPInstances(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCPInstances
-
getCPInstances
public static List<CPInstance> getCPInstances(String replacementCPInstanceUuid, long replacementCProductId, int status) -
getCPInstancesByUuidAndCompanyId
Returns all the cp instances matching the UUID and company.- Parameters:
uuid
- the UUID of the cp instancescompanyId
- the primary key of the company- Returns:
- the matching cp instances, or an empty list if no matches were found
-
getCPInstancesByUuidAndCompanyId
public static List<CPInstance> getCPInstancesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) Returns a range of cp instances matching the UUID and company.- Parameters:
uuid
- the UUID of the cp instancescompanyId
- the primary key of the companystart
- the lower bound of the range of cp instancesend
- the upper bound of the range of cp instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the range of matching cp instances, or an empty list if no matches were found
-
getCPInstancesCount
public static int getCPInstancesCount()Returns the number of cp instances.- Returns:
- the number of cp instances
-
getCPInstancesCount
public static int getCPInstancesCount(long groupId, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCPInstancesCount
-
getCProductInstance
public static CPInstance getCProductInstance(long cProductId, String cpInstanceUuid) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getExportActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSKUs
-
inactivateCPDefinitionOptionRelCPInstances
public static void inactivateCPDefinitionOptionRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionRelId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
inactivateCPDefinitionOptionValueRelCPInstances
public static void inactivateCPDefinitionOptionValueRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionValueRelId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
inactivateIncompatibleCPInstances
public static void inactivateIncompatibleCPInstances(long userId, long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
public static com.liferay.portal.kernel.search.Hits search(com.liferay.portal.kernel.search.SearchContext searchContext) -
searchCPDefinitionInstances
public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPDefinitionInstances(long companyId, long cpDefinitionId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCPDefinitionInstances
public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPDefinitionInstances(long companyId, long cpDefinitionId, String keywords, int status, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCPInstances
public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(long companyId, long[] groupIds, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCPInstances
public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(long companyId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCPInstances
public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCPInstances
public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance> searchCPInstances(com.liferay.portal.kernel.search.SearchContext searchContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCPInstancesCount
public static int searchCPInstancesCount(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateCPInstance
Updates the cp instance in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect CPInstanceLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
cpInstance
- the cp instance- Returns:
- the cp instance that was updated
-
updateCPInstance
public static CPInstance updateCPInstance(String externalReferenceCode, long cpInstanceId, String sku, String gtin, String manufacturerPartNumber, boolean purchasable, double width, double height, double depth, double weight, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, String unspsc, boolean discontinued, String replacementCPInstanceUuid, long replacementCProductId, int discontinuedDateMonth, int discontinuedDateDay, int discontinuedDateYear, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateExternalReferenceCode
public static CPInstance updateExternalReferenceCode(long cpInstanceId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePricingInfo
public static CPInstance updatePricingInfo(long cpInstanceId, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateShippingInfo
public static CPInstance updateShippingInfo(long cpInstanceId, double width, double height, double depth, double weight, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateStatus
public static CPInstance updateStatus(long userId, long cpInstanceId, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateSubscriptionInfo
public static CPInstance updateSubscriptionInfo(long cpInstanceId, boolean overrideSubscriptionInfo, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getService
-