package entities.security; import java.io.Serializable; import java.util.UUID; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import org.hibernate.annotations.GenericGenerator; import org.hibernate.annotations.Type; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; @Entity @Table(name="\"UserInfo\"") @JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="autoid") public class UserInfo implements Serializable{ private static final long serialVersionUID = 1225151430484658395L; @Id @GeneratedValue @GenericGenerator(name = "uuid2", strategy = "uuid2") @Column(name = "autoid", updatable = false, nullable = false, columnDefinition = "BINARY(16)") private UUID autoid; //required @Column(name = "id") String id = null; @Column(name = "email") String email = null; //non required @Column(name = "\"emailIsVerified\"", nullable = true) Boolean emailIsVerified = null; @Column(name = "name", nullable = true) String name = null; @Column(name = "\"pictureUrl\"", nullable = true) String pictureUrl = null; @Column(name = "locale", nullable = true) String locale = null; @Column(name = "\"familyName\"", nullable = true) String familyName = null; @Column(name = "\"givenName\"", nullable = true) String givenName = null; @Type(type="typedefinition.XMLType") @Column(name = "additionalinfo", columnDefinition = "xml", nullable = true) private String additionalinfo; public UserInfo () {} public UserInfo(String id, String email, Boolean emailIsVerified, String name, String pictureUrl, String locale, String familyName, String givenName, String additionalinfo) { this.id = id; this.email = email; this.emailIsVerified = emailIsVerified; this.name = name; this.pictureUrl = pictureUrl; this.locale = locale; this.familyName = familyName; this.givenName = givenName; this.additionalinfo = additionalinfo; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public boolean isEmailIsVerified() { return emailIsVerified; } public void setEmailIsVerified(boolean emailIsVerified) { this.emailIsVerified = emailIsVerified; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPictureUrl() { return pictureUrl; } public void setPictureUrl(String pictureUrl) { this.pictureUrl = pictureUrl; } public String getLocale() { return locale; } public void setLocale(String locale) { this.locale = locale; } public String getFamilyName() { return familyName; } public void setFamilyName(String familyName) { this.familyName = familyName; } public String getGivenName() { return givenName; } public void setGivenName(String givenName) { this.givenName = givenName; } public Boolean getEmailIsVerified() { return emailIsVerified; } public void setEmailIsVerified(Boolean emailIsVerified) { this.emailIsVerified = emailIsVerified; } public String getAdditionalinfo() { return additionalinfo; } public void setAdditionalinfo(String additionalinfo) { this.additionalinfo = additionalinfo; } @Override public String toString() { return "UserInfo [id=" + id + ", email=" + email + ", emailIsVerified=" + emailIsVerified + ", name=" + name + ", pictureUrl=" + pictureUrl + ", locale=" + locale + ", familyName=" + familyName + ", givenName=" + givenName + ", additionalinfo=" + additionalinfo + "]"; } }