Class DefaultAccountAddressService<P extends AccountAddress>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.customer.service.DefaultAccountAddressService<P>
- All Implemented Interfaces:
AccountAddressService<P>
,com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
public class DefaultAccountAddressService<P extends AccountAddress>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
implements AccountAddressService<P>
Default implementation of the
AccountAddressService
.- Author:
- Chris Kittrell (ckittrell)
-
Constructor Summary
ConstructorDescriptionDefaultAccountAddressService
(AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
protected com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser
protected AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable>
org.springframework.data.domain.Page<P>
readByAccountId
(@NonNull String accountId, cz.jirutka.rsql.parser.ast.Node requestedFilters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the AccountAddress relationships in the database associated with the given account ID.readByIdAndAccountId
(@NonNull String id, @NonNull String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds theAccountAddress
which has the given ID and account ID.replace
(@NonNull String accountAddressId, P accountAddress, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) void
setAuthenticationUtils
(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) void
setFilterParser
(com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser filterParser) Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAll
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService
convertFromPersistentDomain, convertToPersistentDomain, createAll, createAllAllowingPartialSuccess, delete, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Constructor Details
-
DefaultAccountAddressService
public DefaultAccountAddressService(AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
-
-
Method Details
-
create
@Transactional("customerTransactionManager") public P create(@NonNull P accountAddress, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
create
in interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends AccountAddress>
- Overrides:
create
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends AccountAddress>
-
replace
@Transactional("customerTransactionManager") public P replace(@NonNull @NonNull String accountAddressId, @NonNull P accountAddress, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
replace
in interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends AccountAddress>
- Overrides:
replace
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends AccountAddress>
-
readByAccountId
public org.springframework.data.domain.Page<P> readByAccountId(@NonNull @NonNull String accountId, @Nullable cz.jirutka.rsql.parser.ast.Node requestedFilters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:AccountAddressService
Reads all of the AccountAddress relationships in the database associated with the given account ID.- Specified by:
readByAccountId
in interfaceAccountAddressService<P extends AccountAddress>
- Parameters:
accountId
- the account ID to find the relationships forrequestedFilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- the context to query within- Returns:
- the AccountAddress relationships in the database that match the given account context ID
-
readByIdAndAccountId
public P readByIdAndAccountId(@NonNull @NonNull String id, @NonNull @NonNull String accountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:AccountAddressService
Finds theAccountAddress
which has the given ID and account ID.- Specified by:
readByIdAndAccountId
in interfaceAccountAddressService<P extends AccountAddress>
- Parameters:
id
- the ID of theAccountAddress
accountId
- the ID of the owningAccount
contextInfo
- context surrounding customer and multitenant state- Returns:
- the account address that has the given ID and owning account ID
-
getRepository
@NonNull protected AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()- Overrides:
getRepository
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends AccountAddress>
-
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils() -
setAuthenticationUtils
@Autowired public void setAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) -
getFilterParser
protected com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser getFilterParser() -
setFilterParser
@Autowired(required=false) public void setFilterParser(com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser filterParser)
-