com.elasticpath.service.order.impl
Class OrderReturnReasonFactoryImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.order.impl.OrderReturnReasonFactoryImpl
All Implemented Interfaces:
EpEnumFactoryService, EpService, OrderReturnReasonFactory

public class OrderReturnReasonFactoryImpl
extends AbstractEpServiceImpl
implements OrderReturnReasonFactory

Represet a default implementation of OrderReturnReasonFactory.


Field Summary
 
Fields inherited from interface com.elasticpath.service.order.OrderReturnReasonFactory
FAULTY, INCORRECT_ITEM, UNWANTED_GIFT
 
Constructor Summary
OrderReturnReasonFactoryImpl()
           
 
Method Summary
 java.lang.Object getObject(int code)
          Get a persistent instance with the given id.
 OrderReturnReason getOrderReturnReason(int reasonCode)
          Return the OrderReturnReason instance based on the given reason code.
 java.util.Map getOrderReturnReasonMap()
          Returns a map of orderReturn reason.
 
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.EpService
getElasticPath, setElasticPath
 

Constructor Detail

OrderReturnReasonFactoryImpl

public OrderReturnReasonFactoryImpl()
Method Detail

getObject

public java.lang.Object getObject(int code)
                           throws EpServiceException
Get a persistent instance with the given id.

Specified by:
getObject in interface EpEnumFactoryService
Parameters:
code - the enum instance code
Returns:
the enum instance if exists, otherwise null
Throws:
EpServiceException - - in case of any errors

getOrderReturnReason

public OrderReturnReason getOrderReturnReason(int reasonCode)
Return the OrderReturnReason instance based on the given reason code.

Specified by:
getOrderReturnReason in interface OrderReturnReasonFactory
Parameters:
reasonCode - the reason code.
Returns:
the OrderReturnReason instance based on the given reason code.

getOrderReturnReasonMap

public java.util.Map getOrderReturnReasonMap()
Returns a map of orderReturn reason. If a new orderReturnReason is added, make sure the add it to the map returned.

Specified by:
getOrderReturnReasonMap in interface OrderReturnReasonFactory
Returns:
a map of orderReturn reason