com.elasticpath.service.customer
Interface CustomerSessionService

All Superinterfaces:
EpPersistenceService, EpService
All Known Implementing Classes:
CustomerSessionServiceImpl

public interface CustomerSessionService
extends EpPersistenceService

Provide customer-session related business service.


Method Summary
 CustomerSession add(CustomerSession customerSession)
          Adds the given customer session.
 void deleteByCustomer(long customerUid)
          Delete all customerSession associated with customer with the given id.
 CustomerSession findByGuid(java.lang.String guid)
          Find the customer session with the given guid.
 CustomerSession get(long customerSessionUid)
          Get the customerSession with the given UID.
 CustomerSession load(long customerSessionUid)
          Load the customer session with the given UID.
 void update(CustomerSession customerSession)
          Updates the given customer session.
 void update(CustomerSession customerSession, Customer customer)
          Updates the given customer session.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

CustomerSession add(CustomerSession customerSession)
                    throws EpServiceException
Adds the given customer session.

Parameters:
customerSession - the customer session to add
Returns:
the persisted instance of customerSession
Throws:
EpServiceException - - in case of any errors

deleteByCustomer

void deleteByCustomer(long customerUid)
                      throws EpServiceException
Delete all customerSession associated with customer with the given id.

Parameters:
customerUid - uid of the customer
Throws:
EpServiceException - if any thing goes wrong.

findByGuid

CustomerSession findByGuid(java.lang.String guid)
                           throws EpServiceException
Find the customer session with the given guid.

Parameters:
guid - the customer session guid
Returns:
the customer session if guid address exists, otherwise null
Throws:
EpServiceException - - in case of any errors

get

CustomerSession get(long customerSessionUid)
                    throws EpServiceException
Get the customerSession with the given UID. Return null if no matching record exists.

Parameters:
customerSessionUid - the customerSession UID
Returns:
the customerSession if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

load

CustomerSession load(long customerSessionUid)
                     throws EpServiceException
Load the customer session with the given UID. Throw an unrecoverable exception if there is no matching database row.

Parameters:
customerSessionUid - the customer session UID
Returns:
the customer session if exists, otherwise null
Throws:
EpServiceException - - in case of any errors

update

void update(CustomerSession customerSession)
            throws EpServiceException
Updates the given customer session.

Parameters:
customerSession - the customer session to update
Throws:
EpServiceException - - in case of any errors

update

void update(CustomerSession customerSession,
            Customer customer)
            throws EpServiceException
Updates the given customer session.

Parameters:
customerSession - the customer session to update
customer - the customer to be used to update customer session instance
Throws:
EpServiceException - - in case of any errors