Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package jp.co.tarcoiz.security;
- import java.util.ArrayList;
- import org.springframework.security.core.GrantedAuthority;
- import org.springframework.security.core.userdetails.User;
- import jp.co.tarcoiz.model.Person;
- /**
- * ログイン認証ユーザEntity.
- */
- public class UserInfo extends User {
- private static final long serialVersionUID = 1L;
- // 人物ID
- public Integer personId;
- // ログインID
- public String username;
- // パスワード
- public String password;
- // ユーザ名
- public String personname;
- // ロールID
- public Integer role;
- public UserInfo(Person person) {
- super(person.getLoginId(), person.getPassword(), true, true, true, true, new ArrayList<GrantedAuthority>());
- personId = person.getPersonId();
- username = person.getLoginId();
- password = person.getPassword();
- personname = person.getName();
- role = person.getRoleId();
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getPersonname() {
- return personname;
- }
- public void setPersonname(String personname) {
- this.personname = personname;
- }
- public Integer getRole() {
- return role;
- }
- public void setRole(Integer role) {
- this.role = role;
- }
- public Integer getPersonId() {
- return personId;
- }
- public void setPersonId(Integer personId) {
- this.personId = personId;
- }
- }
Add Comment
Please, Sign In to add comment