// UserSession userSession = getUserSession(sessionId);
View view = CubeViewController.getViewById(sessionId, viewId);
if (view == null) {
return null;
}
CubeView cv = view.getCubeView();
if (cv == null) {
try {
cv = view.createCubeView(getLoggedInUser(sessionId), sessionId);
} catch (PaloIOException e) {
e.printStackTrace();
} finally {
ConnectionPoolManager.getInstance().disconnect(view.getAccount(), sessionId, "WPaloCubeViewServiceImpl.toNative");
}
}
Axis axis = cv.getAxis(axisId);
if (axis == null) {
return null;
}
AxisHierarchy axisHierarchy = axis.getAxisHierarchy(axisHierarchyId);
if (axisHierarchy == null) {
for (Axis ax: cv.getAxes()) {
AxisHierarchy ah = ax.getAxisHierarchy(axisHierarchyId);
if (ah != null) {
return ah;
}
}