mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 04:59:24 +00:00
Java 11 migrate c-d (remaining) (#1111)
* Moves converter pattern to Java 11 * Moves cqrs pattern to Java 11 * Moves dao pattern to Java 11 * Moves data-bus pattern to Java 11 * Moves data-locality pattern to Java 11 * Moves data-mapper pattern to Java 11 * Moves data-transfer-object pattern to Java 11 * Moves decorator pattern to Java 11 * Moves delegation pattern to Java 11 * Moves dependency-injection to Java 11 * Moves dirty-flag to Java 11 * Moves double-buffer to Java 11 * Moves double-checked-locking to Java 11 * Moves double-dispatch to Java 11 * Corrects with changes thats breaking test cases
This commit is contained in:
committed by
Ilkka Seppälä
parent
5681684157
commit
ea57934db6
@@ -23,7 +23,6 @@
|
||||
|
||||
package com.iluwatar.datamapper;
|
||||
|
||||
import java.util.Optional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -51,10 +50,10 @@ public final class App {
|
||||
public static void main(final String... args) {
|
||||
|
||||
/* Create new data mapper for type 'first' */
|
||||
final StudentDataMapper mapper = new StudentDataMapperImpl();
|
||||
final var mapper = new StudentDataMapperImpl();
|
||||
|
||||
/* Create new student */
|
||||
Student student = new Student(1, "Adam", 'A');
|
||||
var student = new Student(1, "Adam", 'A');
|
||||
|
||||
/* Add student in respectibe store */
|
||||
mapper.insert(student);
|
||||
@@ -62,7 +61,7 @@ public final class App {
|
||||
log.debug(STUDENT_STRING + student + ", is inserted");
|
||||
|
||||
/* Find this student */
|
||||
final Optional<Student> studentToBeFound = mapper.find(student.getStudentId());
|
||||
final var studentToBeFound = mapper.find(student.getStudentId());
|
||||
|
||||
log.debug(STUDENT_STRING + studentToBeFound + ", is searched");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user