Created
January 25, 2020 06:36
-
-
Save stolarczykt/509e99b54dd14558dfd7eee7ad90c85a to your computer and use it in GitHub Desktop.
Examples of stamp and data coupling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Stamp coupling | |
public EmployeeAddress findAddressFor(EmployeeData employeeData) { | |
EmployeeAddress address = repository | |
.findByEmployeeId(employeeData.getId()) | |
//method body | |
return address; | |
} | |
//Data coupling | |
public ZipCode findZipCodeFor(EmployeeId employeeId) { | |
EmployeeAddress address = repository | |
.findByEmployeeId(employeeId) | |
//method body | |
return address.getZipCode(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment