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 clearAxisSelections(String queryName, String axisName) { IQuery query = getIQuery(queryName); if (Axis.Standard.valueOf(axisName) != null) { QueryAxis qAxis = query.getAxis(Axis.Standard.valueOf(axisName)); query.resetAxisSelections(qAxis); } }
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(String queryName, String axisName, String dimensionName, int position) { try { if (log.isDebugEnabled()) { log.debug( "move query: " + queryName + " dimension " + dimensionName + " to axis " + axisName + " position" + position); } IQuery query = getIQuery(queryName); QueryDimension dimension = query.getDimension(dimensionName); Axis newAxis = axisName != null ? ("UNUSED".equals(axisName) ? null : Axis.Standard.valueOf(axisName)) : null; if (position == -1) { query.moveDimension(dimension, newAxis); } else { query.moveDimension(dimension, newAxis, position); } } catch (Exception e) { throw new SaikuServiceException( "Cannot move dimension:" + dimensionName + " to axis: " + axisName, e); } }
public void setNonEmpty(String queryName, String axisName, boolean bool) { IQuery query = getIQuery(queryName); QueryAxis newAxis = query.getAxis(Axis.Standard.valueOf(axisName)); newAxis.setNonEmpty(bool); }