Skip to content

Commit c9356b1

Browse files
committed
Renamed custom repository implementation to Repository.
1 parent 9e84160 commit c9356b1

File tree

2 files changed

+28
-36
lines changed

2 files changed

+28
-36
lines changed

spring-data-jpa-showcase/src/snippets/java/org/springframework/data/jpa/showcase/snippets/AccountDaoJdbcImpl.java

Lines changed: 0 additions & 36 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package org.springframework.data.jpa.showcase.snippets;
2+
3+
import org.joda.time.LocalDate;
4+
import org.springframework.jdbc.core.JdbcTemplate;
5+
import org.springframework.stereotype.Repository;
6+
7+
/**
8+
* @author Oliver Gierke
9+
*/
10+
@Repository
11+
class AccountRepositoryJdbcImpl implements AccountRepositoryCustom {
12+
13+
private JdbcTemplate template;
14+
15+
public void setTemplate(JdbcTemplate template) {
16+
this.template = template;
17+
}
18+
19+
/*
20+
* (non-Javadoc)
21+
* @see org.springframework.data.jpa.showcase.snippets.AccountRepositoryCustom#removedExpiredAccounts(org.joda.time.LocalDate)
22+
*/
23+
@Override
24+
public void removedExpiredAccounts(LocalDate reference) {
25+
26+
template.update("DELETE Account AS a WHERE a.expiryDate < ?", reference.toDateMidnight().toDate());
27+
}
28+
}

0 commit comments

Comments
 (0)