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