// Path: trueyes-crm/trueyes-crm-api/src/main/java/com/samsoft/trueyes/crm/api/CustomerService.java
// public interface CustomerService extends CRUDService<Customer> {
// 
// 	Customer findByMobile(String mobile);
// }
// 
// Path: trueyes-crm/trueyes-crm-domain/src/main/java/com/samsoft/trueyes/crm/domain/Customer.java
// @Document
// public class Customer extends BusinessEntity {
// 
// 	/**
// 	 * serialVersionUID
// 	 */
// 	private static final long serialVersionUID = -3610162111959902141L;
// 
// }
// 
// Path: trueyes-crm/trueyes-crm-repo/src/main/java/com/samsoft/trueyes/crm/repo/CustomerMongoRepository.java
// public interface CustomerMongoRepository extends MongoRepository<Customer, String> {
// 
// 	Customer findByMobile(String mobile);
// 
// }


import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.samsoft.trueyes.crm.api.CustomerService;
import com.samsoft.trueyes.crm.domain.Customer;
import com.samsoft.trueyes.crm.repo.CustomerMongoRepository;
/**
 * 
 */
package com.samsoft.trueyes.crm.impl;




/**
 * @author kumar
 *
 */
@Service
public class CustomerServiceMongoImpl implements CustomerService {

	@Autowired
	protected CustomerMongoRepository repository;

	@Override
	public Customer find(String id) {
		return repository.findOne(id);
	}

	@Override
	public Collection<Customer> list() {
		return repository.findAll();
	}

	@Override
	public Page<Customer> find(Pageable pageRequest) {
		return repository.findAll(pageRequest);
	}

	@Override
// Path: trueyes-crm/trueyes-crm-api/src/main/java/com/samsoft/trueyes/crm/api/CustomerService.java
// public interface CustomerService extends CRUDService<Customer> {
// 
// 	Customer findByMobile(String mobile);
// }
// 
// Path: trueyes-crm/trueyes-crm-domain/src/main/java/com/samsoft/trueyes/crm/domain/Customer.java
// @Document
// public class Customer extends BusinessEntity {
// 
// 	/**
// 	 * serialVersionUID
// 	 */
// 	private static final long serialVersionUID = -3610162111959902141L;
// 
// }
// 
// Path: trueyes-crm/trueyes-crm-repo/src/main/java/com/samsoft/trueyes/crm/repo/CustomerMongoRepository.java
// public interface CustomerMongoRepository extends MongoRepository<Customer, String> {
// 
// 	Customer findByMobile(String mobile);
// 
// }


// Path: trueyes-crm/trueyes-crm-impl/src/main/java/com/samsoft/trueyes/crm/impl/CustomerServiceMongoImpl.java
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.samsoft.trueyes.crm.api.CustomerService;
import com.samsoft.trueyes.crm.domain.Customer;
import com.samsoft.trueyes.crm.repo.CustomerMongoRepository;

/**
 * 
 */
package com.samsoft.trueyes.crm.impl;




/**
 * @author kumar
 *
 */
@Service
public class CustomerServiceMongoImpl implements CustomerService {

	@Autowired
	protected CustomerMongoRepository repository;

	@Override
	public Customer find(String id) {
		return repository.findOne(id);
	}

	@Override
	public Collection<Customer> list() {
		return repository.findAll();
	}

	@Override
	public Page<Customer> find(Pageable pageRequest) {
		return repository.findAll(pageRequest);
	}

	@Override
	public Customer save(Customer t) {