示例#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();
   }
 }
示例#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);
   }
 }
示例#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);
   }
 }
示例#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);
   }
 }
示例#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);
   }
 }
示例#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);
   }
 }
示例#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);
 }