import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Scheme implements Parcelable {
public static final Creator<Scheme> CREATOR = new Creator<Scheme> ( ) {
@Override
public Scheme createFromParcel ( Parcel source ) {
return new Scheme ( source );
}
@Override
public Scheme[] newArray ( int size ) {
return new Scheme[size];
}
};
@SerializedName("source")
@Expose
private String source;
@SerializedName("state_url")
@Expose
private String stateurl;
@SerializedName("sector_url")
@Expose
private String sectorurl;
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("name")
@Expose
private String name;
@SerializedName("sector")
@Expose
private String sector;
@SerializedName("government")
@Expose
private String government;
@SerializedName("eligible_beneficiaries")
@Expose
private String eligibleBeneficiaries;
@SerializedName("maximum_income")
@Expose
private String income;
@SerializedName("social_category")
@Expose
private String[] socialCategory;
@SerializedName("religion")
@Expose
private String religion;
@SerializedName("requirements")
@Expose
private String requirements;
@SerializedName("benefits")
@Expose
private String benefits;
@SerializedName("how_to_apply")
@Expose
private String howToApply;
@SerializedName("gender")
@Expose
private String gender;
@SerializedName("min_age")
@Expose
private Integer minAge;
@SerializedName("max_age")
@Expose
private Integer maxAge;
@SerializedName("qualification")
@Expose
private String qualification;
@SerializedName("marital_status")
@Expose
private String maritalStatus;
@SerializedName("bpl")
@Expose
private String bpl;
@SerializedName("disability")
@Expose
private String disability;
public Scheme ( ) {
}
protected Scheme ( Parcel in ) {
this.source = in.readString ( );
this.stateurl = in.readString ( );
this.sectorurl = in.readString ( );
this.id = (Integer) in.readValue ( Integer.class.getClassLoader ( ) );
this.name = in.readString ( );
this.sector = in.readString ( );
this.government = in.readString ( );
this.eligibleBeneficiaries = in.readString ( );
this.income = in.readString ( );
this.socialCategory = in.createStringArray ( );
this.religion = in.readString ( );
this.requirements = in.readString ( );
this.benefits = in.readString ( );
this.howToApply = in.readString ( );
this.gender = in.readString ( );
this.minAge = (Integer) in.readValue ( Integer.class.getClassLoader ( ) );
this.maxAge = (Integer) in.readValue ( Integer.class.getClassLoader ( ) );
this.qualification = in.readString ( );
this.maritalStatus = in.readString ( );
this.bpl = in.readString ( );
this.disability = in.readString ( );
}
public String getBpl ( ) {
return bpl;
}
public void setBpl ( String bpl ) {
this.bpl = bpl;
}
public String getDisability ( ) {
return disability;
}
public void setDisability ( String disability ) {
this.disability = disability;
}
public String getStateurl ( ) {
return stateurl;
}
public void setStateurl ( String stateurl ) {
this.stateurl = stateurl;
}
public String getSectorurl ( ) {
return sectorurl;
}
public void setSectorurl ( String sectorurl ) {
this.sectorurl = sectorurl;
}
public String getIncome ( ) {
return income;
}
public void setIncome ( String income ) {
this.income = income;
}
public String[] getSocialCategory ( ) {
return socialCategory;
}
public void setSocialCategory ( String[] socialCategory ) {
this.socialCategory = socialCategory;
}
public String getReligion ( ) {
return religion;
}
public void setReligion ( String religion ) {
this.religion = religion;
}
public String getRequirements ( ) {
return requirements;
}
public void setRequirements ( String requirements ) {
this.requirements = requirements;
}
public String getSource ( ) {
return source;
}
public void setSource ( String source ) {
this.source = source;
}
public Integer getId ( ) {
return id;
}
public void setId ( Integer id ) {
this.id = id;
}
public String getName ( ) {
return name;
}
public void setName ( String name ) {
this.name = name;
}
public String getSector ( ) {
return sector;
}
public void setSector ( String sector ) {
this.sector = sector;
}
public String getGovernment ( ) {
return government;
}
public void setGovernment ( String government ) {
this.government = government;
}
public String getEligibleBeneficiaries ( ) {
return eligibleBeneficiaries;
}
public void setEligibleBeneficiaries ( String eligibleBeneficiaries ) {
this.eligibleBeneficiaries = eligibleBeneficiaries;
}
public String getBenefits ( ) {
return benefits;
}
public void setBenefits ( String benefits ) {
this.benefits = benefits;
}
public String getHowToApply ( ) {
return howToApply;
}
public void setHowToApply ( String howToApply ) {
this.howToApply = howToApply;
}
public String getGender ( ) {
return gender;
}
public void setGender ( String gender ) {
this.gender = gender;
}
public Integer getMinAge ( ) {
return minAge;
}
public void setMinAge ( Integer minAge ) {
this.minAge = minAge;
}
public Integer getMaxAge ( ) {
return maxAge;
}
public void setMaxAge ( Integer maxAge ) {
this.maxAge = maxAge;
}
public String getQualification ( ) {
return qualification;
}
public void setQualification ( String qualification ) {
this.qualification = qualification;
}
public String getMaritalStatus ( ) {
return maritalStatus;
}
public void setMaritalStatus ( String maritalStatus ) {
this.maritalStatus = maritalStatus;
}
public String getSocialCategoryString(){
if(socialCategory != null && socialCategory.length > 0){
return android.text.TextUtils.join(",", socialCategory);
}
return null;
}
@Override
public int describeContents ( ) {
return 0;
}
@Override
public void writeToParcel ( Parcel dest, int flags ) {
dest.writeString ( this.source );
dest.writeString ( this.stateurl );
dest.writeString ( this.sectorurl );
dest.writeValue ( this.id );
dest.writeString ( this.name );
dest.writeString ( this.sector );
dest.writeString ( this.government );
dest.writeString ( this.eligibleBeneficiaries );
dest.writeString ( this.income );
dest.writeStringArray ( this.socialCategory );
dest.writeString ( this.religion );
dest.writeString ( this.requirements );
dest.writeString ( this.benefits );
dest.writeString ( this.howToApply );
dest.writeString ( this.gender );
dest.writeValue ( this.minAge );
dest.writeValue ( this.maxAge );
dest.writeString ( this.qualification );
dest.writeString ( this.maritalStatus );
dest.writeString ( this.bpl );
dest.writeString ( this.disability );
}
}