class ShippingQuoteServiceImpl extends SalesManagerEntityServiceImpl<Long, Quote> implements ShippingQuoteService {

	
	private static final Logger LOGGER = LoggerFactory.getLogger(ShippingQuoteServiceImpl.class);
	
	private ShippingQuoteRepository shippingQuoteRepository;
	
	@Inject
	private ShippingService shippingService;
	
	@Inject
	public ShippingQuoteServiceImpl(ShippingQuoteRepository repository) {
		super(repository);
		this.shippingQuoteRepository = repository;
		// TODO Auto-generated constructor stub
	}

	@Override
	public List<Quote> findByOrder(Order order) throws ServiceException {
		Validate.notNull(order,"Order cannot be null");
		return this.shippingQuoteRepository.findByOrder(order.getId());
	}

	@Override
	public ShippingSummary getShippingSummary(Long quoteId, MerchantStore store) throws ServiceException {<FILL_FUNCTION_BODY>}


}

		
		Validate.notNull(quoteId,"quoteId must not be null");
		
		Quote q = shippingQuoteRepository.getOne(quoteId);

		
		ShippingSummary quote = null;
		
		if(q != null) {
			
			quote = new ShippingSummary();
			quote.setDeliveryAddress(q.getDelivery());
			quote.setShipping(q.getPrice());
			quote.setShippingModule(q.getModule());
			quote.setShippingOption(q.getOptionName());
			quote.setShippingOptionCode(q.getOptionCode());
			quote.setHandling(q.getHandling());
			
			if(shippingService.hasTaxOnShipping(store)) {
				quote.setTaxOnShipping(true);
			}
			
			
			
		}
		
		
		return quote;
		
	
<methods>public void <init>(JpaRepository<com.salesmanager.core.model.shipping.Quote,java.lang.Long>) ,public java.lang.Long count() ,public void create(com.salesmanager.core.model.shipping.Quote) throws com.salesmanager.core.business.exception.ServiceException,public void delete(com.salesmanager.core.model.shipping.Quote) throws com.salesmanager.core.business.exception.ServiceException,public void flush() ,public com.salesmanager.core.model.shipping.Quote getById(java.lang.Long) ,public List<com.salesmanager.core.model.shipping.Quote> list() ,public void save(com.salesmanager.core.model.shipping.Quote) throws com.salesmanager.core.business.exception.ServiceException,public void saveAll(Iterable<com.salesmanager.core.model.shipping.Quote>) throws com.salesmanager.core.business.exception.ServiceException,public void update(com.salesmanager.core.model.shipping.Quote) throws com.salesmanager.core.business.exception.ServiceException<variables>private Class<com.salesmanager.core.model.shipping.Quote> objectClass,private JpaRepository<com.salesmanager.core.model.shipping.Quote,java.lang.Long> repository