Interface CPInstanceLocalService
- All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService,com.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>,com.liferay.portal.kernel.service.PersistedModelLocalService
- All Known Implementing Classes:
CPInstanceLocalServiceWrapper
- See Also:
- Generated:
-
Method Summary
Modifier and TypeMethodDescriptionaddCPInstance(CPInstance cpInstance) Adds the cp instance to the database.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) 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) buildCPInstances(long cpDefinitionId, com.liferay.portal.kernel.service.ServiceContext serviceContext) voidcheckCPInstances(long cpDefinitionId) voidcheckCPInstancesByDisplayDate(long cpDefinitionId) createCPInstance(long CPInstanceId) Creates a new cp instance with the primary key.com.liferay.portal.kernel.model.PersistedModelcreatePersistedModel(Serializable primaryKeyObj) deleteCPInstance(long CPInstanceId) Deletes the cp instance with the primary key from the database.deleteCPInstance(CPInstance cpInstance) Deletes the cp instance from the database.deleteCPInstance(CPInstance cpInstance, boolean makeCopy) voiddeleteCPInstances(long cpDefinitionId) com.liferay.portal.kernel.model.PersistedModeldeletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) com.liferay.portal.kernel.dao.orm.DynamicQuery<T> List<T>dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<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.<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.longdynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.longdynamicQueryCount(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.fetchCPInstance(long CPInstanceId) fetchCPInstance(long cProductId, String cpInstanceUuid) fetchCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId) fetchCPInstanceByUuidAndGroupId(String uuid, long groupId) Returns the cp instance matching the UUID and group.fetchCProductInstance(long cProductId, String cpInstanceUuid) fetchDefaultCPInstance(long cpDefinitionId) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuerygetCPDefinitionApprovedCPInstances(long cpDefinitionId) getCPDefinitionInstances(long cpDefinitionId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) intgetCPDefinitionInstancesCount(long cpDefinitionId, int status) getCPInstance(long CPInstanceId) Returns the cp instance with the primary key.getCPInstance(long cpDefinitionId, String sku) getCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId) getCPInstanceByUuidAndGroupId(String uuid, long groupId) Returns the cp instance matching the UUID and group.getCPInstances(int start, int end) Returns a range of all the cp instances.getCPInstances(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) getCPInstances(long companyId, String sku) getCPInstances(String replacementCPInstanceUuid, long replacementCProductId, int status) getCPInstancesByUuidAndCompanyId(String uuid, long companyId) Returns all the cp instances matching the UUID and company.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.intReturns the number of cp instances.intgetCPInstancesCount(long groupId, int status) intgetCPInstancesCount(String cpInstanceUuid) getCProductInstance(long cProductId, String cpInstanceUuid) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance>com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuerygetExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQueryReturns the OSGi service identifier.com.liferay.portal.kernel.model.PersistedModelgetPersistedModel(Serializable primaryKeyObj) String[]getSKUs(long cpDefinitionId) voidinactivateCPDefinitionOptionRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionRelId) voidinactivateCPDefinitionOptionValueRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionValueRelId) voidinactivateIncompatibleCPInstances(long userId, long cpDefinitionId) com.liferay.portal.kernel.search.Hitssearch(com.liferay.portal.kernel.search.SearchContext searchContext) 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) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>searchCPDefinitionInstances(long companyId, long cpDefinitionId, String keywords, int status, com.liferay.portal.kernel.search.Sort sort) 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) 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) 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) com.liferay.portal.kernel.search.BaseModelSearchResult<CPInstance>searchCPInstances(com.liferay.portal.kernel.search.SearchContext searchContext) intsearchCPInstancesCount(long companyId, String cpInstanceUuid, long cProductId, String keywords, int status) updateCPInstance(CPInstance cpInstance) Updates the cp instance in the database or adds it if it does not yet exist.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) updateExternalReferenceCode(long cpInstanceId, String externalReferenceCode) updatePricingInfo(long cpInstanceId, BigDecimal price, BigDecimal promoPrice, BigDecimal cost, com.liferay.portal.kernel.service.ServiceContext serviceContext) updateShippingInfo(long cpInstanceId, double width, double height, double depth, double weight, com.liferay.portal.kernel.service.ServiceContext serviceContext) updateStatus(long userId, long cpInstanceId, int status) 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) <R,E extends Throwable>
RupdateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
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
@Indexable(type=REINDEX) 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
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
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
void checkCPInstances(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkCPInstancesByDisplayDate
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
com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
createPersistedModelin interfacecom.liferay.portal.kernel.service.PersistedModelLocalService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteCPInstance
@Indexable(type=DELETE) @SystemEvent(type=1) 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
@Indexable(type=DELETE) @SystemEvent(type=1) CPInstance deleteCPInstance(CPInstance cpInstance, boolean makeCopy) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteCPInstance
@Indexable(type=DELETE) 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
void deleteCPInstances(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deletePersistedModel
com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
deletePersistedModelin interfacecom.liferay.portal.kernel.service.PersistedModelLocalService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryin interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCountin interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() -
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris 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
@Transactional(propagation=SUPPORTS, readOnly=true) <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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCPInstance(long cProductId, String cpInstanceUuid) -
fetchCPInstanceByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId) -
fetchCPInstanceByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCPInstanceByUuidAndGroupId(String uuid, long groupId) 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
nullif a matching cp instance could not be found
-
fetchCProductInstance
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchCProductInstance(long cProductId, String cpInstanceUuid) -
fetchDefaultCPInstance
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance fetchDefaultCPInstance(long cpDefinitionId) -
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() -
getCPDefinitionApprovedCPInstances
@Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPDefinitionApprovedCPInstances(long cpDefinitionId) -
getCPDefinitionInstances
@Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPDefinitionInstances(long cpDefinitionId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPInstance> orderByComparator) -
getCPDefinitionInstancesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getCPDefinitionInstancesCount(long cpDefinitionId, int status) -
getCPInstance
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCPInstance(long cpDefinitionId, String sku) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCPInstanceByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCPInstanceByExternalReferenceCode(String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCPInstanceByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstances(int start, int end) Returns a range of all the cp instances.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstances(long companyId, String sku) -
getCPInstances
@Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstances(String replacementCPInstanceUuid, long replacementCProductId, int status) -
getCPInstancesByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<CPInstance> getCPInstancesByUuidAndCompanyId(String uuid, long companyId) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) int getCPInstancesCount()Returns the number of cp instances.- Returns:
- the number of cp instances
-
getCPInstancesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getCPInstancesCount(long groupId, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getCPInstancesCount
-
getCProductInstance
@Transactional(propagation=SUPPORTS, readOnly=true) CPInstance getCProductInstance(long cProductId, String cpInstanceUuid) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) -
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Specified by:
getPersistedModelin interfacecom.liferay.portal.kernel.service.PersistedModelLocalService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSKUs
-
inactivateCPDefinitionOptionRelCPInstances
void inactivateCPDefinitionOptionRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionRelId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
inactivateCPDefinitionOptionValueRelCPInstances
void inactivateCPDefinitionOptionValueRelCPInstances(long userId, long cpDefinitionId, long cpDefinitionOptionValueRelId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
inactivateIncompatibleCPInstances
void inactivateIncompatibleCPInstances(long userId, long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
@Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.search.Hits search(com.liferay.portal.kernel.search.SearchContext searchContext) -
searchCPDefinitionInstances
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Indexable(type=REINDEX) 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
CPInstance updateExternalReferenceCode(long cpInstanceId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePricingInfo
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
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
@Indexable(type=REINDEX) CPInstance updateStatus(long userId, long cpInstanceId, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateSubscriptionInfo
@Indexable(type=REINDEX) 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
-
getCTPersistence
@Transactional(enabled=false) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance> getCTPersistence()- Specified by:
getCTPersistencein interfacecom.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>
-
getModelClass
- Specified by:
getModelClassin interfacecom.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<CPInstance>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunctionin interfacecom.liferay.portal.kernel.service.change.tracking.CTService<CPInstance>- Throws:
E extends Throwable
-