mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:05:49 +00:00
small cosmetic changes
This commit is contained in:
parent
3ee5e912ee
commit
ea3057f7af
4 changed files with 0 additions and 12 deletions
|
@ -25,7 +25,6 @@ public class JdbcOwnerRepositoryExtImpl extends JdbcOwnerRepositoryImpl implemen
|
|||
@Autowired
|
||||
public JdbcOwnerRepositoryExtImpl(DataSource dataSource) {
|
||||
super(dataSource);
|
||||
// TODO super() ?
|
||||
this.namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(dataSource);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ public class JdbcPetTypeRepositoryExtImpl implements PetTypeRepositoryExt {
|
|||
this.namedParameterJdbcTemplate.update("UPDATE types SET name=:name WHERE id=:id",
|
||||
parameterSource);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -78,7 +77,6 @@ public class JdbcPetTypeRepositoryExtImpl implements PetTypeRepositoryExt {
|
|||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("id", petType.getId());
|
||||
this.namedParameterJdbcTemplate.update("DELETE FROM types WHERE id=:id", params);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@ public class JdbcSpecialtyRepositoryExtImpl implements SpecialtyRepositoryExt {
|
|||
|
||||
@Autowired
|
||||
public JdbcSpecialtyRepositoryExtImpl(DataSource dataSource) {
|
||||
// TODO Auto-generated constructor stub
|
||||
this.namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(dataSource);
|
||||
|
||||
this.insertSpecialty = new SimpleJdbcInsert(dataSource)
|
||||
.withTableName("specialties")
|
||||
.usingGeneratedKeyColumns("id");
|
||||
|
|
|
@ -15,7 +15,6 @@ import org.springframework.jdbc.core.namedparam.BeanPropertySqlParameterSource;
|
|||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
|
||||
import org.springframework.orm.ObjectRetrievalFailureException;
|
||||
import org.springframework.samples.petclinic.model.Owner;
|
||||
import org.springframework.samples.petclinic.model.Vet;
|
||||
import org.springframework.samples.petclinic.repository.VetRepositoryExt;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
@ -24,8 +23,6 @@ import org.springframework.stereotype.Repository;
|
|||
@Qualifier("VetRepositoryExt")
|
||||
public class JdbcVetRepositoryExtImpl extends JdbcVetRepositoryImpl implements VetRepositoryExt {
|
||||
|
||||
//private JdbcTemplate jdbcTemplate;
|
||||
|
||||
private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
|
||||
|
||||
private SimpleJdbcInsert insertVet;
|
||||
|
@ -33,13 +30,9 @@ public class JdbcVetRepositoryExtImpl extends JdbcVetRepositoryImpl implements V
|
|||
@Autowired
|
||||
public JdbcVetRepositoryExtImpl(DataSource dataSource, JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
// TODO Auto-generated constructor stub
|
||||
//this.jdbcTemplate = jdbcTemplate;
|
||||
|
||||
this.insertVet = new SimpleJdbcInsert(dataSource)
|
||||
.withTableName("vets")
|
||||
.usingGeneratedKeyColumns("id");
|
||||
|
||||
this.namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(dataSource);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue