use of org.akaza.openclinica.dao.submit.ItemDataDAO in project OpenClinica by OpenClinica.
the class RemoveCRFServlet method processRequest.
@Override
public void processRequest() throws Exception {
CRFDAO cdao = new CRFDAO(sm.getDataSource());
CRFVersionDAO cvdao = new CRFVersionDAO(sm.getDataSource());
FormProcessor fp = new FormProcessor(request);
// checks which module the requests are from
String module = fp.getString(MODULE);
request.setAttribute(MODULE, module);
int crfId = fp.getInt("id", true);
String action = request.getParameter("action");
if (crfId == 0) {
addPageMessage(respage.getString("please_choose_a_CRF_to_remove"));
forwardPage(Page.CRF_LIST_SERVLET);
} else {
CRFBean crf = (CRFBean) cdao.findByPK(crfId);
ArrayList versions = cvdao.findAllByCRFId(crfId);
crf.setVersions(versions);
EventDefinitionCRFDAO edcdao = new EventDefinitionCRFDAO(sm.getDataSource());
ArrayList edcs = (ArrayList) edcdao.findAllByCRF(crfId);
SectionDAO secdao = new SectionDAO(sm.getDataSource());
EventCRFDAO evdao = new EventCRFDAO(sm.getDataSource());
ArrayList eventCRFs = evdao.findAllByCRF(crfId);
StudyEventDAO seDao = new StudyEventDAO(sm.getDataSource());
StudyEventDefinitionDAO sedDao = new StudyEventDefinitionDAO(sm.getDataSource());
for (Object ecBean : eventCRFs) {
StudyEventBean seBean = (StudyEventBean) seDao.findByPK(((EventCRFBean) ecBean).getStudyEventId());
StudyEventDefinitionBean sedBean = (StudyEventDefinitionBean) sedDao.findByPK(seBean.getStudyEventDefinitionId());
((EventCRFBean) ecBean).setEventName(sedBean.getName());
}
if ("confirm".equalsIgnoreCase(action)) {
request.setAttribute("crfToRemove", crf);
request.setAttribute("eventCRFs", eventCRFs);
forwardPage(Page.REMOVE_CRF);
} else {
logger.info("submit to remove the crf");
crf.setStatus(Status.DELETED);
crf.setUpdater(ub);
crf.setUpdatedDate(new Date());
cdao.update(crf);
for (int i = 0; i < versions.size(); i++) {
CRFVersionBean version = (CRFVersionBean) versions.get(i);
if (!version.getStatus().equals(Status.DELETED)) {
version.setStatus(Status.AUTO_DELETED);
version.setUpdater(ub);
version.setUpdatedDate(new Date());
cvdao.update(version);
ArrayList sections = secdao.findAllByCRFVersionId(version.getId());
for (int j = 0; j < sections.size(); j++) {
SectionBean section = (SectionBean) sections.get(j);
if (!section.getStatus().equals(Status.DELETED)) {
section.setStatus(Status.AUTO_DELETED);
section.setUpdater(ub);
section.setUpdatedDate(new Date());
secdao.update(section);
}
}
}
}
for (int i = 0; i < edcs.size(); i++) {
EventDefinitionCRFBean edc = (EventDefinitionCRFBean) edcs.get(i);
if (!edc.getStatus().equals(Status.DELETED)) {
edc.setStatus(Status.AUTO_DELETED);
edc.setUpdater(ub);
edc.setUpdatedDate(new Date());
edcdao.update(edc);
}
}
ItemDataDAO idao = new ItemDataDAO(sm.getDataSource());
for (int i = 0; i < eventCRFs.size(); i++) {
EventCRFBean eventCRF = (EventCRFBean) eventCRFs.get(i);
if (!eventCRF.getStatus().equals(Status.DELETED)) {
eventCRF.setStatus(Status.AUTO_DELETED);
eventCRF.setUpdater(ub);
eventCRF.setUpdatedDate(new Date());
evdao.update(eventCRF);
ArrayList items = idao.findAllByEventCRFId(eventCRF.getId());
for (int j = 0; j < items.size(); j++) {
ItemDataBean item = (ItemDataBean) items.get(j);
if (!item.getStatus().equals(Status.DELETED)) {
item.setStatus(Status.AUTO_DELETED);
item.setUpdater(ub);
item.setUpdatedDate(new Date());
idao.update(item);
}
}
}
}
addPageMessage(respage.getString("the_CRF") + crf.getName() + " " + respage.getString("has_been_removed_succesfully"));
forwardPage(Page.CRF_LIST_SERVLET);
}
}
}
use of org.akaza.openclinica.dao.submit.ItemDataDAO in project OpenClinica by OpenClinica.
the class SecureController method getNoteInfo.
public DiscrepancyNoteBean getNoteInfo(DiscrepancyNoteBean note) {
StudySubjectDAO ssdao = new StudySubjectDAO(sm.getDataSource());
if ("itemData".equalsIgnoreCase(note.getEntityType())) {
int itemDataId = note.getEntityId();
ItemDataDAO iddao = new ItemDataDAO(sm.getDataSource());
ItemDataBean itemData = (ItemDataBean) iddao.findByPK(itemDataId);
ItemDAO idao = new ItemDAO(sm.getDataSource());
if (StringUtil.isBlank(note.getEntityName())) {
ItemBean item = (ItemBean) idao.findByPK(itemData.getItemId());
note.setEntityName(item.getName());
request.setAttribute("item", item);
}
EventCRFDAO ecdao = new EventCRFDAO(sm.getDataSource());
StudyEventDAO svdao = new StudyEventDAO(sm.getDataSource());
EventCRFBean ec = (EventCRFBean) ecdao.findByPK(itemData.getEventCRFId());
StudyEventBean event = (StudyEventBean) svdao.findByPK(ec.getStudyEventId());
StudyEventDefinitionDAO seddao = new StudyEventDefinitionDAO(sm.getDataSource());
StudyEventDefinitionBean sed = (StudyEventDefinitionBean) seddao.findByPK(event.getStudyEventDefinitionId());
note.setEventName(sed.getName());
note.setEventStart(event.getDateStarted());
CRFDAO cdao = new CRFDAO(sm.getDataSource());
CRFBean crf = cdao.findByVersionId(ec.getCRFVersionId());
note.setCrfName(crf.getName());
note.setEventCRFId(ec.getId());
if (StringUtil.isBlank(note.getSubjectName())) {
StudySubjectBean ss = (StudySubjectBean) ssdao.findByPK(ec.getStudySubjectId());
note.setSubjectName(ss.getName());
}
if (note.getDiscrepancyNoteTypeId() == 0) {
// default
note.setDiscrepancyNoteTypeId(DiscrepancyNoteType.FAILEDVAL.getId());
// value
}
} else if ("eventCrf".equalsIgnoreCase(note.getEntityType())) {
int eventCRFId = note.getEntityId();
EventCRFDAO ecdao = new EventCRFDAO(sm.getDataSource());
StudyEventDAO svdao = new StudyEventDAO(sm.getDataSource());
EventCRFBean ec = (EventCRFBean) ecdao.findByPK(eventCRFId);
StudyEventBean event = (StudyEventBean) svdao.findByPK(ec.getStudyEventId());
StudyEventDefinitionDAO seddao = new StudyEventDefinitionDAO(sm.getDataSource());
StudyEventDefinitionBean sed = (StudyEventDefinitionBean) seddao.findByPK(event.getStudyEventDefinitionId());
note.setEventName(sed.getName());
note.setEventStart(event.getDateStarted());
CRFDAO cdao = new CRFDAO(sm.getDataSource());
CRFBean crf = cdao.findByVersionId(ec.getCRFVersionId());
note.setCrfName(crf.getName());
StudySubjectBean ss = (StudySubjectBean) ssdao.findByPK(ec.getStudySubjectId());
note.setSubjectName(ss.getName());
note.setEventCRFId(ec.getId());
} else if ("studyEvent".equalsIgnoreCase(note.getEntityType())) {
int eventId = note.getEntityId();
StudyEventDAO svdao = new StudyEventDAO(sm.getDataSource());
StudyEventBean event = (StudyEventBean) svdao.findByPK(eventId);
StudyEventDefinitionDAO seddao = new StudyEventDefinitionDAO(sm.getDataSource());
StudyEventDefinitionBean sed = (StudyEventDefinitionBean) seddao.findByPK(event.getStudyEventDefinitionId());
note.setEventName(sed.getName());
note.setEventStart(event.getDateStarted());
StudySubjectBean ss = (StudySubjectBean) ssdao.findByPK(event.getStudySubjectId());
note.setSubjectName(ss.getName());
} else if ("studySub".equalsIgnoreCase(note.getEntityType())) {
int studySubjectId = note.getEntityId();
StudySubjectBean ss = (StudySubjectBean) ssdao.findByPK(studySubjectId);
note.setSubjectName(ss.getName());
} else if ("Subject".equalsIgnoreCase(note.getEntityType())) {
int subjectId = note.getEntityId();
StudySubjectBean ss = ssdao.findBySubjectIdAndStudy(subjectId, currentStudy);
note.setSubjectName(ss.getName());
}
return note;
}
use of org.akaza.openclinica.dao.submit.ItemDataDAO in project OpenClinica by OpenClinica.
the class RemoveCRFVersionServlet method processRequest.
@Override
public void processRequest() throws Exception {
CRFVersionDAO cvdao = new CRFVersionDAO(sm.getDataSource());
FormProcessor fp = new FormProcessor(request);
int versionId = fp.getInt("id", true);
String module = fp.getString("module");
request.setAttribute("module", module);
String action = fp.getString("action");
if (versionId == 0) {
addPageMessage(respage.getString("please_choose_a_CRF_version_to_remove"));
forwardPage(Page.CRF_LIST_SERVLET);
} else {
if (StringUtil.isBlank(action)) {
addPageMessage(respage.getString("no_action_specified"));
forwardPage(Page.CRF_LIST_SERVLET);
return;
}
CRFVersionBean version = (CRFVersionBean) cvdao.findByPK(versionId);
if (!ub.isSysAdmin() && (version.getOwnerId() != ub.getId())) {
addPageMessage(respage.getString("no_have_correct_privilege_current_study") + " " + respage.getString("change_active_study_or_contact"));
forwardPage(Page.MENU_SERVLET);
return;
}
SectionDAO secdao = new SectionDAO(sm.getDataSource());
EventCRFDAO evdao = new EventCRFDAO(sm.getDataSource());
// find all event crfs by version id
ArrayList eventCRFs = evdao.findUndeletedWithStudySubjectsByCRFVersion(versionId);
if ("confirm".equalsIgnoreCase(action)) {
request.setAttribute("versionToRemove", version);
request.setAttribute("eventCRFs", eventCRFs);
forwardPage(Page.REMOVE_CRF_VERSION);
} else {
logger.info("submit to remove the crf version");
// version
version.setStatus(Status.DELETED);
version.setUpdater(ub);
version.setUpdatedDate(new Date());
cvdao.update(version);
// crfs in the second pass
for (int ii = 0; ii < eventCRFs.size(); ii++) {
EventCRFBean ecbean = (EventCRFBean) eventCRFs.get(ii);
ecbean.setStatus(Status.AUTO_DELETED);
ecbean.setUpdater(ub);
ecbean.setUpdatedDate(new Date());
evdao.update(ecbean);
}
// added above tbh 092007, to fix task
// all sections
ArrayList sections = secdao.findAllByCRFVersionId(version.getId());
for (int j = 0; j < sections.size(); j++) {
SectionBean section = (SectionBean) sections.get(j);
if (!section.getStatus().equals(Status.DELETED)) {
section.setStatus(Status.AUTO_DELETED);
section.setUpdater(ub);
section.setUpdatedDate(new Date());
secdao.update(section);
}
}
// all item data related to event crfs
ItemDataDAO idao = new ItemDataDAO(sm.getDataSource());
for (int i = 0; i < eventCRFs.size(); i++) {
EventCRFBean eventCRF = (EventCRFBean) eventCRFs.get(i);
if (!eventCRF.getStatus().equals(Status.DELETED)) {
eventCRF.setStatus(Status.AUTO_DELETED);
eventCRF.setUpdater(ub);
eventCRF.setUpdatedDate(new Date());
evdao.update(eventCRF);
ArrayList items = idao.findAllByEventCRFId(eventCRF.getId());
for (int j = 0; j < items.size(); j++) {
ItemDataBean item = (ItemDataBean) items.get(j);
if (!item.getStatus().equals(Status.DELETED)) {
item.setStatus(Status.AUTO_DELETED);
item.setUpdater(ub);
item.setUpdatedDate(new Date());
idao.update(item);
}
}
}
}
ArrayList versionList = (ArrayList) cvdao.findAllByCRF(version.getCrfId());
if (versionList.size() > 0) {
EventDefinitionCRFDAO edCRFDao = new EventDefinitionCRFDAO(sm.getDataSource());
ArrayList edcList = (ArrayList) edCRFDao.findAllByCRF(version.getCrfId());
for (int i = 0; i < edcList.size(); i++) {
EventDefinitionCRFBean edcBean = (EventDefinitionCRFBean) edcList.get(i);
updateEventDef(edcBean, edCRFDao, versionList);
}
}
addPageMessage(respage.getString("the_CRF") + version.getName() + " " + respage.getString("has_been_removed_succesfully"));
forwardPage(Page.CRF_LIST_SERVLET);
}
}
}
use of org.akaza.openclinica.dao.submit.ItemDataDAO in project OpenClinica by OpenClinica.
the class RestoreSubjectServlet method processRequest.
@Override
public void processRequest() throws Exception {
SubjectDAO sdao = new SubjectDAO(sm.getDataSource());
FormProcessor fp = new FormProcessor(request);
int subjectId = fp.getInt("id");
String action = fp.getString("action");
if (subjectId == 0 || StringUtil.isBlank(action)) {
addPageMessage(respage.getString("please_choose_a_subject_to_restore"));
forwardPage(Page.SUBJECT_LIST_SERVLET);
} else {
SubjectBean subject = (SubjectBean) sdao.findByPK(subjectId);
// find all study subjects
StudySubjectDAO ssdao = new StudySubjectDAO(sm.getDataSource());
ArrayList studySubs = ssdao.findAllBySubjectId(subjectId);
// find study events
StudyEventDAO sedao = new StudyEventDAO(sm.getDataSource());
ArrayList events = sedao.findAllBySubjectId(subjectId);
if ("confirm".equalsIgnoreCase(action)) {
request.setAttribute("subjectToRestore", subject);
request.setAttribute("studySubs", studySubs);
request.setAttribute("events", events);
forwardPage(Page.RESTORE_SUBJECT);
} else {
logger.info("submit to restore the subject");
// change all statuses to AVAILABLE
subject.setStatus(Status.AVAILABLE);
subject.setUpdater(ub);
subject.setUpdatedDate(new Date());
sdao.update(subject);
// remove subject references from study
for (int i = 0; i < studySubs.size(); i++) {
StudySubjectBean studySub = (StudySubjectBean) studySubs.get(i);
if (studySub.getStatus().equals(Status.AUTO_DELETED)) {
studySub.setStatus(Status.AVAILABLE);
studySub.setUpdater(ub);
studySub.setUpdatedDate(new Date());
ssdao.update(studySub);
}
}
EventCRFDAO ecdao = new EventCRFDAO(sm.getDataSource());
for (int j = 0; j < events.size(); j++) {
StudyEventBean event = (StudyEventBean) events.get(j);
if (event.getStatus().equals(Status.AUTO_DELETED)) {
event.setStatus(Status.AVAILABLE);
event.setUpdater(ub);
event.setUpdatedDate(new Date());
sedao.update(event);
ArrayList eventCRFs = ecdao.findAllByStudyEvent(event);
ItemDataDAO iddao = new ItemDataDAO(sm.getDataSource());
for (int k = 0; k < eventCRFs.size(); k++) {
EventCRFBean eventCRF = (EventCRFBean) eventCRFs.get(k);
if (eventCRF.getStatus().equals(Status.AUTO_DELETED)) {
eventCRF.setStatus(Status.AVAILABLE);
eventCRF.setUpdater(ub);
eventCRF.setUpdatedDate(new Date());
ecdao.update(eventCRF);
// restore all the item data
ArrayList itemDatas = iddao.findAllByEventCRFId(eventCRF.getId());
for (int a = 0; a < itemDatas.size(); a++) {
ItemDataBean item = (ItemDataBean) itemDatas.get(a);
if (item.getStatus().equals(Status.AUTO_DELETED)) {
item.setStatus(Status.AVAILABLE);
item.setUpdater(ub);
item.setUpdatedDate(new Date());
iddao.update(item);
}
}
}
}
}
}
String emailBody = respage.getString("the_subject") + subject.getName() + " " + respage.getString("has_been_restored_succesfully");
addPageMessage(emailBody);
// sendEmail(emailBody);
forwardPage(Page.SUBJECT_LIST_SERVLET);
}
}
}
use of org.akaza.openclinica.dao.submit.ItemDataDAO in project OpenClinica by OpenClinica.
the class RestoreStudyServlet method processRequest.
@Override
public void processRequest() throws Exception {
StudyDAO sdao = new StudyDAO(sm.getDataSource());
FormProcessor fp = new FormProcessor(request);
int studyId = fp.getInt("id");
StudyBean study = (StudyBean) sdao.findByPK(studyId);
// find all sites
ArrayList sites = (ArrayList) sdao.findAllByParent(studyId);
// find all user and roles in the study, include ones in sites
UserAccountDAO udao = new UserAccountDAO(sm.getDataSource());
ArrayList userRoles = udao.findAllByStudyId(studyId);
// find all subjects in the study, include ones in sites
StudySubjectDAO ssdao = new StudySubjectDAO(sm.getDataSource());
ArrayList subjects = ssdao.findAllByStudy(study);
// find all events in the study, include ones in sites
StudyEventDefinitionDAO sefdao = new StudyEventDefinitionDAO(sm.getDataSource());
ArrayList definitions = sefdao.findAllByStudy(study);
String action = request.getParameter("action");
if (studyId == 0) {
addPageMessage(respage.getString("please_choose_a_study_to_restore"));
forwardPage(Page.STUDY_LIST_SERVLET);
} else {
if ("confirm".equalsIgnoreCase(action)) {
request.setAttribute("studyToRestore", study);
request.setAttribute("sitesToRestore", sites);
request.setAttribute("userRolesToRestore", userRoles);
request.setAttribute("subjectsToRestore", subjects);
request.setAttribute("definitionsToRRestore", definitions);
forwardPage(Page.RESTORE_STUDY);
} else {
logger.info("submit to restore the study");
// change all statuses to unavailable
StudyDAO studao = new StudyDAO(sm.getDataSource());
study.setStatus(study.getOldStatus());
study.setUpdater(ub);
study.setUpdatedDate(new Date());
studao.update(study);
// YW 09-27-2007 << restore auto-removed sites
for (int i = 0; i < sites.size(); i++) {
StudyBean site = (StudyBean) sites.get(i);
if (site.getStatus() == Status.AUTO_DELETED) {
site.setStatus(site.getOldStatus());
site.setUpdater(ub);
site.setUpdatedDate(new Date());
sdao.update(site);
}
}
// restore all users and roles
for (int i = 0; i < userRoles.size(); i++) {
StudyUserRoleBean role = (StudyUserRoleBean) userRoles.get(i);
if (role.getStatus().equals(Status.AUTO_DELETED)) {
role.setStatus(Status.AVAILABLE);
role.setUpdater(ub);
role.setUpdatedDate(new Date());
udao.updateStudyUserRole(role, role.getUserName());
}
}
// is current active study
if (study.getId() == currentStudy.getId()) {
currentStudy.setStatus(Status.AVAILABLE);
StudyUserRoleBean r = (new UserAccountDAO(sm.getDataSource())).findRoleByUserNameAndStudyId(ub.getName(), currentStudy.getId());
currentRole.setRole(r.getRole());
} else // active site will be restored as well if it was auto-removed
if (currentStudy.getParentStudyId() == study.getId() && currentStudy.getStatus() == Status.AUTO_DELETED) {
currentStudy.setStatus(Status.AVAILABLE);
StudyUserRoleBean r = (new UserAccountDAO(sm.getDataSource())).findRoleByUserNameAndStudyId(ub.getName(), currentStudy.getId());
StudyUserRoleBean rInParent = (new UserAccountDAO(sm.getDataSource())).findRoleByUserNameAndStudyId(ub.getName(), currentStudy.getParentStudyId());
// according to logic in SecureController.java: inherited
// role from parent study, pick the higher role
currentRole.setRole(Role.get(Role.max(r.getRole(), rInParent.getRole()).getId()));
}
// restore all subjects
for (int i = 0; i < subjects.size(); i++) {
StudySubjectBean subject = (StudySubjectBean) subjects.get(i);
if (subject.getStatus().equals(Status.AUTO_DELETED)) {
subject.setStatus(Status.AVAILABLE);
subject.setUpdater(ub);
subject.setUpdatedDate(new Date());
ssdao.update(subject);
}
}
// restore all study_group
StudyGroupDAO sgdao = new StudyGroupDAO(sm.getDataSource());
StudyGroupClassDAO sgcdao = new StudyGroupClassDAO(sm.getDataSource());
SubjectGroupMapDAO sgmdao = new SubjectGroupMapDAO(sm.getDataSource());
ArrayList groups = sgcdao.findAllByStudy(study);
for (int i = 0; i < groups.size(); i++) {
StudyGroupClassBean group = (StudyGroupClassBean) groups.get(i);
if (group.getStatus().equals(Status.AUTO_DELETED)) {
group.setStatus(Status.AVAILABLE);
group.setUpdater(ub);
group.setUpdatedDate(new Date());
sgcdao.update(group);
// all subject_group_map
ArrayList subjectGroupMaps = sgmdao.findAllByStudyGroupClassId(group.getId());
for (int j = 0; j < subjectGroupMaps.size(); j++) {
SubjectGroupMapBean sgMap = (SubjectGroupMapBean) subjectGroupMaps.get(j);
if (sgMap.getStatus().equals(Status.AUTO_DELETED)) {
sgMap.setStatus(Status.AVAILABLE);
sgMap.setUpdater(ub);
sgMap.setUpdatedDate(new Date());
sgmdao.update(sgMap);
}
}
}
}
// restore all event definitions and event
EventDefinitionCRFDAO edcdao = new EventDefinitionCRFDAO(sm.getDataSource());
StudyEventDAO sedao = new StudyEventDAO(sm.getDataSource());
for (int i = 0; i < definitions.size(); i++) {
StudyEventDefinitionBean definition = (StudyEventDefinitionBean) definitions.get(i);
if (definition.getStatus().equals(Status.AUTO_DELETED)) {
definition.setStatus(Status.AVAILABLE);
definition.setUpdater(ub);
definition.setUpdatedDate(new Date());
sefdao.update(definition);
ArrayList edcs = (ArrayList) edcdao.findAllByDefinition(definition.getId());
for (int j = 0; j < edcs.size(); j++) {
EventDefinitionCRFBean edc = (EventDefinitionCRFBean) edcs.get(j);
if (edc.getStatus().equals(Status.AUTO_DELETED)) {
edc.setStatus(Status.AVAILABLE);
edc.setUpdater(ub);
edc.setUpdatedDate(new Date());
edcdao.update(edc);
}
}
ArrayList events = (ArrayList) sedao.findAllByDefinition(definition.getId());
EventCRFDAO ecdao = new EventCRFDAO(sm.getDataSource());
for (int j = 0; j < events.size(); j++) {
StudyEventBean event = (StudyEventBean) events.get(j);
if (event.getStatus().equals(Status.AUTO_DELETED)) {
event.setStatus(Status.AVAILABLE);
event.setUpdater(ub);
event.setUpdatedDate(new Date());
sedao.update(event);
ArrayList eventCRFs = ecdao.findAllByStudyEvent(event);
ItemDataDAO iddao = new ItemDataDAO(sm.getDataSource());
for (int k = 0; k < eventCRFs.size(); k++) {
EventCRFBean eventCRF = (EventCRFBean) eventCRFs.get(k);
if (eventCRF.getStatus().equals(Status.AUTO_DELETED)) {
eventCRF.setStatus(eventCRF.getOldStatus());
eventCRF.setUpdater(ub);
eventCRF.setUpdatedDate(new Date());
ecdao.update(eventCRF);
ArrayList itemDatas = iddao.findAllByEventCRFId(eventCRF.getId());
for (int a = 0; a < itemDatas.size(); a++) {
ItemDataBean item = (ItemDataBean) itemDatas.get(a);
if (item.getStatus().equals(Status.AUTO_DELETED)) {
item.setStatus(item.getOldStatus());
item.setUpdater(ub);
item.setUpdatedDate(new Date());
iddao.update(item);
}
}
}
}
}
}
}
}
// for definitions
DatasetDAO datadao = new DatasetDAO(sm.getDataSource());
ArrayList dataset = datadao.findAllByStudyId(study.getId());
for (int i = 0; i < dataset.size(); i++) {
DatasetBean data = (DatasetBean) dataset.get(i);
if (data.getStatus().equals(Status.AUTO_DELETED)) {
data.setStatus(Status.AVAILABLE);
data.setUpdater(ub);
data.setUpdatedDate(new Date());
datadao.update(data);
}
}
addPageMessage(respage.getString("this_study_has_been_restored_succesfully"));
forwardPage(Page.STUDY_LIST_SERVLET);
}
}
}
Aggregations