// Path: spring-data-solr-demo-jaxrs/src/main/java/org/tuxdevelop/spring/data/solr/demo/service/StoreServiceBean.java
// @Component
// public class StoreServiceBean implements StoreService {
// 
//     @Autowired
//     private StarbucksStoreRepository starbucksStoreRepository;
// 
//     @Override
//     public StarbucksStore add(final StarbucksStore starbucksStore) {
//         final long count = starbucksStoreRepository.count();
//         final String id = new String("" + (count + 1));
//         starbucksStore.setId(id);
//         return starbucksStoreRepository.save(starbucksStore);
//     }
// 
//     @Override
//     public StarbucksStore get(final String id) {
//         return starbucksStoreRepository.findOne(id);
//     }
// 
//     @Override
//     public void delete(final String id) {
//         starbucksStoreRepository.delete(id);
//     }
// 
//     @Override
//     public Collection<StarbucksStore> findByName(String name) {
//         return starbucksStoreRepository.findByName(name);
//     }
// 
//     @Override
//     public Collection<StarbucksStore> findNear(final Double longtitude, final Double latitude, final Double distance,
//                                       final List<String> products) {
//         final Point point = new Point(latitude, longtitude);
//         final Distance dist = new Distance(distance);
//         final Collection<StarbucksStore> starbucksStores;
//         if (products == null || products.isEmpty()) {
//             starbucksStores = starbucksStoreRepository.findByLocationNear(point, dist);
//         } else {
//             starbucksStores = starbucksStoreRepository.findByProductsInAndLocationNear(products, point, dist);
//         }
//         return starbucksStores;
//     }
// }


import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.context.annotation.Configuration;
import org.tuxdevelop.spring.data.solr.demo.service.StoreServiceBean;
import javax.ws.rs.ApplicationPath;
package org.tuxdevelop.spring.data.solr.demo.configuration;



@Configuration
@ApplicationPath("/dataSolr/api")
public class JerseyConfiguration extends ResourceConfig {

    public JerseyConfiguration() {
// Path: spring-data-solr-demo-jaxrs/src/main/java/org/tuxdevelop/spring/data/solr/demo/service/StoreServiceBean.java
// @Component
// public class StoreServiceBean implements StoreService {
// 
//     @Autowired
//     private StarbucksStoreRepository starbucksStoreRepository;
// 
//     @Override
//     public StarbucksStore add(final StarbucksStore starbucksStore) {
//         final long count = starbucksStoreRepository.count();
//         final String id = new String("" + (count + 1));
//         starbucksStore.setId(id);
//         return starbucksStoreRepository.save(starbucksStore);
//     }
// 
//     @Override
//     public StarbucksStore get(final String id) {
//         return starbucksStoreRepository.findOne(id);
//     }
// 
//     @Override
//     public void delete(final String id) {
//         starbucksStoreRepository.delete(id);
//     }
// 
//     @Override
//     public Collection<StarbucksStore> findByName(String name) {
//         return starbucksStoreRepository.findByName(name);
//     }
// 
//     @Override
//     public Collection<StarbucksStore> findNear(final Double longtitude, final Double latitude, final Double distance,
//                                       final List<String> products) {
//         final Point point = new Point(latitude, longtitude);
//         final Distance dist = new Distance(distance);
//         final Collection<StarbucksStore> starbucksStores;
//         if (products == null || products.isEmpty()) {
//             starbucksStores = starbucksStoreRepository.findByLocationNear(point, dist);
//         } else {
//             starbucksStores = starbucksStoreRepository.findByProductsInAndLocationNear(products, point, dist);
//         }
//         return starbucksStores;
//     }
// }


// Path: spring-data-solr-demo-jaxrs/src/main/java/org/tuxdevelop/spring/data/solr/demo/configuration/JerseyConfiguration.java
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.context.annotation.Configuration;
import org.tuxdevelop.spring.data.solr.demo.service.StoreServiceBean;
import javax.ws.rs.ApplicationPath;

package org.tuxdevelop.spring.data.solr.demo.configuration;



@Configuration
@ApplicationPath("/dataSolr/api")
public class JerseyConfiguration extends ResourceConfig {

    public JerseyConfiguration() {
        register(StoreServiceBean.class);