Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Examples of stamp and data coupling
//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