Advertisement
vergepuppeter

Job.java

Nov 23rd, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 11.82 KB | None | 0 0
  1. import android.os.Parcel;
  2. import android.os.Parcelable;
  3.  
  4. import com.google.android.gms.maps.model.LatLng;
  5. import com.google.gson.annotations.Expose;
  6. import com.google.gson.annotations.SerializedName;
  7. import com.google.maps.android.clustering.ClusterItem;
  8.  
  9. import org.joda.time.format.DateTimeFormat;
  10. import org.joda.time.format.DateTimeFormatter;
  11.  
  12. import java.util.Comparator;
  13.  
  14. /**
  15.  * Created by Developer on 3/3/16.
  16.  */
  17. public class Job implements Parcelable, ClusterItem, Comparable<Job> {
  18.     @SerializedName("jobAdId")
  19.     @Expose
  20.     private String jobAdId;
  21.     @SerializedName("locationId")
  22.     @Expose
  23.     private int locationId;
  24.     @SerializedName("longitude")
  25.     @Expose
  26.     private double longitude;
  27.     @SerializedName("latitude")
  28.     @Expose
  29.     private double latitude;
  30.     @SerializedName("distance")
  31.     @Expose
  32.     private double distance;
  33.     @SerializedName("name")
  34.     @Expose
  35.     private String name;
  36.     @SerializedName("description")
  37.     @Expose
  38.     private String description;
  39.     @SerializedName("jobAdType")
  40.     @Expose
  41.     private int jobAdType;
  42.     @SerializedName("salary")
  43.     @Expose
  44.     private String salary;
  45.     @SerializedName("toDate")
  46.     @Expose
  47.     private String toDate;
  48.     @SerializedName("fromDate")
  49.     @Expose
  50.     private String fromDate;
  51.     @SerializedName("locationName")
  52.     @Expose
  53.     private String locationName;
  54.     @SerializedName("locationAddress")
  55.     @Expose
  56.     private String locationAddress;
  57.     @SerializedName("jobImageURL")
  58.     @Expose
  59.     private String jobImageURL;
  60.     @SerializedName("jobBannerImageURL")
  61.     @Expose
  62.     private String jobBannerImageURL;
  63.     @SerializedName("isJobImagePost")
  64.     @Expose
  65.     private boolean isJobImagePost;
  66.     @SerializedName("requirement")
  67.     @Expose
  68.     private String requirement;
  69.     @SerializedName("postStartDate")
  70.     @Expose
  71.     private String postStartDate;
  72.     @SerializedName("postEndDate")
  73.     @Expose
  74.     private String postEndDate;
  75.     @SerializedName("salaryCurrency")
  76.     @Expose
  77.     private String salaryCurrenyCy;
  78.     @SerializedName("IsPremier")
  79.     private boolean isPremier;
  80.     @SerializedName("IsFeatured")
  81.     private boolean isFeatured;
  82.     @SerializedName("requireCV")
  83.     private boolean isRequiredCv;
  84.     @SerializedName("jobCategoryName")
  85.     @Expose
  86.     private String jobCategoryName;
  87.  
  88.  
  89.     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) {
  90.         this.jobAdId = jobAdId;
  91.         this.locationId = locationId;
  92.         this.longitude = longitude;
  93.         this.latitude = latitude;
  94.         this.distance = distance;
  95.         this.name = name;
  96.         this.description = description;
  97.         this.jobAdType = jobAdType;
  98.         this.salary = salary;
  99.         this.toDate = toDate;
  100.         this.fromDate = fromDate;
  101.         this.locationName = locationName;
  102.         this.locationAddress = locationAddress;
  103.         this.jobImageURL = jobImageURL;
  104.         this.jobBannerImageURL = jobBannerImageURL;
  105.         this.isJobImagePost = isJobImagePost;
  106.         this.requirement = requirement;
  107.         this.postStartDate = postStartDate;
  108.         this.postEndDate = postEndDate;
  109.         this.salaryCurrenyCy = salaryCurrenyCy;
  110.         this.isPremier = isPremier;
  111.         this.isFeatured = isFeatured;
  112.         this.isRequiredCv = isRequiredCv;
  113.         this.jobCategoryName = jobCategoryName;
  114.     }
  115.  
  116.     protected Job(Parcel in) {
  117.         jobAdId = in.readString();
  118.         locationId = in.readInt();
  119.         longitude = in.readDouble();
  120.         latitude = in.readDouble();
  121.         distance = in.readDouble();
  122.         name = in.readString();
  123.         description = in.readString();
  124.         jobAdType = in.readInt();
  125.         salary = in.readString();
  126.         toDate = in.readString();
  127.         fromDate = in.readString();
  128.         locationName = in.readString();
  129.         locationAddress = in.readString();
  130.         jobImageURL = in.readString();
  131.         jobBannerImageURL = in.readString();
  132.         isJobImagePost = in.readByte() != 0;
  133.         requirement = in.readString();
  134.         postStartDate = in.readString();
  135.         postEndDate = in.readString();
  136.         salaryCurrenyCy = in.readString();
  137.         isPremier = in.readByte() != 0;
  138.         isFeatured = in.readByte() != 0;
  139.         isRequiredCv = in.readByte() != 0;
  140.         jobCategoryName = in.readString();
  141.     }
  142.  
  143.     public static final Creator<Job> CREATOR = new Creator<Job>() {
  144.         @Override
  145.         public Job createFromParcel(Parcel in) {
  146.             return new Job(in);
  147.         }
  148.  
  149.         @Override
  150.         public Job[] newArray(int size) {
  151.             return new Job[size];
  152.         }
  153.     };
  154.  
  155.     public String getJobAdId() {
  156.         return jobAdId;
  157.     }
  158.  
  159.     public void setJobAdId(String jobAdId) {
  160.         this.jobAdId = jobAdId;
  161.     }
  162.  
  163.     public int getLocationId() {
  164.         return locationId;
  165.     }
  166.  
  167.     public void setLocationId(int locationId) {
  168.         this.locationId = locationId;
  169.     }
  170.  
  171.     public double getLongitude() {
  172.         return longitude;
  173.     }
  174.  
  175.     public void setLongitude(double longitude) {
  176.         this.longitude = longitude;
  177.     }
  178.  
  179.     public double getLatitude() {
  180.         return latitude;
  181.     }
  182.  
  183.     public void setLatitude(double latitude) {
  184.         this.latitude = latitude;
  185.     }
  186.  
  187.     public double getDistance() {
  188.         return distance;
  189.     }
  190.  
  191.     public void setDistance(double distance) {
  192.         this.distance = distance;
  193.     }
  194.  
  195.     public String getName() {
  196.         return name;
  197.     }
  198.  
  199.     public void setName(String name) {
  200.         this.name = name;
  201.     }
  202.  
  203.     public String getDescription() {
  204.         return description;
  205.     }
  206.  
  207.     public void setDescription(String description) {
  208.         this.description = description;
  209.     }
  210.  
  211.     public int getJobAdType() {
  212.         return jobAdType;
  213.     }
  214.  
  215.     public void setJobAdType(int jobAdType) {
  216.         this.jobAdType = jobAdType;
  217.     }
  218.  
  219.     public String getSalary() {
  220.         return salary;
  221.     }
  222.  
  223.     public void setSalary(String salary) {
  224.         this.salary = salary;
  225.     }
  226.  
  227.     public String getToDate() {
  228.         return toDate;
  229.     }
  230.  
  231.     public void setToDate(String toDate) {
  232.         this.toDate = toDate;
  233.     }
  234.  
  235.     public String getFromDate() {
  236.         return fromDate;
  237.     }
  238.  
  239.     public void setFromDate(String fromDate) {
  240.         this.fromDate = fromDate;
  241.     }
  242.  
  243.     public String getLocationName() {
  244.         return locationName;
  245.     }
  246.  
  247.     public void setLocationName(String locationName) {
  248.         this.locationName = locationName;
  249.     }
  250.  
  251.     public String getLocationAddress() {
  252.         return locationAddress;
  253.     }
  254.  
  255.     public void setLocationAddress(String locationAddress) {
  256.         this.locationAddress = locationAddress;
  257.     }
  258.  
  259.     public String getJobImageURL() {
  260.         return jobImageURL;
  261.     }
  262.  
  263.     public void setJobImageURL(String jobImageURL) {
  264.         this.jobImageURL = jobImageURL;
  265.     }
  266.  
  267.     public String getJobBannerImageURL() {
  268.         return jobBannerImageURL;
  269.     }
  270.  
  271.     public void setJobBannerImageURL(String jobBannerImageURL) {
  272.         this.jobBannerImageURL = jobBannerImageURL;
  273.     }
  274.  
  275.     public boolean isJobImagePost() {
  276.         return isJobImagePost;
  277.     }
  278.  
  279.     public void setJobImagePost(boolean jobImagePost) {
  280.         isJobImagePost = jobImagePost;
  281.     }
  282.  
  283.     public String getRequirement() {
  284.         return requirement;
  285.     }
  286.  
  287.     public void setRequirement(String requirement) {
  288.         this.requirement = requirement;
  289.     }
  290.  
  291.     public String getPostStartDate() {
  292.         return postStartDate;
  293.     }
  294.  
  295.     public void setPostStartDate(String postStartDate) {
  296.         this.postStartDate = postStartDate;
  297.     }
  298.  
  299.     public String getPostEndDate() {
  300.         return postEndDate;
  301.     }
  302.  
  303.     public void setPostEndDate(String postEndDate) {
  304.         this.postEndDate = postEndDate;
  305.     }
  306.  
  307.     public String getSalaryCurrenyCy() {
  308.         return salaryCurrenyCy;
  309.     }
  310.  
  311.     public void setSalaryCurrenyCy(String salaryCurrenyCy) {
  312.         this.salaryCurrenyCy = salaryCurrenyCy;
  313.     }
  314.  
  315.     public boolean isPremier() {
  316.         return isPremier;
  317.     }
  318.  
  319.     public void setPremier(boolean premier) {
  320.         isPremier = premier;
  321.     }
  322.  
  323.     public boolean isFeatured() {
  324.         return isFeatured;
  325.     }
  326.  
  327.     public void setFeatured(boolean featured) {
  328.         isFeatured = featured;
  329.     }
  330.  
  331.     public boolean isRequiredCv() {
  332.         return isRequiredCv;
  333.     }
  334.  
  335.     public void setRequiredCv(boolean requiredCv) {
  336.         isRequiredCv = requiredCv;
  337.     }
  338.  
  339.     public String getjobCategoryName() {
  340.         return jobCategoryName;
  341.     }
  342.  
  343.     public void setJobCategoryName(String jobCategoryName) {
  344.         this.jobCategoryName = jobCategoryName;
  345.     }
  346.  
  347.     @Override
  348.     public String toString() {
  349.         return "Job{" +
  350.                 "jobAdId='" + jobAdId + '\'' +
  351.                 ", locationId=" + locationId +
  352.                 ", longitude=" + longitude +
  353.                 ", latitude=" + latitude +
  354.                 ", distance=" + distance +
  355.                 ", name='" + name + '\'' +
  356.                 ", description='" + description + '\'' +
  357.                 ", jobAdType=" + jobAdType +
  358.                 ", salary='" + salary + '\'' +
  359.                 ", toDate='" + toDate + '\'' +
  360.                 ", fromDate='" + fromDate + '\'' +
  361.                 ", locationName='" + locationName + '\'' +
  362.                 ", locationAddress='" + locationAddress + '\'' +
  363.                 ", jobImageURL='" + jobImageURL + '\'' +
  364.                 ", jobBannerImageURL='" + jobBannerImageURL + '\'' +
  365.                 ", isJobImagePost=" + isJobImagePost +
  366.                 ", requirement='" + requirement + '\'' +
  367.                 ", postStartDate='" + postStartDate + '\'' +
  368.                 ", postEndDate='" + postEndDate + '\'' +
  369.                 ", salaryCurrenyCy='" + salaryCurrenyCy + '\'' +
  370.                 ", isPremier=" + isPremier +
  371.                 ", isFeatured=" + isFeatured +
  372.                 ", isRequiredCv=" + isRequiredCv +
  373.                 ", jobCategoryName='" + jobCategoryName + '\'' +
  374.                 '}';
  375.     }
  376.  
  377.  
  378.     @Override
  379.     public int describeContents() {
  380.         return 0;
  381.     }
  382.  
  383.     @Override
  384.     public void writeToParcel(Parcel parcel, int i) {
  385.         parcel.writeString(jobAdId);
  386.         parcel.writeInt(locationId);
  387.         parcel.writeDouble(longitude);
  388.         parcel.writeDouble(latitude);
  389.         parcel.writeDouble(distance);
  390.         parcel.writeString(name);
  391.         parcel.writeString(description);
  392.         parcel.writeInt(jobAdType);
  393.         parcel.writeString(salary);
  394.         parcel.writeString(toDate);
  395.         parcel.writeString(fromDate);
  396.         parcel.writeString(locationName);
  397.         parcel.writeString(locationAddress);
  398.         parcel.writeString(jobImageURL);
  399.         parcel.writeString(jobBannerImageURL);
  400.         parcel.writeByte((byte) (isJobImagePost ? 1 : 0));
  401.         parcel.writeString(requirement);
  402.         parcel.writeString(postStartDate);
  403.         parcel.writeString(postEndDate);
  404.         parcel.writeString(salaryCurrenyCy);
  405.         parcel.writeByte((byte) (isPremier ? 1 : 0));
  406.         parcel.writeByte((byte) (isFeatured ? 1 : 0));
  407.         parcel.writeByte((byte) (isRequiredCv ? 1 : 0));
  408.         parcel.writeString(jobCategoryName);
  409.     }
  410.  
  411.     @Override
  412.     public LatLng getPosition() {
  413.         return null;
  414.     }
  415.  
  416.     @Override
  417.     public int compareTo(Job job) {
  418.         return 0;
  419.     }
  420. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement