Advertisement
Guest User

Untitled

a guest
May 18th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.93 KB | None | 0 0
  1. package datastore;
  2.  
  3. import javax.jdo.annotations.IdGeneratorStrategy;
  4. import javax.jdo.annotations.IdentityType;
  5. import javax.jdo.annotations.PersistenceCapable;
  6. import javax.jdo.annotations.Persistent;
  7. import javax.jdo.annotations.PrimaryKey;
  8. import javax.jdo.annotations.Unique;
  9.  
  10. import org.compass.annotations.Searchable;
  11. import org.compass.annotations.SearchableId;
  12. import org.compass.annotations.SearchableProperty;
  13.  
  14. import com.google.appengine.api.datastore.Blob;
  15.  
  16. @Searchable
  17. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  18. public class User {
  19.    
  20.     @PrimaryKey
  21.     @SearchableId
  22.     @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  23.     private Long userID;
  24.    
  25.     @Persistent
  26.     @SearchableProperty
  27.     private String username;
  28.    
  29.     @Persistent
  30.     private String password;
  31.    
  32.     @Persistent
  33.     @SearchableProperty
  34.     private String firstname;
  35.    
  36.     @Persistent
  37.     @SearchableProperty
  38.     private String lastname;
  39.    
  40.     @Persistent
  41.     @Unique
  42.     @SearchableProperty
  43.     private String email;
  44.    
  45.     @Persistent
  46.     private String birthdate;
  47.    
  48.     @Persistent
  49.     private String gender;
  50.    
  51.     @Persistent
  52.     private String bio;
  53.    
  54.     @Persistent
  55.     @SearchableProperty
  56.     private String location;
  57.    
  58.     @Persistent
  59.     private Blob image;
  60.    
  61.  
  62.    
  63.     public User (String username,String password, String firstname, String lastname,
  64.             String email,String birthdate,String gender,String bio,String location ){
  65.         this.username=username;
  66.         this.password=password;
  67.         this.firstname=firstname;
  68.         this.lastname=lastname;
  69.         this.email=email;
  70.         this.birthdate=birthdate;
  71.         this.gender=gender;
  72.         this.bio=bio;
  73.         this.location=location;
  74.     }
  75.    
  76.     public String getUserName() {
  77.         return username;
  78.     }
  79.     public void setUserName(String username) {
  80.         this.username = username;
  81.     }
  82.    
  83.     public Long getUserID() {
  84.         return userID;
  85.     }
  86.    
  87.     public void setFirstname(String firstname) {
  88.         this.firstname = firstname;
  89.     }
  90.     public String getFirstname() {
  91.         return firstname;
  92.     }
  93.     public void setLastname(String lastname) {
  94.         this.lastname = lastname;
  95.     }
  96.     public String getLastname() {
  97.         return lastname;
  98.     }
  99.     public void setEmail(String email) {
  100.         this.email = email;
  101.     }
  102.     public String getEmail() {
  103.         return email;
  104.     }
  105.     public void setBirthdate(String birthdate) {
  106.         this.birthdate = birthdate;
  107.     }
  108.     public String getBirthdate() {
  109.         return birthdate;
  110.     }
  111.     public void setGender(String gender) {
  112.         this.gender = gender;
  113.     }
  114.     public String getGender() {
  115.         return gender;
  116.     }
  117.    
  118.     public void setBio(String bio) {
  119.         this.bio = bio;
  120.     }
  121.     public String getBio() {
  122.         return bio;
  123.     }
  124.    
  125.     public void setLocation(String location) {
  126.         this.location = location;
  127.     }
  128.     public String getLocation() {
  129.         return location;
  130.     }
  131.    
  132.    
  133.     public void setPassword(String password) {
  134.         this.password = password;
  135.     }
  136.     public String getPassword() {
  137.         return password;
  138.     }
  139.    
  140.     public Blob getPicture() {
  141.         return image;
  142.     }
  143.     public void setPicture(Blob image) {
  144.         this.image = image;
  145.     }
  146.  
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement