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 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);
   }
 }
Esempio n. 4
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. 5
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. 6
0
 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);
   }
 }
Esempio n. 7
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);
 }