Adding eclipse formatting

This commit is contained in:
sameira 2015-12-26 00:38:18 +05:30
parent be8feed491
commit 948a7279fc
5 changed files with 10 additions and 14 deletions

View File

@ -7,8 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>sprint-data-redis</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>4.2.2.RELEASE</spring.version>

View File

@ -1,13 +1,15 @@
package org.baeldung.spring.data.redis.model;
import java.io.Serializable;
public class Student implements Serializable {
private static final long serialVersionUID = -1907106213598514113L;
public enum Gender{Male, Female}
public enum Gender {
Male, Female
}
private String id;
private String name;
private Gender gender;
@ -54,11 +56,6 @@ public class Student implements Serializable {
@Override
public String toString() {
return "Student{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", gender=" + gender +
", grade=" + grade +
'}';
return "Student{" + "id='" + id + '\'' + ", name='" + name + '\'' + ", gender=" + gender + ", grade=" + grade + '}';
}
}

View File

@ -5,8 +5,9 @@ import org.baeldung.spring.data.redis.model.Student;
import java.util.Map;
public interface StudentRepository {
void saveStudent(Student person);
void updateStudent(Student student);
Student findStudent(String id);

View File

@ -24,7 +24,7 @@ public class StudentRepositoryImpl implements StudentRepository {
}
public Student findStudent(final String id) {
return (Student)this.redisTemplate.opsForHash().get(KEY, id);
return (Student) this.redisTemplate.opsForHash().get(KEY, id);
}
public Map<Object, Object> findAllStudents() {
@ -32,6 +32,6 @@ public class StudentRepositoryImpl implements StudentRepository {
}
public void deleteStudent(final String id) {
this.redisTemplate.opsForHash().delete(KEY,id);
this.redisTemplate.opsForHash().delete(KEY, id);
}
}

View File

@ -13,7 +13,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:/spring-config.xml"})
@ContextConfiguration(locations = { "classpath:/spring-config.xml" })
public class StudentRepositoryTest {
@Autowired