use of org.jaffa.applications.jaffa.modules.user.components.userrequestfinder.dto.UserRequestFinderOutRowDto in project jaffa-framework by jaffa-projects.
the class UserRequestFinderTx method buildDto.
// .//GEN-END:_buildCriteria_3_be
// .//GEN-BEGIN:_buildDto_1_be
private UserRequestFinderOutDto buildDto(UOW uow, Collection results, UserRequestFinderInDto input) throws UOWException {
UserRequestFinderOutDto output = new UserRequestFinderOutDto();
int maxRecords = input.getMaxRecords() != null ? input.getMaxRecords().intValue() : 0;
int counter = 0;
for (Iterator i = results.iterator(); i.hasNext(); ) {
if (++counter > maxRecords && maxRecords > 0) {
output.setMoreRecordsExist(Boolean.TRUE);
break;
}
UserRequestFinderOutRowDto row = new UserRequestFinderOutRowDto();
UserRequest userRequest = (UserRequest) i.next();
// .//GEN-END:_buildDto_1_be
// Add custom code before all the setters //GEN-FIRST:_buildDto_1
// .//GEN-LAST:_buildDto_1
// .//GEN-BEGIN:_buildDto_RequestId_1_be
row.setRequestId(userRequest.getRequestId());
// .//GEN-END:_buildDto_RequestId_1_be
// .//GEN-BEGIN:_buildDto_UserName_1_be
row.setUserName(userRequest.getUserName());
// .//GEN-END:_buildDto_UserName_1_be
// .//GEN-BEGIN:_buildDto_FirstName_1_be
row.setFirstName(userRequest.getFirstName());
// .//GEN-END:_buildDto_FirstName_1_be
// .//GEN-BEGIN:_buildDto_LastName_1_be
row.setLastName(userRequest.getLastName());
// .//GEN-END:_buildDto_LastName_1_be
// .//GEN-BEGIN:_buildDto_Password_1_be
row.setPassword(userRequest.getPassword());
// .//GEN-END:_buildDto_Password_1_be
// .//GEN-BEGIN:_buildDto_EMailAddress_1_be
row.setEMailAddress(userRequest.getEMailAddress());
// .//GEN-END:_buildDto_EMailAddress_1_be
// .//GEN-BEGIN:_buildDto_SecurityQuestion_1_be
row.setSecurityQuestion(userRequest.getSecurityQuestion());
// .//GEN-END:_buildDto_SecurityQuestion_1_be
// .//GEN-BEGIN:_buildDto_SecurityAnswer_1_be
row.setSecurityAnswer(userRequest.getSecurityAnswer());
// .//GEN-END:_buildDto_SecurityAnswer_1_be
// .//GEN-BEGIN:_buildDto_Remarks_1_be
row.setRemarks(userRequest.getRemarks());
// .//GEN-END:_buildDto_Remarks_1_be
// .//GEN-BEGIN:_buildDto_CreatedOn_1_be
row.setCreatedOn(userRequest.getCreatedOn());
// .//GEN-END:_buildDto_CreatedOn_1_be
// .//GEN-BEGIN:_buildDto_ProcessedDatetime_1_be
row.setProcessedDatetime(userRequest.getProcessedDatetime());
// .//GEN-END:_buildDto_ProcessedDatetime_1_be
// .//GEN-BEGIN:_buildDto_ProcessedUserId_1_be
row.setProcessedUserId(userRequest.getProcessedUserId());
// .//GEN-END:_buildDto_ProcessedUserId_1_be
// .//GEN-BEGIN:_buildDto_Status_1_be
row.setStatus(userRequest.getStatus());
// .//GEN-END:_buildDto_Status_1_be
// Add custom code to pass values to the dto //GEN-FIRST:_buildDto_2
// .//GEN-LAST:_buildDto_2
// .//GEN-BEGIN:_buildDto_3_be
output.addRows(row);
}
return output;
}
use of org.jaffa.applications.jaffa.modules.user.components.userrequestfinder.dto.UserRequestFinderOutRowDto in project jaffa-framework by jaffa-projects.
the class UserRequestFinderForm method populateRows.
// .//GEN-END:_doValidate_2_be
// .//GEN-BEGIN:_populateRows_1_be
/**
* This will populate the input GridModel with the data in the finderOutDto of the Component.
* @param rows The GridModel object to populate.
*/
public void populateRows(GridModel rows) {
rows.clearRows();
UserRequestFinderOutDto outputDto = (UserRequestFinderOutDto) ((UserRequestFinderComponent) getComponent()).getFinderOutDto();
if (outputDto != null) {
GridModelRow row;
for (int i = 0; i < outputDto.getRowsCount(); i++) {
UserRequestFinderOutRowDto rowDto = outputDto.getRows(i);
row = rows.newRow();
row.addElement("requestId", rowDto.getRequestId());
row.addElement("userName", rowDto.getUserName());
row.addElement("firstName", rowDto.getFirstName());
row.addElement("lastName", rowDto.getLastName());
row.addElement("password", rowDto.getPassword());
row.addElement("eMailAddress", rowDto.getEMailAddress());
row.addElement("securityQuestion", rowDto.getSecurityQuestion());
row.addElement("securityAnswer", rowDto.getSecurityAnswer());
row.addElement("remarks", rowDto.getRemarks());
row.addElement("createdOn", rowDto.getCreatedOn());
row.addElement("processedDatetime", rowDto.getProcessedDatetime());
row.addElement("processedUserId", rowDto.getProcessedUserId());
row.addElement("status", rowDto.getStatus());
// .//GEN-END:_populateRows_1_be
// Add custom code for the row //GEN-FIRST:_populateRows_1
// .//GEN-LAST:_populateRows_1
// .//GEN-BEGIN:_populateRows_2_be
}
}
}
Aggregations