Source format and clean-up
This commit is contained in:
@@ -20,25 +20,24 @@ import org.springframework.data.annotation.Id;
|
||||
|
||||
public class Customer {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
|
||||
public Customer() {}
|
||||
public Customer() {
|
||||
}
|
||||
|
||||
public Customer(String firstName, String lastName) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
public Customer(String firstName, String lastName) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format(
|
||||
"Customer[id=%s, firstName='%s', lastName='%s']",
|
||||
id, firstName, lastName);
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("Customer[id=%s, firstName='%s', lastName='%s']", id,
|
||||
firstName, lastName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
public interface CustomerRepository extends MongoRepository<Customer, String> {
|
||||
|
||||
public Customer findByFirstName(String firstName);
|
||||
public Customer findByFirstName(String firstName);
|
||||
|
||||
public List<Customer> findByLastName(String lastName);
|
||||
public List<Customer> findByLastName(String lastName);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user