Skip to content

Instantly share code, notes, and snippets.

@florent37
Last active February 8, 2016 12:39
Show Gist options
  • Save florent37/f746b8cd82864e72df18 to your computer and use it in GitHub Desktop.
Save florent37/f746b8cd82864e72df18 to your computer and use it in GitHub Desktop.
Freezer ID
@Model
public class User {
String name;
}
public class UserEntity extends User implements DataBaseModel {
long _id;
public long getDatabaseModelId() {
return _id;
}
public void setDatabaseModelId(long id) {
this._id = id;
}
}
//---------------------------------------------
@Model
public class User{
String name;
@Id
long id;
}
public class UserEntity extends User implements DataBaseModel {
public long getDatabaseModelId() {
return id;
}
public void setDatabaseModelId(long id) {
this.id = id;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment