com.elasticpath.service.catalog
Interface BrandService

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

public interface BrandService
extends EpPersistenceService

Provides brand-related business services.


Method Summary
 Brand add(Brand brand)
          Adds the given brand.
 boolean codeExists(Brand brand)
          Check whether the given brand's code exists or not.
 boolean codeExists(java.lang.String code)
          Checks whether the given brand code exists or not.
 Brand findByCode(java.lang.String code)
          Find the brand with the given code.
 Brand get(long brandUid)
          Get the brand with the given UID.
 java.util.List getBrandCodeNameList()
          Return a list of brand code and default locale display name of all brands.
 java.util.List getBrandInUseList()
          Return a list of all brands in use.
 java.util.List getBrandInUseUidList()
          Return a list of uids for all brands in use.
 java.util.List list()
          Lists all brand stored in the database.
 void remove(Brand brand)
          Deletes the brand.
 void saveOrUpdate(Brand brand)
          Save or update the given brand.
 void update(Brand brand)
          Updates the given brand.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

Brand add(Brand brand)
          throws EpServiceException
Adds the given brand.

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

codeExists

boolean codeExists(Brand brand)
                   throws EpServiceException
Check whether the given brand's code exists or not.

Parameters:
brand - the brand to check
Returns:
true if a different brand with the given brand's code exists
Throws:
EpServiceException - - in case of any errors

codeExists

boolean codeExists(java.lang.String code)
                   throws EpServiceException
Checks whether the given brand code exists or not.

Parameters:
code - the brand code.
Returns:
true if the given code exists.
Throws:
EpServiceException - - in case of any errors

findByCode

Brand findByCode(java.lang.String code)
                 throws EpServiceException
Find the brand with the given code.

Parameters:
code - the brand code.
Returns:
the brand that matches the given code, otherwise null
Throws:
EpServiceException - - in case of any errors

get

Brand get(long brandUid)
          throws EpServiceException
Get the brand with the given UID. Return null if no matching record exists.

Parameters:
brandUid - the Brand UID.
Returns:
the brand if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

getBrandCodeNameList

java.util.List getBrandCodeNameList()
Return a list of brand code and default locale display name of all brands.

Returns:
a list of brand code and default locale display name of all brands

getBrandInUseList

java.util.List getBrandInUseList()
Return a list of all brands in use.

Returns:
a list of all brands in use

getBrandInUseUidList

java.util.List getBrandInUseUidList()
Return a list of uids for all brands in use.

Returns:
a list of uids for all brands in use

list

java.util.List list()
                    throws EpServiceException
Lists all brand stored in the database.

Returns:
a list of brand
Throws:
EpServiceException - - in case of any errors

remove

void remove(Brand brand)
            throws EpServiceException
Deletes the brand.

Parameters:
brand - the brand to remove
Throws:
EpServiceException - in case of any errors

saveOrUpdate

void saveOrUpdate(Brand brand)
                  throws EpServiceException
Save or update the given brand.

Parameters:
brand - the brand to save or update
Throws:
EpServiceException - - in case of any errors

update

void update(Brand brand)
            throws EpServiceException
Updates the given brand.

Parameters:
brand - the brand to update
Throws:
EpServiceException - - in case of any errors