Created
March 24, 2011 15:29
-
-
Save solars/885246 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
@Model | |
class User { | |
@Id | |
private Long id; | |
@Attribute | |
private String name; | |
@Attribute | |
@Indexed | |
private int age; | |
@Reference | |
@Indexed | |
private Country country; | |
@CollectionList(of = Comment.class) | |
@Indexed | |
private List<Comment> comments; | |
@CollectionSet(of = Item.class) | |
@Indexed | |
private Set<Item> purchases; | |
@CollectionMap(key = Integer.class, value = Item.class) | |
@Indexed | |
private Map<Integer, Item> favoritePurchases; | |
@CollectionSortedSet(of = Item.class, by = "price") | |
@Indexed | |
private Set<Item> orderedPurchases; | |
@Array(of = Item.class, length = 3) | |
@Indexed | |
private Item[] threeLatestPurchases; | |
} | |
@Model | |
class Comment { | |
@Id | |
private Long id; | |
@Attribute | |
private String text; | |
} | |
@Model | |
class Item { | |
@Id | |
private Long id; | |
@Attribute | |
private String name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment