package at.gv.egovernment.moa.id.configuration.data; import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase; import at.gv.egovernment.moa.util.MiscUtil; import at.gv.util.data.BPK; public class UserDatabaseFrom { private String bpk; private String familyName; private String givenName; private String institut; private String mail; private String phone; private String username; private String password; private String password_second; private boolean active = false; private boolean admin = false; private boolean passwordActive; private String userID = null; public UserDatabaseFrom() { } public UserDatabaseFrom(UserDatabase db) { bpk = db.getBpk(); familyName = db.getFamilyname(); givenName = db.getGivenname(); institut = db.getInstitut(); mail = db.getMail(); phone = db.getPhone(); username = db.getUsername(); if (MiscUtil.isNotEmpty(db.getPassword())) passwordActive = true; else passwordActive = false; active = db.isIsActive(); admin = db.isIsAdmin(); userID = String.valueOf(db.getHjid()); } /** * @return the bpk */ public String getBpk() { return bpk; } /** * @param bpk the bpk to set */ public void setBpk(String bpk) { this.bpk = bpk; } /** * @return the familyName */ public String getFamilyName() { return familyName; } /** * @param familyName the familyName to set */ public void setFamilyName(String familyName) { this.familyName = familyName; } /** * @return the givenName */ public String getGivenName() { return givenName; } /** * @param givenName the givenName to set */ public void setGivenName(String givenName) { this.givenName = givenName; } /** * @return the institut */ public String getInstitut() { return institut; } /** * @param institut the institut to set */ public void setInstitut(String institut) { this.institut = institut; } /** * @return the mail */ public String getMail() { return mail; } /** * @param mail the mail to set */ public void setMail(String mail) { this.mail = mail; } /** * @return the phone */ public String getPhone() { return phone; } /** * @param phone the phone to set */ public void setPhone(String phone) { this.phone = phone; } /** * @return the username */ public String getUsername() { return username; } /** * @param username the username to set */ public void setUsername(String username) { this.username = username; } /** * @return the password */ public String getPassword() { return password; } /** * @param password the password to set */ public void setPassword(String password) { this.password = password; } /** * @return the active */ public boolean isActive() { return active; } /** * @param active the active to set */ public void setActive(boolean active) { this.active = active; } /** * @return the admin */ public boolean isAdmin() { return admin; } /** * @param admin the admin to set */ public void setAdmin(boolean admin) { this.admin = admin; } /** * @return the passwordActive */ public boolean isPasswordActive() { return passwordActive; } /** * @param passwordActive the passwordActive to set */ public void setPasswordActive(boolean passwordActive) { this.passwordActive = passwordActive; } /** * @return the userID */ public String getUserID() { return userID; } /** * @param userID the userID to set */ public void setUserID(String userID) { this.userID = userID; } /** * @return the password_second */ public String getPassword_second() { return password_second; } /** * @param password_second the password_second to set */ public void setPassword_second(String password_second) { this.password_second = password_second; } }