Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import android.os.Parcel;
- import android.os.Parcelable;
- import com.google.android.gms.maps.model.LatLng;
- import com.google.gson.annotations.Expose;
- import com.google.gson.annotations.SerializedName;
- import com.google.maps.android.clustering.ClusterItem;
- import org.joda.time.format.DateTimeFormat;
- import org.joda.time.format.DateTimeFormatter;
- import java.util.Comparator;
- /**
- * Created by Developer on 3/3/16.
- */
- public class Job implements Parcelable, ClusterItem, Comparable<Job> {
- @SerializedName("jobAdId")
- @Expose
- private String jobAdId;
- @SerializedName("locationId")
- @Expose
- private int locationId;
- @SerializedName("longitude")
- @Expose
- private double longitude;
- @SerializedName("latitude")
- @Expose
- private double latitude;
- @SerializedName("distance")
- @Expose
- private double distance;
- @SerializedName("name")
- @Expose
- private String name;
- @SerializedName("description")
- @Expose
- private String description;
- @SerializedName("jobAdType")
- @Expose
- private int jobAdType;
- @SerializedName("salary")
- @Expose
- private String salary;
- @SerializedName("toDate")
- @Expose
- private String toDate;
- @SerializedName("fromDate")
- @Expose
- private String fromDate;
- @SerializedName("locationName")
- @Expose
- private String locationName;
- @SerializedName("locationAddress")
- @Expose
- private String locationAddress;
- @SerializedName("jobImageURL")
- @Expose
- private String jobImageURL;
- @SerializedName("jobBannerImageURL")
- @Expose
- private String jobBannerImageURL;
- @SerializedName("isJobImagePost")
- @Expose
- private boolean isJobImagePost;
- @SerializedName("requirement")
- @Expose
- private String requirement;
- @SerializedName("postStartDate")
- @Expose
- private String postStartDate;
- @SerializedName("postEndDate")
- @Expose
- private String postEndDate;
- @SerializedName("salaryCurrency")
- @Expose
- private String salaryCurrenyCy;
- @SerializedName("IsPremier")
- private boolean isPremier;
- @SerializedName("IsFeatured")
- private boolean isFeatured;
- @SerializedName("requireCV")
- private boolean isRequiredCv;
- @SerializedName("jobCategoryName")
- @Expose
- private String jobCategoryName;
- public Job(String jobAdId, int locationId, double longitude, double latitude, double distance, String name, String description, int jobAdType, String salary, String toDate, String fromDate, String locationName, String locationAddress, String jobImageURL, String jobBannerImageURL, boolean isJobImagePost, String requirement, String postStartDate, String postEndDate, String salaryCurrenyCy, boolean isPremier, boolean isFeatured, boolean isRequiredCv,String jobCategoryName) {
- this.jobAdId = jobAdId;
- this.locationId = locationId;
- this.longitude = longitude;
- this.latitude = latitude;
- this.distance = distance;
- this.name = name;
- this.description = description;
- this.jobAdType = jobAdType;
- this.salary = salary;
- this.toDate = toDate;
- this.fromDate = fromDate;
- this.locationName = locationName;
- this.locationAddress = locationAddress;
- this.jobImageURL = jobImageURL;
- this.jobBannerImageURL = jobBannerImageURL;
- this.isJobImagePost = isJobImagePost;
- this.requirement = requirement;
- this.postStartDate = postStartDate;
- this.postEndDate = postEndDate;
- this.salaryCurrenyCy = salaryCurrenyCy;
- this.isPremier = isPremier;
- this.isFeatured = isFeatured;
- this.isRequiredCv = isRequiredCv;
- this.jobCategoryName = jobCategoryName;
- }
- protected Job(Parcel in) {
- jobAdId = in.readString();
- locationId = in.readInt();
- longitude = in.readDouble();
- latitude = in.readDouble();
- distance = in.readDouble();
- name = in.readString();
- description = in.readString();
- jobAdType = in.readInt();
- salary = in.readString();
- toDate = in.readString();
- fromDate = in.readString();
- locationName = in.readString();
- locationAddress = in.readString();
- jobImageURL = in.readString();
- jobBannerImageURL = in.readString();
- isJobImagePost = in.readByte() != 0;
- requirement = in.readString();
- postStartDate = in.readString();
- postEndDate = in.readString();
- salaryCurrenyCy = in.readString();
- isPremier = in.readByte() != 0;
- isFeatured = in.readByte() != 0;
- isRequiredCv = in.readByte() != 0;
- jobCategoryName = in.readString();
- }
- public static final Creator<Job> CREATOR = new Creator<Job>() {
- @Override
- public Job createFromParcel(Parcel in) {
- return new Job(in);
- }
- @Override
- public Job[] newArray(int size) {
- return new Job[size];
- }
- };
- public String getJobAdId() {
- return jobAdId;
- }
- public void setJobAdId(String jobAdId) {
- this.jobAdId = jobAdId;
- }
- public int getLocationId() {
- return locationId;
- }
- public void setLocationId(int locationId) {
- this.locationId = locationId;
- }
- public double getLongitude() {
- return longitude;
- }
- public void setLongitude(double longitude) {
- this.longitude = longitude;
- }
- public double getLatitude() {
- return latitude;
- }
- public void setLatitude(double latitude) {
- this.latitude = latitude;
- }
- public double getDistance() {
- return distance;
- }
- public void setDistance(double distance) {
- this.distance = distance;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
- public int getJobAdType() {
- return jobAdType;
- }
- public void setJobAdType(int jobAdType) {
- this.jobAdType = jobAdType;
- }
- public String getSalary() {
- return salary;
- }
- public void setSalary(String salary) {
- this.salary = salary;
- }
- public String getToDate() {
- return toDate;
- }
- public void setToDate(String toDate) {
- this.toDate = toDate;
- }
- public String getFromDate() {
- return fromDate;
- }
- public void setFromDate(String fromDate) {
- this.fromDate = fromDate;
- }
- public String getLocationName() {
- return locationName;
- }
- public void setLocationName(String locationName) {
- this.locationName = locationName;
- }
- public String getLocationAddress() {
- return locationAddress;
- }
- public void setLocationAddress(String locationAddress) {
- this.locationAddress = locationAddress;
- }
- public String getJobImageURL() {
- return jobImageURL;
- }
- public void setJobImageURL(String jobImageURL) {
- this.jobImageURL = jobImageURL;
- }
- public String getJobBannerImageURL() {
- return jobBannerImageURL;
- }
- public void setJobBannerImageURL(String jobBannerImageURL) {
- this.jobBannerImageURL = jobBannerImageURL;
- }
- public boolean isJobImagePost() {
- return isJobImagePost;
- }
- public void setJobImagePost(boolean jobImagePost) {
- isJobImagePost = jobImagePost;
- }
- public String getRequirement() {
- return requirement;
- }
- public void setRequirement(String requirement) {
- this.requirement = requirement;
- }
- public String getPostStartDate() {
- return postStartDate;
- }
- public void setPostStartDate(String postStartDate) {
- this.postStartDate = postStartDate;
- }
- public String getPostEndDate() {
- return postEndDate;
- }
- public void setPostEndDate(String postEndDate) {
- this.postEndDate = postEndDate;
- }
- public String getSalaryCurrenyCy() {
- return salaryCurrenyCy;
- }
- public void setSalaryCurrenyCy(String salaryCurrenyCy) {
- this.salaryCurrenyCy = salaryCurrenyCy;
- }
- public boolean isPremier() {
- return isPremier;
- }
- public void setPremier(boolean premier) {
- isPremier = premier;
- }
- public boolean isFeatured() {
- return isFeatured;
- }
- public void setFeatured(boolean featured) {
- isFeatured = featured;
- }
- public boolean isRequiredCv() {
- return isRequiredCv;
- }
- public void setRequiredCv(boolean requiredCv) {
- isRequiredCv = requiredCv;
- }
- public String getjobCategoryName() {
- return jobCategoryName;
- }
- public void setJobCategoryName(String jobCategoryName) {
- this.jobCategoryName = jobCategoryName;
- }
- @Override
- public String toString() {
- return "Job{" +
- "jobAdId='" + jobAdId + '\'' +
- ", locationId=" + locationId +
- ", longitude=" + longitude +
- ", latitude=" + latitude +
- ", distance=" + distance +
- ", name='" + name + '\'' +
- ", description='" + description + '\'' +
- ", jobAdType=" + jobAdType +
- ", salary='" + salary + '\'' +
- ", toDate='" + toDate + '\'' +
- ", fromDate='" + fromDate + '\'' +
- ", locationName='" + locationName + '\'' +
- ", locationAddress='" + locationAddress + '\'' +
- ", jobImageURL='" + jobImageURL + '\'' +
- ", jobBannerImageURL='" + jobBannerImageURL + '\'' +
- ", isJobImagePost=" + isJobImagePost +
- ", requirement='" + requirement + '\'' +
- ", postStartDate='" + postStartDate + '\'' +
- ", postEndDate='" + postEndDate + '\'' +
- ", salaryCurrenyCy='" + salaryCurrenyCy + '\'' +
- ", isPremier=" + isPremier +
- ", isFeatured=" + isFeatured +
- ", isRequiredCv=" + isRequiredCv +
- ", jobCategoryName='" + jobCategoryName + '\'' +
- '}';
- }
- @Override
- public int describeContents() {
- return 0;
- }
- @Override
- public void writeToParcel(Parcel parcel, int i) {
- parcel.writeString(jobAdId);
- parcel.writeInt(locationId);
- parcel.writeDouble(longitude);
- parcel.writeDouble(latitude);
- parcel.writeDouble(distance);
- parcel.writeString(name);
- parcel.writeString(description);
- parcel.writeInt(jobAdType);
- parcel.writeString(salary);
- parcel.writeString(toDate);
- parcel.writeString(fromDate);
- parcel.writeString(locationName);
- parcel.writeString(locationAddress);
- parcel.writeString(jobImageURL);
- parcel.writeString(jobBannerImageURL);
- parcel.writeByte((byte) (isJobImagePost ? 1 : 0));
- parcel.writeString(requirement);
- parcel.writeString(postStartDate);
- parcel.writeString(postEndDate);
- parcel.writeString(salaryCurrenyCy);
- parcel.writeByte((byte) (isPremier ? 1 : 0));
- parcel.writeByte((byte) (isFeatured ? 1 : 0));
- parcel.writeByte((byte) (isRequiredCv ? 1 : 0));
- parcel.writeString(jobCategoryName);
- }
- @Override
- public LatLng getPosition() {
- return null;
- }
- @Override
- public int compareTo(Job job) {
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement