-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Satendra kumar
committed
Aug 16, 2015
1 parent
bac4788
commit f5a5611
Showing
6 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.knol.db | ||
|
||
import com.knol.db.repo._ | ||
import scala.util._ | ||
import scala.concurrent.ExecutionContext.Implicits.global | ||
|
||
object Demo extends App { | ||
|
||
val bankId = BankRepository.create(Bank("ICICI bank")) | ||
|
||
bankId.onComplete { | ||
case Success(id) => | ||
|
||
BankProductRepository.create(BankProduct("car loan", id)) | ||
BankInfoRepository.create(BankInfo("Goverment", 1000, id)) | ||
BankRepository.create(Bank("SBI Bank")) | ||
case _ => println("Error ...........") | ||
} | ||
|
||
BankInfoRepository.getAllBankWithInfo().foreach(println) | ||
|
||
BankProductRepository.getAllBankWithProduct().foreach(println) | ||
|
||
Thread.sleep(10 * 1000) | ||
|
||
} |
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
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
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
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