Class DefaultAddressService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.servicelayer.user.impl.DefaultAddressService
-
- All Implemented Interfaces:
AddressService,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
ChineseAddressService
public class DefaultAddressService extends AbstractBusinessService implements AddressService
Default implementation of theAddressService.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description DefaultAddressService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddressModelcloneAddress(AddressModel address)Clones an address and sets a link on the new address to the original address.AddressModelcloneAddressForOwner(AddressModel address, ItemModel owner)Clones an address but for the given owner and sets a link on the new address to the original address.AddressModelcreateAddressForOwner(ItemModel owner)Creates a new, not persistedAddressModelfor the given owner.AddressModelcreateAddressForUser(UserModel user)Creates a new, not persistedAddressModelfor the given user.java.util.Collection<AddressModel>getAddressesForOwner(ItemModel owner)Gets aCollectionofaddressesfor the given owner e.g.voidsetAddressDao(AddressDao addressDao)-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
createAddressForUser
public AddressModel createAddressForUser(UserModel user)
Description copied from interface:AddressServiceCreates a new, not persistedAddressModelfor the given user.- Specified by:
createAddressForUserin interfaceAddressService- Parameters:
user- creates an address for thisUserModel- Returns:
- a new, not persisted
AddressModel
-
createAddressForOwner
public AddressModel createAddressForOwner(ItemModel owner)
Description copied from interface:AddressServiceCreates a new, not persistedAddressModelfor the given owner.- Specified by:
createAddressForOwnerin interfaceAddressService- Parameters:
owner- the owner (can be any item) for the address, as example: can be aUserModel,CartModelorOrderModel- Returns:
- a new, not persisted address
-
getAddressesForOwner
public java.util.Collection<AddressModel> getAddressesForOwner(ItemModel owner)
Description copied from interface:AddressServiceGets aCollectionofaddressesfor the given owner e.g. a user or an order.The owner can be any item.
- Specified by:
getAddressesForOwnerin interfaceAddressService- Parameters:
owner- the given owner, can be an order, a cart or a user- Returns:
- an empty collection if nothing was found
-
cloneAddress
public AddressModel cloneAddress(AddressModel address)
Description copied from interface:AddressServiceClones an address and sets a link on the new address to the original address.The new address has the same owner as the given address.
- Specified by:
cloneAddressin interfaceAddressService- Parameters:
address- the address to clone- Returns:
- a new created, not persisted clone of the given address
-
cloneAddressForOwner
public AddressModel cloneAddressForOwner(AddressModel address, ItemModel owner)
Description copied from interface:AddressServiceClones an address but for the given owner and sets a link on the new address to the original address.- Specified by:
cloneAddressForOwnerin interfaceAddressService- Parameters:
address- the address to cloneowner- the owner of the new cloned address- Returns:
- a new created,
not persistedclone of the given address
-
setAddressDao
public void setAddressDao(AddressDao addressDao)
-
-