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
ConstructorsConstructorDescriptionDefaultAccountAddressService(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.AuthenticationUtilsprotected com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParserprotected 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 theAccountAddresswhich has the given ID and account ID.replace(@NonNull String accountAddressId, P accountAddress, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) voidsetAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) voidsetFilterParser(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, readAllMethods 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, updateSortMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSortMethods 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:
createin interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends AccountAddress>- Overrides:
createin 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:
replacein interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends AccountAddress>- Overrides:
replacein 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:AccountAddressServiceReads all of the AccountAddress relationships in the database associated with the given account ID.- Specified by:
readByAccountIdin interfaceAccountAddressService<P extends AccountAddress>- Parameters:
accountId- the account ID to find the relationships forrequestedFilters- additional filters to apply in the query. Should beEmptyNodeif 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:AccountAddressServiceFinds theAccountAddresswhich has the given ID and account ID.- Specified by:
readByIdAndAccountIdin interfaceAccountAddressService<P extends AccountAddress>- Parameters:
id- the ID of theAccountAddressaccountId- the ID of the owningAccountcontextInfo- 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:
getRepositoryin 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)
-