9. new ListProperty<>("peopleYouMayKnow", User.class);
public final Property<String, User> authtoken =
new Property<>("authtoken");
public final Property<String, User> password =
new Property<>("password");
public final Property<Date, User> birthdayDate =
new Property<Date, User>("birthdayDate", Date.class) {
@Override
public Date get() {
if(birthday.get() == null) {
return null;
}
return new Date(birthday.get());
}
@Override
public User set(Date value) {
if(value == null) {
return birthday.set(null);
}
return birthday.set(value.getTime());
}
};
User
10. @Override
public User set(Date value) {
if(value == null) {
return birthday.set(null);
}
return birthday.set(value.getTime());
}
};
private final PropertyIndex idx = new PropertyIndex(this, "User",
id, firstName, familyName, email, phone, gender, avatar, cover,
birthday, birthdayDate, friends, friendRequests,
peopleYouMayKnow, authtoken, password);
public User() {
firstName.setLabel("First Name");
familyName.setLabel("Family Name");
email.setLabel("E-Mail");
phone.setLabel("Phone");
gender.setLabel("Gender");
birthdayDate.setLabel("Birthday");
password.setLabel("Password");
idx.setExcludeFromJSON(birthdayDate, true);
User