Skip to content

Commit

Permalink
Clean up gemfire project
Browse files Browse the repository at this point in the history
  • Loading branch information
dturanski committed Aug 8, 2012
1 parent 1b6f127 commit 103c04d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 28 deletions.
12 changes: 0 additions & 12 deletions gemfire/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-gemfire</artifactId>
<version>1.2.0.BUILD-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.gemstone.gemfire</groupId>
<artifactId>gemfire</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.gemstone.gemfire</groupId>
<artifactId>gemfire</artifactId>
<version>6.6.3</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package com.oreilly.springdata.gemfire.customer;

import java.util.List;

import org.springframework.data.repository.CrudRepository;

import com.oreilly.springdata.gemfire.core.EmailAddress;
Expand All @@ -30,7 +28,5 @@
*/

public interface CustomerRepository extends CrudRepository<Customer, Long> {

List<Customer> findByEmailAddress(EmailAddress emailAddress);

Customer findByEmailAddress(EmailAddress emailAddress);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
* Repository interface to access {@link Product}s.
*
* @author Oliver Gierke
* @author David Turanski
* @author David TuranskiGem
*/
public interface ProductRepository extends CrudRepository<Product, Long> {

/**
* Returns a list of {@link Product}s having a description which contains the given snippet.
* @param description must include the '%' prefix and or suffix
* @param the search string
* @return
*/
@Query("SELECT * FROM /Product WHERE description LIKE $1")

List<Product> findByDescriptionContaining(String description);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
*/
package com.oreilly.springdata.gemfire.customer;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.util.List;

import org.junit.Test;

import com.oreilly.springdata.gemfire.AbstractIntegrationTest;
Expand All @@ -36,8 +33,7 @@ public class CustomerRepositoryIntegrationTest extends AbstractIntegrationTest {

@Test
public void testFind() {
List<Customer> results = customerRepository.findByEmailAddress(new EmailAddress("dave@dmband.com"));
assertNotNull(results);
assertEquals(1,results.size());
Customer result = customerRepository.findByEmailAddress(new EmailAddress("dave@dmband.com"));
assertNotNull(result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class OrderRepositoryIntegrationTest extends AbstractIntegrationTest {
@Test
public void createOrder() {

Customer dave = customerRepository.findByEmailAddress(new EmailAddress("dave@dmband.com")).get(0);
Customer dave = customerRepository.findByEmailAddress(new EmailAddress("dave@dmband.com"));
Product iPad = productRepository.findByName("iPad").get(0);

Order order = new Order(2L, dave.getId(), dave.getAddresses().iterator().next());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void createProduct() {
public void lookupProductsByDescription() {


List<Product> products = productRepository.findByDescriptionContaining("%Apple%");
List<Product> products = productRepository.findByDescriptionContaining("Apple");
assertThat(products, hasSize(2));
assertThat(products, Matchers.<Product> hasItems(named("iPad")));
}
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<module>neo4j</module>
<module>jdbc</module>
<module>redis</module>
<module>gemfire</module>
<module>rest</module>
</modules>

Expand Down

0 comments on commit 103c04d

Please sign in to comment.