November 2017
Intermediate to advanced
542 pages
14h 24m
English
To get familiar with Spring Data, we will first convert the JBCP calendar SQL to leverage ORM, using the Spring Data JPA starter.
Creating and maintaining SQL can be quite tedious. In the previous chapters, when we wanted to create a new CalendarUser table in the database, we had to create a fair amount of boilerplate code, as follows:
//src/main/java/com/packtpub/springsecurity/ dataaccess/JdbcCalendarUserDao.java public int createUser(final CalendarUser userToAdd) { if (userToAdd == null) { throw new IllegalArgumentException("userToAdd cannot be null"); } if (userToAdd.getId() != null) { throw new IllegalArgumentException("userToAdd.getId() must be null when creating a "+CalendarUser.class.getName()); ...Read now
Unlock full access