UserObject user = (UserObject)session.getAttribute("userobject"); //get the user object
int individualId = user.getIndividualID();
String rowId[] = request.getParameterValues("rowId");
CvAttic remote = null;
try {
remote = (CvAttic)CVUtility.setupEJB("CvAttic", "com.centraview.cvattic.CvAtticHome", dataSource);
} catch (Exception e) {
logger.error("[execute] Exception thrown: ", e);
throw new ServletException(e);
}
for (int i = 0; i < rowId.length; i++) {
if (rowId[i] != null && ! rowId[i].equals("")) {
int elementId = Integer.parseInt(rowId[i]);
try {
logger.debug("Moving attic record with recordId = [" + elementId + "] back to Garbage...");
remote.delete(individualId, elementId, Constants.CV_ATTIC);
logger.debug("...attic record moved.");
} catch (Exception e) {
logger.error("Exception thrown: ", e);
}
}