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 AddressModel
cloneAddress(AddressModel address)
Clones an address and sets a link on the new address to the original address.AddressModel
cloneAddressForOwner(AddressModel address, ItemModel owner)
Clones an address but for the given owner and sets a link on the new address to the original address.AddressModel
createAddressForOwner(ItemModel owner)
Creates a new, not persistedAddressModel
for the given owner.AddressModel
createAddressForUser(UserModel user)
Creates a new, not persistedAddressModel
for the given user.java.util.Collection<AddressModel>
getAddressesForOwner(ItemModel owner)
Gets aCollection
ofaddresses
for the given owner e.g.void
setAddressDao(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:AddressService
Creates a new, not persistedAddressModel
for the given user.- Specified by:
createAddressForUser
in interfaceAddressService
- Parameters:
user
- creates an address for thisUserModel
- Returns:
- a new, not persisted
AddressModel
-
createAddressForOwner
public AddressModel createAddressForOwner(ItemModel owner)
Description copied from interface:AddressService
Creates a new, not persistedAddressModel
for the given owner.- Specified by:
createAddressForOwner
in interfaceAddressService
- Parameters:
owner
- the owner (can be any item) for the address, as example: can be aUserModel
,CartModel
orOrderModel
- Returns:
- a new, not persisted address
-
getAddressesForOwner
public java.util.Collection<AddressModel> getAddressesForOwner(ItemModel owner)
Description copied from interface:AddressService
Gets aCollection
ofaddresses
for the given owner e.g. a user or an order.The owner can be any item.
- Specified by:
getAddressesForOwner
in 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:AddressService
Clones 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:
cloneAddress
in 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:AddressService
Clones an address but for the given owner and sets a link on the new address to the original address.- Specified by:
cloneAddressForOwner
in interfaceAddressService
- Parameters:
address
- the address to cloneowner
- the owner of the new cloned address- Returns:
- a new created,
not persisted
clone of the given address
-
setAddressDao
public void setAddressDao(AddressDao addressDao)
-
-