hibDataSource = (SbiDataSource) criteria.uniqueResult();
((SbiQueryDataSet)hibDataSetHistory).setDataSource(hibDataSource);
}
}
}else if(dataSetActiveDetail instanceof QbeDataSetDetail){
hibDataSetHistory = new SbiQbeDataSet();
SbiQbeDataSet hibQbeDataSet = (SbiQbeDataSet) hibDataSetHistory;
QbeDataSetDetail qbeDataSet = (QbeDataSetDetail) dataSetActiveDetail;
hibQbeDataSet.setSqlQuery(qbeDataSet.getSqlQuery());
hibQbeDataSet.setJsonQuery(qbeDataSet.getJsonQuery());
hibQbeDataSet.setDatamarts(qbeDataSet.getDatamarts());
String dataSourceLabel = qbeDataSet.getDataSourceLabel();
Criterion labelCriterrion = Expression.eq("label", dataSourceLabel);
Criteria criteria = session.createCriteria(SbiDataSource.class);
criteria.add(labelCriterrion);
SbiDataSource hibDataSource = (SbiDataSource) criteria.uniqueResult();
hibQbeDataSet.setDataSource(hibDataSource);
}
else if(dataSetActiveDetail instanceof WSDataSetDetail){
hibDataSetHistory=new SbiWSDataSet();
if(((WSDataSetDetail)dataSetActiveDetail).getAddress()!=null){
((SbiWSDataSet)hibDataSetHistory).setAdress(((WSDataSetDetail)dataSetActiveDetail).getAddress());