Class DefaultBillingEventItemService<P extends BillingEventItem,Q extends BillingEventItemWithTaxDetails>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.billing.service.impl.DefaultBillingEventItemService<P,Q>
- All Implemented Interfaces:
BillingEventItemService<P,,Q> com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
public class DefaultBillingEventItemService<P extends BillingEventItem,Q extends BillingEventItemWithTaxDetails>
extends com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
implements BillingEventItemService<P,Q>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BillingTaxDetailService<BillingTaxDetail>protected BillingPropertiesprotected com.broadleafcommerce.common.extension.TypeFactory -
Constructor Summary
ConstructorsConstructorDescriptionDefaultBillingEventItemService(BillingEventItemRepository<com.broadleafcommerce.data.tracking.core.Trackable> repo, com.broadleafcommerce.data.tracking.core.service.CrudEntityHelper helper) -
Method Summary
Modifier and TypeMethodDescriptioncalculatePreTaxUnitPrice(BillingEventItem item, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Calculates the unit cost of an item before tax (includes item adjustment discounts).createBillingEventItem(Q billingEventItemWithTransactionRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Create the newBillingEventItemreadAllByContextId(Iterable<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) readByBillingEventId(String billingEventId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all billing event item by the associated event idreadWithTaxDetailsByBillingEventId(String billingEventId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) updateBillingItemWithTaxDetails(Q billingEventItemWithTaxDetails, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService
convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getRepository, getSortPositionStrategy, readAll, readAll, readAll, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSortMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.billing.service.BillingEventItemService
calculatePreTaxUnitPrice, createBillingEventItem, findAllBillingItemsWithTaxDetailsByEventId, findAllByBillingEventId, findById, findByIds, updateBillingEventItem, updateBillingItemWithTaxDetailsMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
Field Details
-
billingTaxDetailService
-
itemAdjustmentService
@Autowired protected BillingEventItemAdjustmentService<BillingEventItemAdjustment> itemAdjustmentService -
typeFactory
@Autowired protected com.broadleafcommerce.common.extension.TypeFactory typeFactory -
properties
-
-
Constructor Details
-
DefaultBillingEventItemService
public DefaultBillingEventItemService(BillingEventItemRepository<com.broadleafcommerce.data.tracking.core.Trackable> repo, com.broadleafcommerce.data.tracking.core.service.CrudEntityHelper helper)
-
-
Method Details
-
readAllByContextId
public Iterable<P> readAllByContextId(Iterable<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
readAllByContextIdin interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends BillingEventItem>- Overrides:
readAllByContextIdin classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends BillingEventItem>
-
createBillingEventItem
@Transactional public P createBillingEventItem(Q billingEventItemWithTransactionRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:BillingEventItemServiceCreate the newBillingEventItem- Specified by:
createBillingEventItemin interfaceBillingEventItemService<P extends BillingEventItem,Q extends BillingEventItemWithTaxDetails>
-
readByBillingEventId
public List<P> readByBillingEventId(String billingEventId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:BillingEventItemServiceFinds all billing event item by the associated event id- Specified by:
readByBillingEventIdin interfaceBillingEventItemService<P extends BillingEventItem,Q extends BillingEventItemWithTaxDetails>
-
updateBillingItemWithTaxDetails
@Transactional public Q updateBillingItemWithTaxDetails(Q billingEventItemWithTaxDetails, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
updateBillingItemWithTaxDetailsin interfaceBillingEventItemService<P extends BillingEventItem,Q extends BillingEventItemWithTaxDetails>
-
readWithTaxDetailsByBillingEventId
public List<Q> readWithTaxDetailsByBillingEventId(String billingEventId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
readWithTaxDetailsByBillingEventIdin interfaceBillingEventItemService<P extends BillingEventItem,Q extends BillingEventItemWithTaxDetails>
-
calculatePreTaxUnitPrice
public BigDecimal calculatePreTaxUnitPrice(BillingEventItem item, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:BillingEventItemServiceCalculates the unit cost of an item before tax (includes item adjustment discounts).- Specified by:
calculatePreTaxUnitPricein interfaceBillingEventItemService<P extends BillingEventItem,Q extends BillingEventItemWithTaxDetails>
-