use of org.jaffa.applications.jaffa.modules.user.domain.UserRequest in project jaffa-framework by jaffa-projects.
the class UserMaintenanceComponent method display.
public FormKey display() throws ApplicationExceptions, FrameworkException {
if (this.getSecurityQuestion() == null) {
this.setSecurityQuestion(new Long("1"));
} else {
this.setSecurityQuestion1("" + this.getSecurityQuestion());
}
if (getRequestId() != null && getRequestId().length() > 0) {
UOW uow = new UOW();
UserRequest userRequest = new UserRequest();
Criteria criteria = new Criteria();
criteria.setTable(UserRequestMeta.getName());
criteria.addCriteria(UserRequestMeta.REQUEST_ID, getRequestId());
Iterator itr = uow.query(criteria).iterator();
if (itr.hasNext())
userRequest = (UserRequest) itr.next();
this.setFirstName(userRequest.getFirstName());
this.setPassword1(userRequest.getPassword());
this.setPassword2(userRequest.getPassword());
this.setLastName(userRequest.getLastName());
this.setEMailAddress(userRequest.getEMailAddress());
this.setSecurityQuestion(userRequest.getSecurityQuestion());
this.setSecurityQuestion1("" + userRequest.getSecurityQuestion());
this.setSecurityAnswer(userRequest.getSecurityAnswer());
this.setUserName(userRequest.getUserName());
uow.rollback();
}
return super.display();
}
Aggregations