If you think the Android project chat.android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package org.chat.android.models;
/*www.java2s.com*/import java.util.Date;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
/**
* Created by colin
*/
@DatabaseTable(tableName = "vaccines")
publicclass Vaccine {
@DatabaseField(id = true)
privateint id;
@DatabaseField
privatedouble age; // age that vaccine should have been administered, in years
@DatabaseField
private String display_age; // same, but what will appear to the user (ie "Birth", "6 weeks", "12 years")
@DatabaseField
private String short_name;
@DatabaseField
private String long_name;
@DatabaseField
private Date created_at;
@DatabaseField
private Date modified_at;
/**
* Default Constructor needed by ormlite
*/public Vaccine() {
}
/**
* Constructor that instantiates the private member variable(s)
* @param id
* @param age
* @param display_age
* @param short_name
* @param long_name
* @param created_at
* @param modified_at
*
*/public Vaccine(int id, double age, String display_age, String short_name, String long_name, Date created_at, Date modified_at) {
this.id = id;
this.age = age;
this.display_age = display_age;
this.short_name = short_name;
this.long_name = long_name;
this.created_at = created_at;
this.modified_at = modified_at;
}
/**
* Copy constructor
* @param existingListModel - List model instance that is copied to new instance
*/// public Vaccine(Vaccine existingServicesAccessedModel) {
// this.id = existingServicesAccessedModel.id;
// this.age = existingServicesAccessedModel.age;
// this.display_age = existingServicesAccessedModel.display_age;
// this.short_name = existingServicesAccessedModel.short_name;
// this.long_name = existingServicesAccessedModel.long_name;
// }
publicint getId() {
return id;
}
publicvoid setId(int id) {
this.id = id;
}
publicdouble getAge() {
return age;
}
publicvoid setAge(double age) {
this.age = age;
}
public String getDisplayAge() {
return display_age;
}
publicvoid setDisplayAge(String display_age) {
this.display_age = display_age;
}
public String getShortName() {
return short_name;
}
publicvoid setShortName(String short_name) {
this.short_name = short_name;
}
public String getLongName() {
return long_name;
}
publicvoid setLongName(String long_name) {
this.long_name = long_name;
}
}