If you think the Android project Mamytas 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 mn.aug.restfulandroid.rest.resource;
//www.java2s.comimport android.os.Parcel;
import android.os.Parcelable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by Paul on 10/11/2014.
*/publicclass Timer implements Resource,Parcelable {
private String name=null;
private String timer=null;
private String timer_start=null;
private Long ownership_id=null;
private Long task_id=null;
/**
* @param name
* @param timer
*/
@JsonCreator
public Timer(@JsonProperty("name") String name,@JsonProperty("timer") String timer,@JsonProperty("timer_start") String timer_start,@JsonProperty("ownership_id") Long ownership_id,@JsonProperty("task_id") Long task_id) {
this.name = name;
this.timer = timer;
this.timer_start = timer_start;
this.ownership_id=ownership_id;
this.task_id=task_id;
}
@Override
public String toString() {
return"name=" + name +
"&timer=" + timer +
"&timer_start=" + timer_start +
"&ownership_id=" + ownership_id +
"&task_id=" +task_id;
}
public Timer(String name,String timer, String timer_start, Long task_id) {
this.name = name;
this.timer = timer;
this.timer_start = timer_start;
this.task_id=task_id;
}
public String getName() {
return name;
}
publicvoid setName(String name) {
this.name = name;
}
public String getTimer() {
return timer;
}
publicvoid setTimer(String timer) {
this.timer = timer;
}
public String getTimer_start() {
return timer_start;
}
publicvoid setTimer_start(String timer_start) {
this.timer_start = timer_start;
}
public Long getOwnership_id() {
return ownership_id;
}
publicvoid setOwnership_id(Long ownership_id) {
this.ownership_id= ownership_id;
}
public Long getTask_id() {
return task_id;
}
publicvoid setTask_id(Long task_id) {
this.task_id= task_id;
}
@Override
publicint describeContents() {
return 0;
}
@Override
publicvoid writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeString(timer);
dest.writeString(timer_start);
dest.writeLong(ownership_id);
dest.writeLong(task_id);
}
publicstaticfinal Parcelable.Creator CREATOR = new Parcelable.Creator() {
public Timer createFromParcel(Parcel in) {
returnnew Timer(in);
}
public Timer[] newArray(int size) {
returnnew Timer[size];
}
};
// Parcelling part
public Timer(Parcel in) {
this.name=in.readString();
this.timer=in.readString();
this.timer_start=in.readString();
this.ownership_id=in.readLong();
this.task_id=in.readLong();
}
}