logger.debug("IN");
if (engine == null) {
logger.warn("Engine in input is null!!");
return null;
}
SDKEngine sdkEngine = null;
try {
sdkEngine = new SDKEngine();
sdkEngine.setId(engine.getId());
sdkEngine.setName(engine.getName());
sdkEngine.setLabel(engine.getLabel());
sdkEngine.setDescription(engine.getDescription());
Domain engineType = DAOFactory.getDomainDAO().loadDomainById(engine.getEngineTypeId());
sdkEngine.setEngineType(engineType.getValueCd());
Domain documentType = DAOFactory.getDomainDAO().loadDomainById(engine.getBiobjTypeId());
sdkEngine.setDocumentType(documentType.getValueCd());
sdkEngine.setClassName(engine.getClassName());
sdkEngine.setUrl(engine.getUrl());
sdkEngine.setDriverClassName(engine.getDriverName());
sdkEngine.setDriverName(engine.getDriverName());
sdkEngine.setUseDataSet(engine.getUseDataSet());
sdkEngine.setUseDataSource(engine.getUseDataSource());
} catch (Exception e) {
logger.error("Error while converting Engine into SDKEngine.", e);
logger.debug("Returning null.");
return null;