public UserDTO(Users user) { this.username = user.getUsername(); this.email = user.getEmail(); this.firstName = user.getFname(); this.lastName = user.getLname(); this.telephoneNum = user.getMobile(); if (user.getOrganization() != null) { this.orgName = user.getOrganization().getOrgName(); this.dep = user.getOrganization().getDepartment(); } if (user.getAddress() != null) { this.street = user.getAddress().getAddress2(); this.city = user.getAddress().getCity(); this.postCode = user.getAddress().getPostalcode(); this.country = user.getAddress().getCountry(); } this.maxNumProjects = user.getMaxNumProjects(); this.numCreatedProjects = user.getNumCreatedProjects(); this.twoFactor = user.getTwoFactor(); this.toursState = user.getToursState(); this.userAccountType = user.getMode().toString(); this.numActiveProjects = user.getNumActiveProjects(); numRemainingProjects = maxNumProjects-numCreatedProjects; }
user.getAddress().getCountry(), user.getAddress().getCity(), user.getOrganization().getOrgName(), user.getEmail(), user.getOrcid(), user.getAddress().getCountry(), user.getAddress().getCity(), user.getOrganization().getOrgName(), user.getEmail(), user.getOrcid(),