|
|
|
@ -1,9 +1,13 @@
|
|
|
|
|
package info.bukova.isspst.data;
|
|
|
|
|
|
|
|
|
|
import info.bukova.isspst.StringUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import org.hibernate.annotations.Cache;
|
|
|
|
|
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
|
|
|
|
import org.hibernate.search.annotations.Analyze;
|
|
|
|
|
import org.hibernate.search.annotations.Field;
|
|
|
|
|
import org.hibernate.search.annotations.Index;
|
|
|
|
|
import org.hibernate.search.annotations.Indexed;
|
|
|
|
|
import org.springframework.security.core.userdetails.UserDetails;
|
|
|
|
|
|
|
|
|
|
import javax.persistence.Column;
|
|
|
|
|
import javax.persistence.Embedded;
|
|
|
|
@ -13,16 +17,13 @@ import javax.persistence.JoinColumn;
|
|
|
|
|
import javax.persistence.JoinTable;
|
|
|
|
|
import javax.persistence.ManyToMany;
|
|
|
|
|
import javax.persistence.Table;
|
|
|
|
|
|
|
|
|
|
import org.hibernate.search.annotations.Analyze;
|
|
|
|
|
import org.hibernate.search.annotations.Field;
|
|
|
|
|
import org.hibernate.search.annotations.Index;
|
|
|
|
|
import org.hibernate.search.annotations.Indexed;
|
|
|
|
|
import org.springframework.security.core.userdetails.UserDetails;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Entity
|
|
|
|
|
@Table(name="USER")
|
|
|
|
|
@Indexed
|
|
|
|
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
|
|
public class User extends Member implements UserDetails, DataModel {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -50,6 +51,7 @@ public class User extends Member implements UserDetails, DataModel {
|
|
|
|
|
private boolean notify;
|
|
|
|
|
@ManyToMany(fetch=FetchType.EAGER)
|
|
|
|
|
@JoinTable(name="USER_ROLE", joinColumns={@JoinColumn(name="USER_ID")}, inverseJoinColumns={@JoinColumn(name="ROLE_ID")})
|
|
|
|
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
|
|
|
|
private List<Role> authorities;
|
|
|
|
|
@Column(name="SETTINGS", length=1048576)
|
|
|
|
|
private String settings;
|
|
|
|
|