use of com.netsteadfast.greenstep.vo.OlapMdxVO in project bamboobsc by billchen198318.
the class OlapMdxServiceImpl method findForMap.
@Override
public Map<String, String> findForMap(boolean pleaseSelect) throws ServiceException, Exception {
Map<String, String> dataMap = this.providedSelectZeroDataMap(pleaseSelect);
List<OlapMdxVO> olapMdxs = this.olapMdxDAO.findForSimple();
for (OlapMdxVO mdx : olapMdxs) {
dataMap.put(mdx.getOid(), mdx.getName());
}
return dataMap;
}
use of com.netsteadfast.greenstep.vo.OlapMdxVO in project bamboobsc by billchen198318.
the class AnalyticsMDXLogicServiceImpl method update.
@ServiceMethodAuthority(type = { ServiceMethodType.UPDATE })
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = { RuntimeException.class, IOException.class, Exception.class })
@Override
public DefaultResult<OlapMdxVO> update(OlapMdxVO olapMdx, String configOid, String catalogOid) throws ServiceException, Exception {
if (null == olapMdx || super.isNoSelectId(configOid) || super.isNoSelectId(catalogOid) || super.isBlank(olapMdx.getName()) || super.isBlank(olapMdx.getOid())) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
DefaultResult<OlapMdxVO> oldResult = this.olapMdxService.findObjectByOid(olapMdx);
if (oldResult.getValue() == null) {
throw new ServiceException(oldResult.getSystemMessage().getValue());
}
// 查資料是否存在
OlapConfVO config = this.loadOlapConfig(configOid);
// 查資料是否存在
OlapCatalogVO catalog = this.loadOlapCatalog(catalogOid);
olapMdx.setConfOid(config.getOid());
olapMdx.setCatalogOid(catalog.getOid());
if (olapMdx.getName().equals(oldResult.getValue().getName()) && !olapMdx.getOid().equals(oldResult.getValue().getOid())) {
// 存在別筆資料但UK相同 , 所以不能 UPDATE
throw new ServiceException("Please change another name!");
}
oldResult.getValue().setExpression(null);
// 先把BLOB 資料清掉
this.olapMdxService.updateObject(oldResult.getValue());
return this.olapMdxService.updateObject(olapMdx);
}
use of com.netsteadfast.greenstep.vo.OlapMdxVO in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method save.
private void save() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields("save");
OlapMdxVO olapMdx = new OlapMdxVO();
this.transformFields2ValueObject(olapMdx, new String[] { "name" });
olapMdx.setExpression(this.getFields().get("expression").getBytes());
DefaultResult<OlapMdxVO> result = this.analyticsMDXLogicService.create(olapMdx, this.getFields().get("configOid"), this.getFields().get("catalogOid"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.OlapMdxVO in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method delete.
private void delete() throws ControllerException, AuthorityException, ServiceException, Exception {
OlapMdxVO olapMdx = new OlapMdxVO();
this.transformFields2ValueObject(olapMdx, new String[] { "oid" });
DefaultResult<Boolean> result = this.analyticsMDXLogicService.delete(olapMdx);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null && result.getValue()) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.OlapMdxVO in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method update.
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields("update");
OlapMdxVO olapMdx = new OlapMdxVO();
this.transformFields2ValueObject(olapMdx, new String[] { "oid", "name" });
olapMdx.setExpression(this.getFields().get("expression").getBytes());
DefaultResult<OlapMdxVO> result = this.analyticsMDXLogicService.update(olapMdx, this.getFields().get("configOid"), this.getFields().get("catalogOid"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
Aggregations