Class JpaCustomizedAccountAddressRepository<D extends JpaAccountAddress>
java.lang.Object
com.broadleafcommerce.customer.provider.jpa.repository.JpaCustomizedAccountAddressRepository<D>
- All Implemented Interfaces:
CustomizedAccountAddressRepository<D>
public class JpaCustomizedAccountAddressRepository<D extends JpaAccountAddress>
extends Object
implements CustomizedAccountAddressRepository<D>
Specialized implementation of
JpaAccountAddressRepository
.- Author:
- Chris Kittrell (ckittrell)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearDefaultForAddressType
(@NonNull AccountRef account, @NonNull String accountAddressType, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Find allAccountAddresses
for the provided account withAccountAddress.isDefault()
set to true & update it to false.void
validate()
-
Constructor Details
-
JpaCustomizedAccountAddressRepository
public JpaCustomizedAccountAddressRepository()
-
-
Method Details
-
validate
@PostConstruct public void validate() -
clearDefaultForAddressType
@Transactional("customerTransactionManager") public void clearDefaultForAddressType(@NonNull @NonNull AccountRef account, @NonNull @NonNull String accountAddressType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:CustomizedAccountAddressRepository
Find allAccountAddresses
for the provided account withAccountAddress.isDefault()
set to true & update it to false.- Specified by:
clearDefaultForAddressType
in interfaceCustomizedAccountAddressRepository<D extends JpaAccountAddress>
- Parameters:
account
- the account whose default shipping address should no longer be the default.
-