Skip to content

Instantly share code, notes, and snippets.

@milaptank
Created February 27, 2017 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milaptank/87ca83a3c8c499ac1b146e88b5ec4324 to your computer and use it in GitHub Desktop.
Save milaptank/87ca83a3c8c499ac1b146e88b5ec4324 to your computer and use it in GitHub Desktop.
with builder pattern
package com.webmobtech.android.instascraper.util;
public class User {
private String user_id;
private String username;
private String fullname;
private String workplace;
private String p_re_ward;
private String p_re_district;
private String p_re_province;
private String p_so_ward;
private String p_so_district;
private String p_so_province;
private String p_bi_ward;
private String p_bi_district;
private String p_bi_province;
private String p_place_of_birth_id;
private String p_identity_issue_place_id;
private String usercode;
private String usercode_old;
private String image;
private String front_identity_card;
private String back_identity_card;
private String portrait;
private String signature;
private String images;
private String email;
private String telephone;
private String gender;
private String p_identity_number;
private String p_identity_issue_date;
private String p_identity_issue_place;
private String p_tax_code;
private String p_insurance_num;
private String p_belonging_persons;
private String p_relative_telephone;
private String p_birthday;
private String p_place_of_birth;
private String p_nationality;
private String p_nation;
private String p_degree;
private String p_re_address;
private String p_re_province_id;
private String p_re_district_id;
private String p_re_ward_id;
private String p_so_address;
private String p_so_province_id;
private String p_so_district_id;
private String p_bi_address;
private String p_bi_province_id;
private String p_bi_district_id;
private String p_bi_ward_id;
private String p_protector;
private String p_bank_holder;
private String p_bank_number;
private String p_bank_name;
private String user_group_id;
private String province_id;
private String district_id;
private String ward_id;
private String address;
private String latitude;
private String longitude;
public int status;
private User(Builder builder) {
user_id = builder.user_id;
username = builder.username;
fullname = builder.fullname;
workplace = builder.workplace;
p_re_ward = builder.p_re_ward;
p_re_district = builder.p_re_district;
p_re_province = builder.p_re_province;
p_so_ward = builder.p_so_ward;
p_so_district = builder.p_so_district;
p_so_province = builder.p_so_province;
p_bi_ward = builder.p_bi_ward;
p_bi_district = builder.p_bi_district;
p_bi_province = builder.p_bi_province;
p_place_of_birth_id = builder.p_place_of_birth_id;
p_identity_issue_place_id = builder.p_identity_issue_place_id;
usercode = builder.usercode;
usercode_old = builder.usercode_old;
image = builder.image;
front_identity_card = builder.front_identity_card;
back_identity_card = builder.back_identity_card;
portrait = builder.portrait;
signature = builder.signature;
images = builder.images;
email = builder.email;
telephone = builder.telephone;
gender = builder.gender;
p_identity_number = builder.p_identity_number;
p_identity_issue_date = builder.p_identity_issue_date;
p_identity_issue_place = builder.p_identity_issue_place;
p_tax_code = builder.p_tax_code;
p_insurance_num = builder.p_insurance_num;
p_belonging_persons = builder.p_belonging_persons;
p_relative_telephone = builder.p_relative_telephone;
p_birthday = builder.p_birthday;
p_place_of_birth = builder.p_place_of_birth;
p_nationality = builder.p_nationality;
p_nation = builder.p_nation;
p_degree = builder.p_degree;
p_re_address = builder.p_re_address;
p_re_province_id = builder.p_re_province_id;
p_re_district_id = builder.p_re_district_id;
p_re_ward_id = builder.p_re_ward_id;
p_so_address = builder.p_so_address;
p_so_province_id = builder.p_so_province_id;
p_so_district_id = builder.p_so_district_id;
p_bi_address = builder.p_bi_address;
p_bi_province_id = builder.p_bi_province_id;
p_bi_district_id = builder.p_bi_district_id;
p_bi_ward_id = builder.p_bi_ward_id;
p_protector = builder.p_protector;
p_bank_holder = builder.p_bank_holder;
p_bank_number = builder.p_bank_number;
p_bank_name = builder.p_bank_name;
user_group_id = builder.user_group_id;
province_id = builder.province_id;
district_id = builder.district_id;
ward_id = builder.ward_id;
address = builder.address;
latitude = builder.latitude;
longitude = builder.longitude;
status = builder.status;
}
public static Builder newBuilder() {
return new Builder();
}
public static Builder newBuilder(User copy) {
Builder builder = new Builder();
builder.user_id = copy.user_id;
builder.username = copy.username;
builder.fullname = copy.fullname;
builder.workplace = copy.workplace;
builder.p_re_ward = copy.p_re_ward;
builder.p_re_district = copy.p_re_district;
builder.p_re_province = copy.p_re_province;
builder.p_so_ward = copy.p_so_ward;
builder.p_so_district = copy.p_so_district;
builder.p_so_province = copy.p_so_province;
builder.p_bi_ward = copy.p_bi_ward;
builder.p_bi_district = copy.p_bi_district;
builder.p_bi_province = copy.p_bi_province;
builder.p_place_of_birth_id = copy.p_place_of_birth_id;
builder.p_identity_issue_place_id = copy.p_identity_issue_place_id;
builder.usercode = copy.usercode;
builder.usercode_old = copy.usercode_old;
builder.image = copy.image;
builder.front_identity_card = copy.front_identity_card;
builder.back_identity_card = copy.back_identity_card;
builder.portrait = copy.portrait;
builder.signature = copy.signature;
builder.images = copy.images;
builder.email = copy.email;
builder.telephone = copy.telephone;
builder.gender = copy.gender;
builder.p_identity_number = copy.p_identity_number;
builder.p_identity_issue_date = copy.p_identity_issue_date;
builder.p_identity_issue_place = copy.p_identity_issue_place;
builder.p_tax_code = copy.p_tax_code;
builder.p_insurance_num = copy.p_insurance_num;
builder.p_belonging_persons = copy.p_belonging_persons;
builder.p_relative_telephone = copy.p_relative_telephone;
builder.p_birthday = copy.p_birthday;
builder.p_place_of_birth = copy.p_place_of_birth;
builder.p_nationality = copy.p_nationality;
builder.p_nation = copy.p_nation;
builder.p_degree = copy.p_degree;
builder.p_re_address = copy.p_re_address;
builder.p_re_province_id = copy.p_re_province_id;
builder.p_re_district_id = copy.p_re_district_id;
builder.p_re_ward_id = copy.p_re_ward_id;
builder.p_so_address = copy.p_so_address;
builder.p_so_province_id = copy.p_so_province_id;
builder.p_so_district_id = copy.p_so_district_id;
builder.p_bi_address = copy.p_bi_address;
builder.p_bi_province_id = copy.p_bi_province_id;
builder.p_bi_district_id = copy.p_bi_district_id;
builder.p_bi_ward_id = copy.p_bi_ward_id;
builder.p_protector = copy.p_protector;
builder.p_bank_holder = copy.p_bank_holder;
builder.p_bank_number = copy.p_bank_number;
builder.p_bank_name = copy.p_bank_name;
builder.user_group_id = copy.user_group_id;
builder.province_id = copy.province_id;
builder.district_id = copy.district_id;
builder.ward_id = copy.ward_id;
builder.address = copy.address;
builder.latitude = copy.latitude;
builder.longitude = copy.longitude;
builder.status = copy.status;
return builder;
}
/**
* {@code User} builder static inner class.
*/
public static final class Builder {
private String user_id;
private String username;
private String fullname;
private String workplace;
private String p_re_ward;
private String p_re_district;
private String p_re_province;
private String p_so_ward;
private String p_so_district;
private String p_so_province;
private String p_bi_ward;
private String p_bi_district;
private String p_bi_province;
private String p_place_of_birth_id;
private String p_identity_issue_place_id;
private String usercode;
private String usercode_old;
private String image;
private String front_identity_card;
private String back_identity_card;
private String portrait;
private String signature;
private String images;
private String email;
private String telephone;
private String gender;
private String p_identity_number;
private String p_identity_issue_date;
private String p_identity_issue_place;
private String p_tax_code;
private String p_insurance_num;
private String p_belonging_persons;
private String p_relative_telephone;
private String p_birthday;
private String p_place_of_birth;
private String p_nationality;
private String p_nation;
private String p_degree;
private String p_re_address;
private String p_re_province_id;
private String p_re_district_id;
private String p_re_ward_id;
private String p_so_address;
private String p_so_province_id;
private String p_so_district_id;
private String p_bi_address;
private String p_bi_province_id;
private String p_bi_district_id;
private String p_bi_ward_id;
private String p_protector;
private String p_bank_holder;
private String p_bank_number;
private String p_bank_name;
private String user_group_id;
private String province_id;
private String district_id;
private String ward_id;
private String address;
private String latitude;
private String longitude;
private int status;
private Builder() {
}
/**
* Sets the {@code user_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param user_id the {@code user_id} to set
* @return a reference to this Builder
*/
public Builder user_id(String user_id) {
this.user_id = user_id;
return this;
}
/**
* Sets the {@code username} and returns a reference to this Builder so that the methods can be chained together.
*
* @param username the {@code username} to set
* @return a reference to this Builder
*/
public Builder username(String username) {
this.username = username;
return this;
}
/**
* Sets the {@code fullname} and returns a reference to this Builder so that the methods can be chained together.
*
* @param fullname the {@code fullname} to set
* @return a reference to this Builder
*/
public Builder fullname(String fullname) {
this.fullname = fullname;
return this;
}
/**
* Sets the {@code workplace} and returns a reference to this Builder so that the methods can be chained together.
*
* @param workplace the {@code workplace} to set
* @return a reference to this Builder
*/
public Builder workplace(String workplace) {
this.workplace = workplace;
return this;
}
/**
* Sets the {@code p_re_ward} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_re_ward the {@code p_re_ward} to set
* @return a reference to this Builder
*/
public Builder p_re_ward(String p_re_ward) {
this.p_re_ward = p_re_ward;
return this;
}
/**
* Sets the {@code p_re_district} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_re_district the {@code p_re_district} to set
* @return a reference to this Builder
*/
public Builder p_re_district(String p_re_district) {
this.p_re_district = p_re_district;
return this;
}
/**
* Sets the {@code p_re_province} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_re_province the {@code p_re_province} to set
* @return a reference to this Builder
*/
public Builder p_re_province(String p_re_province) {
this.p_re_province = p_re_province;
return this;
}
/**
* Sets the {@code p_so_ward} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_so_ward the {@code p_so_ward} to set
* @return a reference to this Builder
*/
public Builder p_so_ward(String p_so_ward) {
this.p_so_ward = p_so_ward;
return this;
}
/**
* Sets the {@code p_so_district} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_so_district the {@code p_so_district} to set
* @return a reference to this Builder
*/
public Builder p_so_district(String p_so_district) {
this.p_so_district = p_so_district;
return this;
}
/**
* Sets the {@code p_so_province} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_so_province the {@code p_so_province} to set
* @return a reference to this Builder
*/
public Builder p_so_province(String p_so_province) {
this.p_so_province = p_so_province;
return this;
}
/**
* Sets the {@code p_bi_ward} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bi_ward the {@code p_bi_ward} to set
* @return a reference to this Builder
*/
public Builder p_bi_ward(String p_bi_ward) {
this.p_bi_ward = p_bi_ward;
return this;
}
/**
* Sets the {@code p_bi_district} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bi_district the {@code p_bi_district} to set
* @return a reference to this Builder
*/
public Builder p_bi_district(String p_bi_district) {
this.p_bi_district = p_bi_district;
return this;
}
/**
* Sets the {@code p_bi_province} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bi_province the {@code p_bi_province} to set
* @return a reference to this Builder
*/
public Builder p_bi_province(String p_bi_province) {
this.p_bi_province = p_bi_province;
return this;
}
/**
* Sets the {@code p_place_of_birth_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_place_of_birth_id the {@code p_place_of_birth_id} to set
* @return a reference to this Builder
*/
public Builder p_place_of_birth_id(String p_place_of_birth_id) {
this.p_place_of_birth_id = p_place_of_birth_id;
return this;
}
/**
* Sets the {@code p_identity_issue_place_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_identity_issue_place_id the {@code p_identity_issue_place_id} to set
* @return a reference to this Builder
*/
public Builder p_identity_issue_place_id(String p_identity_issue_place_id) {
this.p_identity_issue_place_id = p_identity_issue_place_id;
return this;
}
/**
* Sets the {@code usercode} and returns a reference to this Builder so that the methods can be chained together.
*
* @param usercode the {@code usercode} to set
* @return a reference to this Builder
*/
public Builder usercode(String usercode) {
this.usercode = usercode;
return this;
}
/**
* Sets the {@code usercode_old} and returns a reference to this Builder so that the methods can be chained together.
*
* @param usercode_old the {@code usercode_old} to set
* @return a reference to this Builder
*/
public Builder usercode_old(String usercode_old) {
this.usercode_old = usercode_old;
return this;
}
/**
* Sets the {@code image} and returns a reference to this Builder so that the methods can be chained together.
*
* @param image the {@code image} to set
* @return a reference to this Builder
*/
public Builder image(String image) {
this.image = image;
return this;
}
/**
* Sets the {@code front_identity_card} and returns a reference to this Builder so that the methods can be chained together.
*
* @param front_identity_card the {@code front_identity_card} to set
* @return a reference to this Builder
*/
public Builder front_identity_card(String front_identity_card) {
this.front_identity_card = front_identity_card;
return this;
}
/**
* Sets the {@code back_identity_card} and returns a reference to this Builder so that the methods can be chained together.
*
* @param back_identity_card the {@code back_identity_card} to set
* @return a reference to this Builder
*/
public Builder back_identity_card(String back_identity_card) {
this.back_identity_card = back_identity_card;
return this;
}
/**
* Sets the {@code portrait} and returns a reference to this Builder so that the methods can be chained together.
*
* @param portrait the {@code portrait} to set
* @return a reference to this Builder
*/
public Builder portrait(String portrait) {
this.portrait = portrait;
return this;
}
/**
* Sets the {@code signature} and returns a reference to this Builder so that the methods can be chained together.
*
* @param signature the {@code signature} to set
* @return a reference to this Builder
*/
public Builder signature(String signature) {
this.signature = signature;
return this;
}
/**
* Sets the {@code images} and returns a reference to this Builder so that the methods can be chained together.
*
* @param images the {@code images} to set
* @return a reference to this Builder
*/
public Builder images(String images) {
this.images = images;
return this;
}
/**
* Sets the {@code email} and returns a reference to this Builder so that the methods can be chained together.
*
* @param email the {@code email} to set
* @return a reference to this Builder
*/
public Builder email(String email) {
this.email = email;
return this;
}
/**
* Sets the {@code telephone} and returns a reference to this Builder so that the methods can be chained together.
*
* @param telephone the {@code telephone} to set
* @return a reference to this Builder
*/
public Builder telephone(String telephone) {
this.telephone = telephone;
return this;
}
/**
* Sets the {@code gender} and returns a reference to this Builder so that the methods can be chained together.
*
* @param gender the {@code gender} to set
* @return a reference to this Builder
*/
public Builder gender(String gender) {
this.gender = gender;
return this;
}
/**
* Sets the {@code p_identity_number} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_identity_number the {@code p_identity_number} to set
* @return a reference to this Builder
*/
public Builder p_identity_number(String p_identity_number) {
this.p_identity_number = p_identity_number;
return this;
}
/**
* Sets the {@code p_identity_issue_date} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_identity_issue_date the {@code p_identity_issue_date} to set
* @return a reference to this Builder
*/
public Builder p_identity_issue_date(String p_identity_issue_date) {
this.p_identity_issue_date = p_identity_issue_date;
return this;
}
/**
* Sets the {@code p_identity_issue_place} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_identity_issue_place the {@code p_identity_issue_place} to set
* @return a reference to this Builder
*/
public Builder p_identity_issue_place(String p_identity_issue_place) {
this.p_identity_issue_place = p_identity_issue_place;
return this;
}
/**
* Sets the {@code p_tax_code} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_tax_code the {@code p_tax_code} to set
* @return a reference to this Builder
*/
public Builder p_tax_code(String p_tax_code) {
this.p_tax_code = p_tax_code;
return this;
}
/**
* Sets the {@code p_insurance_num} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_insurance_num the {@code p_insurance_num} to set
* @return a reference to this Builder
*/
public Builder p_insurance_num(String p_insurance_num) {
this.p_insurance_num = p_insurance_num;
return this;
}
/**
* Sets the {@code p_belonging_persons} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_belonging_persons the {@code p_belonging_persons} to set
* @return a reference to this Builder
*/
public Builder p_belonging_persons(String p_belonging_persons) {
this.p_belonging_persons = p_belonging_persons;
return this;
}
/**
* Sets the {@code p_relative_telephone} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_relative_telephone the {@code p_relative_telephone} to set
* @return a reference to this Builder
*/
public Builder p_relative_telephone(String p_relative_telephone) {
this.p_relative_telephone = p_relative_telephone;
return this;
}
/**
* Sets the {@code p_birthday} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_birthday the {@code p_birthday} to set
* @return a reference to this Builder
*/
public Builder p_birthday(String p_birthday) {
this.p_birthday = p_birthday;
return this;
}
/**
* Sets the {@code p_place_of_birth} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_place_of_birth the {@code p_place_of_birth} to set
* @return a reference to this Builder
*/
public Builder p_place_of_birth(String p_place_of_birth) {
this.p_place_of_birth = p_place_of_birth;
return this;
}
/**
* Sets the {@code p_nationality} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_nationality the {@code p_nationality} to set
* @return a reference to this Builder
*/
public Builder p_nationality(String p_nationality) {
this.p_nationality = p_nationality;
return this;
}
/**
* Sets the {@code p_nation} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_nation the {@code p_nation} to set
* @return a reference to this Builder
*/
public Builder p_nation(String p_nation) {
this.p_nation = p_nation;
return this;
}
/**
* Sets the {@code p_degree} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_degree the {@code p_degree} to set
* @return a reference to this Builder
*/
public Builder p_degree(String p_degree) {
this.p_degree = p_degree;
return this;
}
/**
* Sets the {@code p_re_address} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_re_address the {@code p_re_address} to set
* @return a reference to this Builder
*/
public Builder p_re_address(String p_re_address) {
this.p_re_address = p_re_address;
return this;
}
/**
* Sets the {@code p_re_province_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_re_province_id the {@code p_re_province_id} to set
* @return a reference to this Builder
*/
public Builder p_re_province_id(String p_re_province_id) {
this.p_re_province_id = p_re_province_id;
return this;
}
/**
* Sets the {@code p_re_district_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_re_district_id the {@code p_re_district_id} to set
* @return a reference to this Builder
*/
public Builder p_re_district_id(String p_re_district_id) {
this.p_re_district_id = p_re_district_id;
return this;
}
/**
* Sets the {@code p_re_ward_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_re_ward_id the {@code p_re_ward_id} to set
* @return a reference to this Builder
*/
public Builder p_re_ward_id(String p_re_ward_id) {
this.p_re_ward_id = p_re_ward_id;
return this;
}
/**
* Sets the {@code p_so_address} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_so_address the {@code p_so_address} to set
* @return a reference to this Builder
*/
public Builder p_so_address(String p_so_address) {
this.p_so_address = p_so_address;
return this;
}
/**
* Sets the {@code p_so_province_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_so_province_id the {@code p_so_province_id} to set
* @return a reference to this Builder
*/
public Builder p_so_province_id(String p_so_province_id) {
this.p_so_province_id = p_so_province_id;
return this;
}
/**
* Sets the {@code p_so_district_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_so_district_id the {@code p_so_district_id} to set
* @return a reference to this Builder
*/
public Builder p_so_district_id(String p_so_district_id) {
this.p_so_district_id = p_so_district_id;
return this;
}
/**
* Sets the {@code p_bi_address} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bi_address the {@code p_bi_address} to set
* @return a reference to this Builder
*/
public Builder p_bi_address(String p_bi_address) {
this.p_bi_address = p_bi_address;
return this;
}
/**
* Sets the {@code p_bi_province_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bi_province_id the {@code p_bi_province_id} to set
* @return a reference to this Builder
*/
public Builder p_bi_province_id(String p_bi_province_id) {
this.p_bi_province_id = p_bi_province_id;
return this;
}
/**
* Sets the {@code p_bi_district_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bi_district_id the {@code p_bi_district_id} to set
* @return a reference to this Builder
*/
public Builder p_bi_district_id(String p_bi_district_id) {
this.p_bi_district_id = p_bi_district_id;
return this;
}
/**
* Sets the {@code p_bi_ward_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bi_ward_id the {@code p_bi_ward_id} to set
* @return a reference to this Builder
*/
public Builder p_bi_ward_id(String p_bi_ward_id) {
this.p_bi_ward_id = p_bi_ward_id;
return this;
}
/**
* Sets the {@code p_protector} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_protector the {@code p_protector} to set
* @return a reference to this Builder
*/
public Builder p_protector(String p_protector) {
this.p_protector = p_protector;
return this;
}
/**
* Sets the {@code p_bank_holder} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bank_holder the {@code p_bank_holder} to set
* @return a reference to this Builder
*/
public Builder p_bank_holder(String p_bank_holder) {
this.p_bank_holder = p_bank_holder;
return this;
}
/**
* Sets the {@code p_bank_number} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bank_number the {@code p_bank_number} to set
* @return a reference to this Builder
*/
public Builder p_bank_number(String p_bank_number) {
this.p_bank_number = p_bank_number;
return this;
}
/**
* Sets the {@code p_bank_name} and returns a reference to this Builder so that the methods can be chained together.
*
* @param p_bank_name the {@code p_bank_name} to set
* @return a reference to this Builder
*/
public Builder p_bank_name(String p_bank_name) {
this.p_bank_name = p_bank_name;
return this;
}
/**
* Sets the {@code user_group_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param user_group_id the {@code user_group_id} to set
* @return a reference to this Builder
*/
public Builder user_group_id(String user_group_id) {
this.user_group_id = user_group_id;
return this;
}
/**
* Sets the {@code province_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param province_id the {@code province_id} to set
* @return a reference to this Builder
*/
public Builder province_id(String province_id) {
this.province_id = province_id;
return this;
}
/**
* Sets the {@code district_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param district_id the {@code district_id} to set
* @return a reference to this Builder
*/
public Builder district_id(String district_id) {
this.district_id = district_id;
return this;
}
/**
* Sets the {@code ward_id} and returns a reference to this Builder so that the methods can be chained together.
*
* @param ward_id the {@code ward_id} to set
* @return a reference to this Builder
*/
public Builder ward_id(String ward_id) {
this.ward_id = ward_id;
return this;
}
/**
* Sets the {@code address} and returns a reference to this Builder so that the methods can be chained together.
*
* @param address the {@code address} to set
* @return a reference to this Builder
*/
public Builder address(String address) {
this.address = address;
return this;
}
/**
* Sets the {@code latitude} and returns a reference to this Builder so that the methods can be chained together.
*
* @param latitude the {@code latitude} to set
* @return a reference to this Builder
*/
public Builder latitude(String latitude) {
this.latitude = latitude;
return this;
}
/**
* Sets the {@code longitude} and returns a reference to this Builder so that the methods can be chained together.
*
* @param longitude the {@code longitude} to set
* @return a reference to this Builder
*/
public Builder longitude(String longitude) {
this.longitude = longitude;
return this;
}
/**
* Sets the {@code status} and returns a reference to this Builder so that the methods can be chained together.
*
* @param status the {@code status} to set
* @return a reference to this Builder
*/
public Builder status(int status) {
this.status = status;
return this;
}
/**
* Returns a {@code User} built from the parameters previously set.
*
* @return a {@code User} built with parameters of this {@code User.Builder}
*/
public User build() {
return new User(this);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment