Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.org.domains;
- import java.util.Hashtable;
- import org.ksoap2.serialization.KvmSerializable;
- import org.ksoap2.serialization.PropertyInfo;
- public class User implements KvmSerializable {
- public int user_id;
- public String username;
- public String email;
- public String password;
- public String salt;
- public String id_card;
- public String fullname;
- public String birthdate;
- public String gender;
- public String address;
- public String country;
- public String location;
- public String zipcode;
- public String mobile;
- public int is_active;
- public int is_lock;
- public String active_token;
- public String created_date;
- public double point;
- public double gold;
- public int level;
- public int level_point;
- public User() {
- }
- public Object getProperty(int index) {
- switch (index) {
- case 0:
- return user_id;
- case 1:
- return username;
- case 2:
- return email;
- case 3:
- return password;
- case 4:
- return salt;
- case 5:
- return id_card;
- case 6:
- return fullname;
- case 7:
- return birthdate;
- case 8:
- return gender;
- case 9:
- return address;
- case 10:
- return country;
- case 11:
- return location;
- case 12:
- return zipcode;
- case 13:
- return mobile;
- case 14:
- return is_active;
- case 15:
- return is_lock;
- case 16:
- return active_token;
- case 17:
- return created_date;
- case 18:
- return point;
- case 19:
- return gold;
- case 20:
- return level;
- case 21:
- return level_point;
- default:
- return null;
- }
- }
- public int getPropertyCount() {
- return 22;
- }
- public void getPropertyInfo(int index, Hashtable arg1, PropertyInfo info) {
- switch (index) {
- case 0:
- info.type = PropertyInfo.INTEGER_CLASS;
- info.name = "user_id";
- break;
- case 1:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "username";
- break;
- case 2:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "email";
- break;
- case 3:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "password";
- break;
- case 4:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "salt";
- break;
- case 5:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "id_card";
- break;
- case 6:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "fullname";
- break;
- case 7:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "birthdate";
- break;
- case 8:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "gender";
- break;
- case 9:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "address";
- break;
- case 10:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "country";
- break;
- case 11:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "location";
- break;
- case 12:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "zipcode";
- break;
- case 13:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "mobile";
- break;
- case 14:
- info.type = PropertyInfo.INTEGER_CLASS;
- info.name = "is_active";
- break;
- case 15:
- info.type = PropertyInfo.INTEGER_CLASS;
- info.name = "is_lock";
- break;
- case 16:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "active_token";
- break;
- case 17:
- info.type = PropertyInfo.STRING_CLASS;
- info.name = "created_date";
- break;
- case 18:
- info.type = Double.class;
- info.name = "point";
- break;
- case 19:
- info.type = Double.class;
- info.name = "gold";
- break;
- case 20:
- info.type = PropertyInfo.INTEGER_CLASS;
- info.name = "level";
- break;
- case 21:
- info.type = PropertyInfo.INTEGER_CLASS;
- info.name = "level_point";
- break;
- default:
- break;
- }
- }
- public void setProperty(int index, Object value) {
- if(null == value)
- value = "";
- switch (index) {
- case 0:
- user_id = Integer.parseInt(value.toString());
- break;
- case 1:
- username = value.toString();
- break;
- case 2:
- email = value.toString();
- break;
- case 3:
- password = value.toString();
- break;
- case 4:
- salt = value.toString();
- break;
- case 5:
- id_card = value.toString();
- break;
- case 6:
- fullname = value.toString();
- break;
- case 7:
- birthdate = value.toString();
- break;
- case 8:
- gender = value.toString();
- break;
- case 9:
- address = value.toString();
- break;
- case 10:
- country = value.toString();
- break;
- case 11:
- location = value.toString();
- break;
- case 12:
- zipcode = value.toString();
- break;
- case 13:
- mobile = value.toString();
- break;
- case 14:
- is_active = Integer.parseInt(value.toString());
- break;
- case 15:
- is_lock = Integer.parseInt(value.toString());
- break;
- case 16:
- active_token = value.toString();
- break;
- case 17:
- created_date = value.toString();
- break;
- case 18:
- point = Double.parseDouble(value.toString());
- break;
- case 19:
- gold = Double.parseDouble(value.toString());
- break;
- case 20:
- level = Integer.parseInt(value.toString());
- break;
- case 21:
- level_point = Integer.parseInt(value.toString());
- break;
- default:
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement