String jobName = jex.getJobDetail().getName();
String completeLabel = "scheduler_" + jobName + "_" + docName;
String label = "sched_" + String.valueOf(Math.abs(completeLabel.hashCode()));
BIObject newbiobj = new BIObject();
newbiobj.setDescription(docDesc);
newbiobj.setCreationUser("scheduler");
newbiobj.setLabel(label);
newbiobj.setName(docName);
newbiobj.setEncrypt(new Integer(0));
newbiobj.setEngine(engine);
newbiobj.setDataSourceId(biobj.getDataSourceId());
newbiobj.setRelName("");
newbiobj.setBiObjectTypeCode(officeDocDom.getValueCd());
newbiobj.setBiObjectTypeID(officeDocDom.getValueId());
newbiobj.setStateCode(relDom.getValueCd());
newbiobj.setStateID(relDom.getValueId());
newbiobj.setVisible(new Integer(1));
newbiobj.setFunctionalities(storeInFunctionalities);
IBIObjectDAO objectDAO = DAOFactory.getBIObjectDAO();
Timestamp aoModRecDate;
BIObject biobjexist = objectDAO.loadBIObjectByLabel(label);
if(biobjexist==null){
objectDAO.insertBIObject(newbiobj, objTemp);
} else {
newbiobj.setId(biobjexist.getId());
objectDAO.modifyBIObject(newbiobj, objTemp);
}
} catch (Throwable t) {
logger.error("Error while saving schedule result as new document", t );
}finally{