Created
November 16, 2011 16:32
-
-
Save porcelli/1370561 to your computer and use it in GitHub Desktop.
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
DBObject myBuilderContact = BasicDBObjectBuilder.start() | |
.add("username", "porcelli") | |
.add("first name", "alexandre") | |
.add("last name", "porcelli") | |
.push("address") | |
.add("st. name", "r. josé ramon urtiza") | |
.add("number", "181") | |
.add("complement", "ap. 191B") | |
.add("city", "são paulo") | |
.add("country", "brasil") | |
.pop() | |
.push("phones") | |
.push("mobile") | |
.add("country code", "+55") | |
.add("area code", "11") | |
.add("phone", "8159-9725") | |
.add("type", "mobile") | |
.pop() | |
.push("office") | |
.add("country code", "+55") | |
.add("area code", "11") | |
.add("phone", "????-????") | |
.add("type", "office").pop().pop().pop().pop() //user's are allowed to do this | |
.get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment