Skip to content

Instantly share code, notes, and snippets.

@mdellavo
Created August 15, 2013 14:04
Show Gist options
  • Save mdellavo/6241073 to your computer and use it in GitHub Desktop.
Save mdellavo/6241073 to your computer and use it in GitHub Desktop.
interface UserRelations {
@Relation(Score.class)
void getScores(QueryListener<Score> listener);
}
@Table(name="users")
public abstract static class User implements Entity, UserRelations {
public User() {}
@Column(primaryKey = true)
private long id = -1;
@Column(name="user_name", unique = true, nullable = false)
private String userName;
public User(final String name) {
userName = name;
}
public long getId() {
return id;
}
public String getUserName() {
return userName;
}
public void setUserName(final String username) {
userName = username;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment