1 package org.itracker.web.ptos; 2 3 import org.itracker.model.User; 4 import org.itracker.model.util.UserUtilities; 5 6 import java.util.Date; 7 8 public class UserPTO { 9 private User user; 10 private Date lastAccess; 11 12 public UserPTO(User user, Date lastAccess) { 13 this.user = user; 14 this.lastAccess = lastAccess; 15 } 16 17 public User getUser() { 18 return user; 19 } 20 21 public boolean isStatusLocked() { 22 return (user.getStatus() == UserUtilities.STATUS_LOCKED); 23 } 24 25 public boolean isRegisrationTypeSelf() { 26 return (user.getRegistrationType() == UserUtilities.REGISTRATION_TYPE_SELF); 27 } 28 29 public Date getLastAccess() { 30 return lastAccess; 31 } 32 }