Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package datastore;
- import javax.jdo.annotations.IdGeneratorStrategy;
- import javax.jdo.annotations.IdentityType;
- import javax.jdo.annotations.PersistenceCapable;
- import javax.jdo.annotations.Persistent;
- import javax.jdo.annotations.PrimaryKey;
- import javax.jdo.annotations.Unique;
- import org.compass.annotations.Searchable;
- import org.compass.annotations.SearchableId;
- import org.compass.annotations.SearchableProperty;
- import com.google.appengine.api.datastore.Blob;
- @Searchable
- @PersistenceCapable(identityType = IdentityType.APPLICATION)
- public class User {
- @PrimaryKey
- @SearchableId
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- private Long userID;
- @Persistent
- @SearchableProperty
- private String username;
- @Persistent
- private String password;
- @Persistent
- @SearchableProperty
- private String firstname;
- @Persistent
- @SearchableProperty
- private String lastname;
- @Persistent
- @Unique
- @SearchableProperty
- private String email;
- @Persistent
- private String birthdate;
- @Persistent
- private String gender;
- @Persistent
- private String bio;
- @Persistent
- @SearchableProperty
- private String location;
- @Persistent
- private Blob image;
- public User (String username,String password, String firstname, String lastname,
- String email,String birthdate,String gender,String bio,String location ){
- this.username=username;
- this.password=password;
- this.firstname=firstname;
- this.lastname=lastname;
- this.email=email;
- this.birthdate=birthdate;
- this.gender=gender;
- this.bio=bio;
- this.location=location;
- }
- public String getUserName() {
- return username;
- }
- public void setUserName(String username) {
- this.username = username;
- }
- public Long getUserID() {
- return userID;
- }
- public void setFirstname(String firstname) {
- this.firstname = firstname;
- }
- public String getFirstname() {
- return firstname;
- }
- public void setLastname(String lastname) {
- this.lastname = lastname;
- }
- public String getLastname() {
- return lastname;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public String getEmail() {
- return email;
- }
- public void setBirthdate(String birthdate) {
- this.birthdate = birthdate;
- }
- public String getBirthdate() {
- return birthdate;
- }
- public void setGender(String gender) {
- this.gender = gender;
- }
- public String getGender() {
- return gender;
- }
- public void setBio(String bio) {
- this.bio = bio;
- }
- public String getBio() {
- return bio;
- }
- public void setLocation(String location) {
- this.location = location;
- }
- public String getLocation() {
- return location;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getPassword() {
- return password;
- }
- public Blob getPicture() {
- return image;
- }
- public void setPicture(Blob image) {
- this.image = image;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement