com.elasticpath.service.rules.impl
Class RuleParameterServiceImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl
          extended by com.elasticpath.service.rules.impl.RuleParameterServiceImpl
All Implemented Interfaces:
EpPersistenceService, EpService, RuleParameterService

public class RuleParameterServiceImpl
extends AbstractEpPersistenceServiceImpl
implements RuleParameterService

Provides rule parameter component related services.


Constructor Summary
RuleParameterServiceImpl()
           
 
Method Summary
 RuleParameter add(RuleParameter ruleParameter)
          Adds the given ruleParameter.
 java.util.List findUniqueParametersWithKey(java.lang.String parameterKey)
          Get the list of unique RuleParameter value for the given parameter key.
 RuleParameter get(long ruleParameterUid)
          Get the ruleParameter with the given UID.
 java.lang.Object getObject(long uid)
          Generic get method for all persistable domain models.
 RuleParameter load(long ruleParameterUid)
          Load the ruleParameter with the given UID.
 void remove(RuleParameter ruleParameter)
          Delete the ruleParameter.
 void update(RuleParameter ruleParameter)
          Updates the given ruleParameterle.
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl
getPersistenceEngine, setPersistenceEngine
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Constructor Detail

RuleParameterServiceImpl

public RuleParameterServiceImpl()
Method Detail

add

public RuleParameter add(RuleParameter ruleParameter)
                  throws EpServiceException
Adds the given ruleParameter.

Specified by:
add in interface RuleParameterService
Parameters:
ruleParameter - the ruleParameter to add
Returns:
the persisted instance of ruleParameter.
Throws:
EpServiceException - - in case of any errors

findUniqueParametersWithKey

public java.util.List findUniqueParametersWithKey(java.lang.String parameterKey)
                                           throws EpServiceException
Get the list of unique RuleParameter value for the given parameter key.

Specified by:
findUniqueParametersWithKey in interface RuleParameterService
Parameters:
parameterKey - - the RuleParameter key.
Returns:
the list of RuleParameters for the given parameter key.
Throws:
EpServiceException - in case of errors.

get

public RuleParameter get(long ruleParameterUid)
                  throws EpServiceException
Get the ruleParameter with the given UID. Return null if no matching record exists.

Specified by:
get in interface RuleParameterService
Parameters:
ruleParameterUid - the ruleParameter UID
Returns:
the ruleParameter if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

getObject

public java.lang.Object getObject(long uid)
                           throws EpServiceException
Generic get method for all persistable domain models.

Specified by:
getObject in interface EpPersistenceService
Parameters:
uid - the persisted instance uid
Returns:
the persisted instance if exists, otherwise null
Throws:
EpServiceException - - in case of any errors

load

public RuleParameter load(long ruleParameterUid)
                   throws EpServiceException
Load the ruleParameter with the given UID. Throw an unrecoverable exception if there is no matching database row.

Specified by:
load in interface RuleParameterService
Parameters:
ruleParameterUid - the ruleParameter UID
Returns:
the rule if UID exists, otherwise null
Throws:
EpServiceException - - in case of any errors

remove

public void remove(RuleParameter ruleParameter)
            throws EpServiceException
Delete the ruleParameter.

Specified by:
remove in interface RuleParameterService
Parameters:
ruleParameter - the ruleParameter to remove
Throws:
EpServiceException - - in case of any errors

update

public void update(RuleParameter ruleParameter)
            throws EpServiceException
Updates the given ruleParameterle.

Specified by:
update in interface RuleParameterService
Parameters:
ruleParameter - the ruleParameter to update
Throws:
EpServiceException - - in case of any errors