public void clearFilter(String queryName, String axisName) { IQuery query = getIQuery(queryName); if (Axis.Standard.valueOf(axisName) != null) { QueryAxis qAxis = query.getAxis(Axis.Standard.valueOf(axisName)); qAxis.clearFilter(); } }
public void filterAxis(String queryName, String axisName, String filterCondition) { IQuery query = getIQuery(queryName); if (Axis.Standard.valueOf(axisName) != null) { QueryAxis qAxis = query.getAxis(Axis.Standard.valueOf(axisName)); qAxis.filter(filterCondition); } }
public void sortAxis(String queryName, String axisName, String sortLiteral, String sortOrder) { IQuery query = getIQuery(queryName); if (Axis.Standard.valueOf(axisName) != null) { QueryAxis qAxis = query.getAxis(Axis.Standard.valueOf(axisName)); SortOrder so = SortOrder.valueOf(sortOrder); qAxis.sort(so, sortLiteral); } }
public void limitAxis( String queryName, String axisName, String limitFunction, String n, String sortLiteral) { IQuery query = getIQuery(queryName); if (Axis.Standard.valueOf(axisName) != null) { QueryAxis qAxis = query.getAxis(Axis.Standard.valueOf(axisName)); LimitFunction lf = LimitFunction.valueOf(limitFunction); BigDecimal bn = new BigDecimal(n); qAxis.limit(lf, bn, sortLiteral); } }
public void moveDimension(QueryDimension dimension, Axis axis, int position) { dimension.setHierarchizeMode(HierarchizeMode.PRE); if (dimension.getName() != "Measures") { dimension.setHierarchyConsistent(true); } QueryAxis oldQueryAxis = findAxis(dimension); QueryAxis newQueryAxis = query.getAxis(axis); if (oldQueryAxis != null && newQueryAxis != null) { oldQueryAxis.removeDimension(dimension); newQueryAxis.addDimension(position, dimension); } }
public void resetAxisSelections(QueryAxis axis) { for (QueryDimension dim : axis.getDimensions()) { dim.clearInclusions(); dim.clearExclusions(); dim.clearSort(); } }
public List<SaikuDimensionSelection> getAxisSelection(String queryName, String axis) { IQuery query = getIQuery(queryName); List<SaikuDimensionSelection> dimsel = new ArrayList<SaikuDimensionSelection>(); try { QueryAxis qaxis = query.getAxis(axis); if (qaxis != null) { for (QueryDimension dim : qaxis.getDimensions()) { dimsel.add(ObjectUtil.convertDimensionSelection(dim)); } } } catch (SaikuOlapException e) { throw new SaikuServiceException("Cannot get dimension selections", e); } return dimsel; }
public void setNonEmpty(String queryName, String axisName, boolean bool) { IQuery query = getIQuery(queryName); QueryAxis newAxis = query.getAxis(Axis.Standard.valueOf(axisName)); newAxis.setNonEmpty(bool); }