Skip to content

Instantly share code, notes, and snippets.

@jklingsporn
Created April 24, 2017 13:00
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 jklingsporn/091790aaa72540df6ddd5618889e4483 to your computer and use it in GitHub Desktop.
Save jklingsporn/091790aaa72540df6ddd5618889e4483 to your computer and use it in GitHub Desktop.
//fetch something from A to make a lookup on B
ADao adao = new ADao();
adao.findByIdAsync(123,h1->{
if(h1.succeeded()){
BDao bdao = new BDao();
bdao.findBySomeAValueAsync(h1.result().getSomeAValue(),h2->{
if(h2.succeeded()){
//do something with the result
}else{
//oops something went wrong
}
});
}else{
//oops something went wrong
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment