com.elasticpath.service.tax
Interface TaxCodeService

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

public interface TaxCodeService
extends EpPersistenceService

Provide TaxCode-related business service.


Method Summary
 TaxCode add(TaxCode taxCode)
          Adds the given taxCode.
 TaxCode get(long taxCodeUid)
          Get the taxCode with the given UID.
 java.util.List getTaxCodesInUse()
          Get the list of tax code (String) in use (being used to define tax value associated with a TaxJurisdiction).
 java.util.List list()
          List all taxCodes stored in the database.
 TaxCode load(long taxCodeUid)
          Load the taxCode with the given UID.
 void remove(TaxCode taxCode)
          Delete the current taxCode and all its direct/indirect children.
 boolean taxCodeExists(java.lang.String code)
          Checks the given taxCode exists or not.
 void update(TaxCode taxCode)
          Updates the given taxCode.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

TaxCode add(TaxCode taxCode)
            throws TaxCodeExistException
Adds the given taxCode.

Parameters:
taxCode - the taxCode to add
Returns:
the persisted instance of taxCode
Throws:
TaxCodeExistException - - if the specified tax code already exists.

get

TaxCode get(long taxCodeUid)
            throws EpServiceException
Get the taxCode with the given UID. Return null if no matching record exists.

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

getTaxCodesInUse

java.util.List getTaxCodesInUse()
                                throws EpServiceException
Get the list of tax code (String) in use (being used to define tax value associated with a TaxJurisdiction).

Returns:
the list of uids of TaxCodes in use.
Throws:
EpServiceException - - in case of any errors

list

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

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

load

TaxCode load(long taxCodeUid)
             throws EpServiceException
Load the taxCode with the given UID. Throw an unrecoverable exception if there is no matching database row.

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

remove

void remove(TaxCode taxCode)
            throws EpServiceException
Delete the current taxCode and all its direct/indirect children.

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

taxCodeExists

boolean taxCodeExists(java.lang.String code)
                      throws EpServiceException
Checks the given taxCode exists or not.

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

update

void update(TaxCode taxCode)
            throws TaxCodeExistException
Updates the given taxCode.

Parameters:
taxCode - the taxCode to update
Throws:
TaxCodeExistException - - if the specified tax code already exists.