Created
August 15, 2013 01:01
-
-
Save mdellavo/6237355 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
Mapped classes are abstract where abstract annotated | |
getters that take a Query/Fetch lisener. Object will be proxied, if | |
an abstract getter is invoked, fetch and call listener. | |
abstract class Score implements Entity { | |
@Column(primaryKey=true) | |
Private int id; | |
private date; | |
private int score; | |
@Column(foreignKey=User.class) | |
private int userId; | |
@Relation(User.class) | |
public abstract void getUser(FetchListener<User> listener); | |
... | |
} | |
abstract class User implements Entity { | |
@Column(primaryKey=true) | |
private int id; | |
private String name; | |
@Relation(Score.class) | |
public abstract void getScores(QueryListener<Score> listener); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment