Skip to content

Instantly share code, notes, and snippets.

@rterp
Created February 10, 2017 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rterp/82a2a01d267f02199f2318ce9799fe2c to your computer and use it in GitHub Desktop.
Save rterp/82a2a01d267f02199f2318ce9799fe2c to your computer and use it in GitHub Desktop.
public void runTest() {
ProductSummaryBean summaryBean = new ProductSummaryBean(19.95, "MyWidget", "Z332332", new DecimalFormat("$#,###,##0.00"));
ProductDetailsBean detailBean = getProductDetailsBean(summaryBean);
productMap.put(summaryBean, detailBean);
//Load the same summaryBean from the DB
summaryBean = loadSummaryBean("Z332332");
//Pull the detailBean from the map for the given summaryBean
detailBean = productMap.get(summaryBean);
System.out.println("DetailBean is: " + detailBean );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment