com.elasticpath.service.rules
Interface RuleConditionService

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

public interface RuleConditionService
extends EpPersistenceService

Provides rule condition component related services.


Method Summary
 RuleCondition add(RuleCondition ruleCondition)
          Adds the given ruleCondition.
 RuleCondition get(long ruleConditionUid)
          Get the ruleCondition with the given UID.
 RuleCondition get(long ruleConditionUid, java.lang.String ruleConditionType)
          Get the ruleCondition with the given UID if it is greater than 0; otherwise get new instance of the ruleCondition of the given ruleConditionType from the spring beanFactory (assuming bean id is the same as the ruleConditionType).
 RuleCondition load(long ruleConditionUid)
          Load the ruleCondition with the given UID.
 RuleCondition load(long ruleConditionUid, java.lang.String ruleConditionType)
          Load the ruleCondition with the given UID if it is greater than 0; otherwise get new instance of the ruleCondition of the given ruleConditionType from the spring beanFactory (assuming bean id is the same as the ruleConditionType).
 void remove(RuleCondition ruleCondition)
          Delete the ruleCondition.
 void update(RuleCondition ruleCondition)
          Updates the given ruleConditionle.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

RuleCondition add(RuleCondition ruleCondition)
                  throws EpServiceException
Adds the given ruleCondition.

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

get

RuleCondition get(long ruleConditionUid)
                  throws EpServiceException
Get the ruleCondition with the given UID. Return null if no matching record exists.

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

get

RuleCondition get(long ruleConditionUid,
                  java.lang.String ruleConditionType)
                  throws EpServiceException
Get the ruleCondition with the given UID if it is greater than 0; otherwise get new instance of the ruleCondition of the given ruleConditionType from the spring beanFactory (assuming bean id is the same as the ruleConditionType). Return null if no matching record exists.

Parameters:
ruleConditionUid - the ruleCondition UID
ruleConditionType - the ruleCondition type
Returns:
the rule if it exists, otherwise null.
Throws:
EpServiceException - in case of errors.

load

RuleCondition load(long ruleConditionUid)
                   throws EpServiceException
Load the ruleCondition with the given UID. Throw an unrecoverable exception if there is no matching database row.

Parameters:
ruleConditionUid - the ruleCondition UID
Returns:
the rule if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

load

RuleCondition load(long ruleConditionUid,
                   java.lang.String ruleConditionType)
                   throws EpServiceException
Load the ruleCondition with the given UID if it is greater than 0; otherwise get new instance of the ruleCondition of the given ruleConditionType from the spring beanFactory (assuming bean id is the same as the ruleConditionType). Throw an unrecoverable exception if there is no matching database row.

Parameters:
ruleConditionUid - the ruleCondition UID
ruleConditionType - the ruleCondition type
Returns:
the rule if it exists, otherwise null.
Throws:
EpServiceException - in case of errors.

remove

void remove(RuleCondition ruleCondition)
            throws EpServiceException
Delete the ruleCondition.

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

update

void update(RuleCondition ruleCondition)
            throws EpServiceException
Updates the given ruleConditionle.

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