Session.delete -> deleteById
Fixes gh-809
This commit is contained in:
@@ -109,7 +109,7 @@ public abstract class AbstractJdbcOperationsSessionRepositoryITests {
|
||||
assertThat(session.<String>getAttribute(expectedAttributeName))
|
||||
.isEqualTo(toSave.getAttribute(expectedAttributeName));
|
||||
|
||||
this.repository.delete(toSave.getId());
|
||||
this.repository.deleteById(toSave.getId());
|
||||
|
||||
assertThat(this.repository.findById(toSave.getId())).isNull();
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public abstract class AbstractJdbcOperationsSessionRepositoryITests {
|
||||
assertThat(session.<String>getAttribute("a")).isEqualTo(Optional.of("b"));
|
||||
assertThat(session.<String>getAttribute("1")).isEqualTo(Optional.of("2"));
|
||||
|
||||
this.repository.delete(toSave.getId());
|
||||
this.repository.deleteById(toSave.getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -180,7 +180,7 @@ public abstract class AbstractJdbcOperationsSessionRepositoryITests {
|
||||
assertThat(findByPrincipalName).hasSize(1);
|
||||
assertThat(findByPrincipalName.keySet()).containsOnly(toSave.getId());
|
||||
|
||||
this.repository.delete(toSave.getId());
|
||||
this.repository.deleteById(toSave.getId());
|
||||
|
||||
findByPrincipalName = this.repository.findByIndexNameAndIndexValue(INDEX_NAME,
|
||||
principalName);
|
||||
@@ -354,7 +354,7 @@ public abstract class AbstractJdbcOperationsSessionRepositoryITests {
|
||||
assertThat(findByPrincipalName).hasSize(1);
|
||||
assertThat(findByPrincipalName.keySet()).containsOnly(toSave.getId());
|
||||
|
||||
this.repository.delete(toSave.getId());
|
||||
this.repository.deleteById(toSave.getId());
|
||||
|
||||
findByPrincipalName = this.repository.findByIndexNameAndIndexValue(INDEX_NAME,
|
||||
getSecurityName());
|
||||
|
||||
@@ -476,7 +476,7 @@ public class JdbcOperationsSessionRepository implements
|
||||
|
||||
if (session != null) {
|
||||
if (session.isExpired()) {
|
||||
delete(id);
|
||||
deleteById(id);
|
||||
}
|
||||
else {
|
||||
return new JdbcSession(session);
|
||||
@@ -485,7 +485,7 @@ public class JdbcOperationsSessionRepository implements
|
||||
return null;
|
||||
}
|
||||
|
||||
public void delete(final String id) {
|
||||
public void deleteById(final String id) {
|
||||
this.transactionOperations.execute(new TransactionCallbackWithoutResult() {
|
||||
|
||||
protected void doInTransactionWithoutResult(TransactionStatus status) {
|
||||
|
||||
@@ -455,7 +455,7 @@ public class JdbcOperationsSessionRepositoryTests {
|
||||
public void delete() {
|
||||
String sessionId = "testSessionId";
|
||||
|
||||
this.repository.delete(sessionId);
|
||||
this.repository.deleteById(sessionId);
|
||||
|
||||
assertPropagationRequiresNew();
|
||||
verify(this.jdbcOperations, times(1)).update(startsWith("DELETE"), eq(sessionId));
|
||||
|
||||
Reference in New Issue
Block a user