Esempio n. 1
0
 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();
   }
 }
Esempio n. 2
0
 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);
   }
 }
Esempio n. 3
0
 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);
   }
 }
Esempio n. 4
0
 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);
   }
 }
Esempio n. 5
0
 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);
   }
 }
Esempio n. 6
0
 public void resetAxisSelections(QueryAxis axis) {
   for (QueryDimension dim : axis.getDimensions()) {
     dim.clearInclusions();
     dim.clearExclusions();
     dim.clearSort();
   }
 }
Esempio n. 7
0
  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;
  }
Esempio n. 8
0
 public void setNonEmpty(String queryName, String axisName, boolean bool) {
   IQuery query = getIQuery(queryName);
   QueryAxis newAxis = query.getAxis(Axis.Standard.valueOf(axisName));
   newAxis.setNonEmpty(bool);
 }