package com.uas.platform.b2b.service.impl;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import com.uas.platform.b2b.dao.SaleOrderDao;
import com.uas.platform.b2b.model.SaleOrder;
import com.uas.platform.b2b.service.SaleOrderService;
import com.uas.platform.core.model.PageInfo;

@Service
public class SaleOrderServiceImpl implements SaleOrderService{

	@Autowired
	private SaleOrderDao saleOrderDao;
	
	public Page<SaleOrder> findAllByPageInfo(PageInfo pageInfo) {
		return saleOrderDao.findAll(new Specification<SaleOrder>() {

			public Predicate toPredicate(Root<SaleOrder> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
				return null;
			}
		}, pageInfo);
	}

}
