use of ubic.gemma.model.BaseValueObject in project Gemma by PavlidisLab.
the class DiffExMetaAnalyzerController method findDetailMetaAnalysisById.
public BaseValueObject findDetailMetaAnalysisById(Long id) {
BaseValueObject baseValueObject = new BaseValueObject();
try {
GeneDifferentialExpressionMetaAnalysisDetailValueObject analysisVO = this.geneDiffExMetaAnalysisHelperService.findDetailMetaAnalysisById(id);
if (analysisVO == null) {
baseValueObject.setErrorFound(true);
baseValueObject.setObjectAlreadyRemoved(true);
} else {
baseValueObject.setValueObject(analysisVO);
}
} catch (Throwable throwable) {
log.error(throwable.getMessage(), throwable);
baseValueObject = generateBaseValueObject(throwable);
}
return baseValueObject;
}
use of ubic.gemma.model.BaseValueObject in project Gemma by PavlidisLab.
the class DiffExMetaAnalyzerController method generateBaseValueObject.
private BaseValueObject generateBaseValueObject(Throwable throwable) {
final BaseValueObject baseValueObject = new BaseValueObject();
baseValueObject.setErrorFound(true);
if (throwable instanceof AccessDeniedException) {
if (this.userManager.loggedIn()) {
baseValueObject.setAccessDenied(true);
} else {
baseValueObject.setUserNotLoggedIn(true);
}
} else {
// If type of throwable is not known, log it.
log.error(throwable.getMessage(), throwable);
}
return baseValueObject;
}
use of ubic.gemma.model.BaseValueObject in project Gemma by PavlidisLab.
the class GeneDiffExMetaAnalysisServiceImpl method delete.
@Override
@Transactional
public BaseValueObject delete(Long id) {
GeneDifferentialExpressionMetaAnalysis metaAnalysis = this.load(id);
BaseValueObject baseValueObject = new BaseValueObject();
if (metaAnalysis == null) {
baseValueObject.setErrorFound(true);
baseValueObject.setObjectAlreadyRemoved(true);
} else {
this.remove(metaAnalysis);
}
return baseValueObject;
}
Aggregations