2013-03-20 20:33:42 +01:00
|
|
|
package com.commafeed.model;
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
|
|
import javax.persistence.Column;
|
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
|
import javax.persistence.GeneratedValue;
|
|
|
|
|
import javax.persistence.GenerationType;
|
|
|
|
|
import javax.persistence.Id;
|
|
|
|
|
import javax.persistence.Table;
|
|
|
|
|
|
|
|
|
|
@Entity
|
|
|
|
|
@Table(name = "USERS")
|
2013-03-21 08:55:53 +01:00
|
|
|
@SuppressWarnings("serial")
|
2013-03-20 20:33:42 +01:00
|
|
|
public class User implements Serializable {
|
|
|
|
|
|
|
|
|
|
@Id
|
|
|
|
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
|
|
|
|
private Long id;
|
|
|
|
|
|
|
|
|
|
@Column(length = 32)
|
|
|
|
|
private String name;
|
|
|
|
|
|
|
|
|
|
@Column(length = 256)
|
|
|
|
|
private byte[] password;
|
|
|
|
|
|
|
|
|
|
@Column(length = 8)
|
|
|
|
|
private byte[] salt;
|
|
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setName(String name) {
|
|
|
|
|
this.name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public byte[] getPassword() {
|
|
|
|
|
return password;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setPassword(byte[] password) {
|
|
|
|
|
this.password = password;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Long getId() {
|
|
|
|
|
return id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setId(Long id) {
|
|
|
|
|
this.id = id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public byte[] getSalt() {
|
|
|
|
|
return salt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setSalt(byte[] salt) {
|
|
|
|
|
this.salt = salt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|