Last active
July 8, 2016 03:07
-
-
Save brunokrebs/160e20ce78205bb926b7f18aaf4077e0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package com.someaddress.model; | |
public class Product { | |
// properties (already defined before) | |
public Product() { } | |
// getters ... (see? no setters) | |
public void handleDetailsUpdate(DetailsUpdateIntent intent) { | |
Assert.isTrue(intent.getPrice().compareTo(BigDecimal.ZERO) > 0); | |
this.name = intent.getName(); | |
this.description = intent.getDescription(); | |
this.price = intent.getPrice(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment