InstrumentHome bc = (InstrumentHome) xdCtx.getBusinessClass("Instrument");
SObjRef objRef = new SObjRef();
objRef.setObjId(getInstrumentId());
objRef.setObjClass(SObjRef.class.getName());
SInstrument instrument = bc.query(xdCtx, objRef);
SJobDetails jobDetails=new SJobDetails();
jobDetails.setObjId(getId());
jobDetails.setObjClass(SJobDetails.class.getName());
jobDetails.setActualBeginDateTime(SQLtoXS(getActualBeginDateTime()));
jobDetails.setDec(getDec());
jobDetails.setDescr(getDescription());
jobDetails.setImageUrl(getImageUrl());
jobDetails.setInstrumentId(getInstrumentId());
jobDetails.setObservatoryComment(getObservatoryComment());
jobDetails.setRa(getRa());
jobDetails.setScheduledBeginDateTime(SQLtoXS(getScheduledBeginDateTime()));
jobDetails.setStatus(getStatus());
jobDetails.setUserComment(getUserComment());
jobDetails.setUserId(getOwnerId());
jobDetails.setInstrument(instrument);
return jobDetails;
}