Class DefaultTmaSubscribedProductService
java.lang.Object
de.hybris.platform.b2ctelcoservices.services.impl.DefaultTmaSubscribedProductService
- All Implemented Interfaces:
TmaSubscribedProductService
public class DefaultTmaSubscribedProductService
extends Object
implements TmaSubscribedProductService
Default implementation of the
TmaSubscribedProductService.- Since:
- 6.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNewSubscribedProduct(Date startDate, String billingSystemId, String subscriptionStatus) Creates a newTmaSubscribedProductModel.createSubscribedProduct(TmaSubscribedProductModel subscribedProductModel) Enhances the provided by setting it a generated id and persists it.voiddeleteSubscribedProduct(String billingSystemId, String billingSubscriptionId) Deletes the subscribed product for given billingSystemId and billingSubscriptionId.findSubscribedProduct(String billingSystemId, String billingSubscriptionId) Retrieves theTmaSubscribedProductModelfor given billingSystemId and billingSubscriptionId.findSubscribedProductById(String subscribedProductId) Retrieves theTmaSubscribedProductModelfor the given subscribedProductId.findSubscriptionsForPaymentMethod(String paymentMethodId) RetrieveListofTmaSubscribedProductModelidentified by given paymentMethodIdprotected de.hybris.platform.servicelayer.model.ModelServicegetSubscriptionServiceEndDate(String frequencyCode, Integer duration, Date startDate) Get the Subscription Product End date .protected de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<TmaNormalizedTermOfServiceFrequencyModel>protected de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGeneratorprotected TmaSubscribedProductDaoprotected de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGeneratorvoidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) voidsetTermsOfServiceDao(de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<TmaNormalizedTermOfServiceFrequencyModel> termsOfServiceDao) voidsetTmaBillingSubscriptionIdGenerator(de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator tmaBillingSubscriptionIdGenerator) voidsetTmaSubscribedProductDao(TmaSubscribedProductDao tmaSubscribedProductDao) voidsetTmaSubscribedProductIdGenerator(de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator tmaSubscribedProductIdGenerator)
-
Constructor Details
-
DefaultTmaSubscribedProductService
public DefaultTmaSubscribedProductService()
-
-
Method Details
-
createSubscribedProduct
public TmaSubscribedProductModel createSubscribedProduct(TmaSubscribedProductModel subscribedProductModel) Description copied from interface:TmaSubscribedProductServiceEnhances the provided by setting it a generated id and persists it.- Specified by:
createSubscribedProductin interfaceTmaSubscribedProductService- Parameters:
subscribedProductModel- source which needs to be persisted- Returns:
- persisted source, with generated id
-
createNewSubscribedProduct
public TmaSubscribedProductModel createNewSubscribedProduct(Date startDate, String billingSystemId, String subscriptionStatus) Description copied from interface:TmaSubscribedProductServiceCreates a newTmaSubscribedProductModel.- Specified by:
createNewSubscribedProductin interfaceTmaSubscribedProductService- Parameters:
startDate- subscription start datebillingSystemId- billing system identifiersubscriptionStatus- subscription status- Returns:
- the new created subscribed product
-
findSubscribedProduct
public TmaSubscribedProductModel findSubscribedProduct(String billingSystemId, String billingSubscriptionId) Description copied from interface:TmaSubscribedProductServiceRetrieves theTmaSubscribedProductModelfor given billingSystemId and billingSubscriptionId.- Specified by:
findSubscribedProductin interfaceTmaSubscribedProductService- Parameters:
billingSystemId- the id of the billing systembillingSubscriptionId- the id of the billing subscription- Returns:
TmaSubscribedProductModelobject identified by given billingSystemId and billingSubscriptionId
-
findSubscribedProductById
Description copied from interface:TmaSubscribedProductServiceRetrieves theTmaSubscribedProductModelfor the given subscribedProductId.- Specified by:
findSubscribedProductByIdin interfaceTmaSubscribedProductService- Parameters:
subscribedProductId- the id of the subscribed product- Returns:
TmaSubscribedProductModelobject identified by given subscribedProductId
-
findSubscriptionsForPaymentMethod
Description copied from interface:TmaSubscribedProductServiceRetrieveListofTmaSubscribedProductModelidentified by given paymentMethodId- Specified by:
findSubscriptionsForPaymentMethodin interfaceTmaSubscribedProductService- Parameters:
paymentMethodId- The payment method ID for subscribed product- Returns:
ListofTmaSubscribedProductModelwhich has paymentMethodId
-
deleteSubscribedProduct
Description copied from interface:TmaSubscribedProductServiceDeletes the subscribed product for given billingSystemId and billingSubscriptionId.- Specified by:
deleteSubscribedProductin interfaceTmaSubscribedProductService- Parameters:
billingSystemId- the id of the billing systembillingSubscriptionId- the id of the billing subscription
-
getSubscriptionServiceEndDate
@Nonnull public Date getSubscriptionServiceEndDate(String frequencyCode, Integer duration, Date startDate) Description copied from interface:TmaSubscribedProductServiceGet the Subscription Product End date .- Specified by:
getSubscriptionServiceEndDatein interfaceTmaSubscribedProductService- Parameters:
frequencyCode- Code forTermOfServiceFrequencyduration- Duration of Contract of the ServicestartDate- Start date of Contract of the Service- Returns:
- the End Date of the Service
-
setTmaSubscribedProductDao
-
getTmaSubscribedProductDao
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) -
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService() -
setTmaSubscribedProductIdGenerator
public void setTmaSubscribedProductIdGenerator(de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator tmaSubscribedProductIdGenerator) -
getTmaSubscribedProductIdGenerator
protected de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator getTmaSubscribedProductIdGenerator() -
getTmaBillingSubscriptionIdGenerator
protected de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator getTmaBillingSubscriptionIdGenerator() -
setTmaBillingSubscriptionIdGenerator
public void setTmaBillingSubscriptionIdGenerator(de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator tmaBillingSubscriptionIdGenerator) -
getTermsOfServiceDao
protected de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<TmaNormalizedTermOfServiceFrequencyModel> getTermsOfServiceDao() -
setTermsOfServiceDao
public void setTermsOfServiceDao(de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<TmaNormalizedTermOfServiceFrequencyModel> termsOfServiceDao)
-