Examples of DJGroupVariable


Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

    }
  }

  protected Object transformEntity(Entity entity) {
    log.debug("transforming group variable...");
    DJGroupVariable columnsGroupVariable = (DJGroupVariable) entity;
    AbstractColumn col = columnsGroupVariable.getColumnToApplyOperation();
    DJCalculation op = columnsGroupVariable.getOperation();

    JRDesignExpression expression = new JRDesignExpression();

    //only variables from the last registered group are important now
    List groupsList = getDjd().getGroupsList();
    JRDesignGroup registeredGroup = (JRDesignGroup)groupsList.get(groupsList.size()-1);

    expression.setText(col.getTextForExpression());
    expression.setValueClassName(col.getValueClassNameForExpression());
    String variableName = col.getGroupVariableName(type, columnToGroupByProperty);

    JRDesignVariable variable = new JRDesignVariable();
    variable.setExpression(expression);
    variable.setCalculation(columnsGroupVariable.getOperation().getValue());
    variable.setName(variableName);

    variable.setResetType(JRDesignVariable.RESET_TYPE_GROUP);
    variable.setResetGroup(registeredGroup);
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

  private Style defaultHeaderVariableStyle;

  public DJGroup build(){
    //Apply Styles if any (for variables)
    for (Iterator iterator = group.getHeaderVariables().iterator(); iterator.hasNext();) {
      DJGroupVariable var = (DJGroupVariable) iterator.next();
      if (defaultHeaderVariableStyle != null)
        var.setStyle(defaultHeaderVariableStyle);
    }

    for (Iterator iterator = group.getFooterVariables().iterator(); iterator.hasNext();) {
      DJGroupVariable var = (DJGroupVariable) iterator.next();
      if (defaultFooterVariableStyle != null)
        var.setStyle(defaultFooterVariableStyle);
    }

    return group;
  }
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

    group.getHeaderVariables().add(variable);
    return this;
  }

  public GroupBuilder addHeaderVariable(AbstractColumn column, DJCalculation operation) {
    group.getHeaderVariables().add(new DJGroupVariable(column,operation));
    return this;
  }
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

    group.getHeaderVariables().add(new DJGroupVariable(column,operation));
    return this;
  }

  public GroupBuilder addHeaderVariable(AbstractColumn column, DJCalculation operation, Style style) {
    group.getHeaderVariables().add(new DJGroupVariable(column,operation,style));
    return this;
  }
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

    group.getFooterVariables().add(variable);
    return this;
  }

  public GroupBuilder addFooterVariable(AbstractColumn column3, DJCalculation operation) {
    group.getFooterVariables().add(new DJGroupVariable(column3,operation));
    return this;
  }
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

  public GroupBuilder addFooterVariable(AbstractColumn column3, DJCalculation operation) {
    group.getFooterVariables().add(new DJGroupVariable(column3,operation));
    return this;
  }
  public GroupBuilder addFooterVariable(AbstractColumn column3, DJCalculation operation, Style style) {
    group.getFooterVariables().add(new DJGroupVariable(column3,operation,style));
    return this;
  }
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

    this.columnToGroupByProperty = columnToGroupByProperty;
  }

  protected void registerEntity(Entity entity) {
    log.debug("registering group variable...");
    DJGroupVariable columnsGroupVariable = (DJGroupVariable) entity;
    try {
      JRDesignVariable jrVariable = (JRDesignVariable)transformEntity(entity);
      getDjd().addVariable(jrVariable);
     
      registerValueFormatter( columnsGroupVariable, jrVariable.getName() );
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

   
  }

  protected Object transformEntity(Entity entity) {
    log.debug("transforming group variable...");
    DJGroupVariable columnsGroupVariable = (DJGroupVariable) entity;
    AbstractColumn col = columnsGroupVariable.getColumnToApplyOperation();
    DJCalculation op = columnsGroupVariable.getOperation();

    JRDesignExpression expression = new JRDesignExpression();

    //only variables from the last registered group are important now
    List groupsList = getDjd().getGroupsList();
    JRDesignGroup registeredGroup = (JRDesignGroup)groupsList.get(groupsList.size()-1);

    if (col instanceof ExpressionColumn && ((ExpressionColumn)col).getExpressionForCalculation() != null){
      ExpressionColumn expcol = (ExpressionColumn)col;
      expression.setText(expcol.getTextForExpressionForCalculartion());
      expression.setValueClassName(expcol.getExpressionForCalculation().getClassName());
    } else {
      expression.setText(col.getTextForExpression());
      expression.setValueClassName(col.getValueClassNameForExpression());
    }
   
    String variableName = col.getGroupVariableName(type, columnToGroupByProperty);

    JRDesignVariable variable = new JRDesignVariable();
    variable.setExpression(expression);
    variable.setCalculation(columnsGroupVariable.getOperation().getValue());
    variable.setName(variableName);

    variable.setResetType(JRDesignVariable.RESET_TYPE_GROUP);
    variable.setResetGroup(registeredGroup);
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

  private Style defaultHeaderVariableStyle;

  public DJGroup build(){
    //Apply Styles if any (for variables)
    for (Iterator iterator = group.getHeaderVariables().iterator(); iterator.hasNext();) {
      DJGroupVariable var = (DJGroupVariable) iterator.next();
      if (defaultHeaderVariableStyle != null)
        var.setStyle(defaultHeaderVariableStyle);
    }

    for (Iterator iterator = group.getFooterVariables().iterator(); iterator.hasNext();) {
      DJGroupVariable var = (DJGroupVariable) iterator.next();
      if (defaultFooterVariableStyle != null)
        var.setStyle(defaultFooterVariableStyle);
    }

    return group;
  }
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.DJGroupVariable

    group.getHeaderVariables().add(variable);
    return this;
  }

  public GroupBuilder addHeaderVariable(AbstractColumn column, DJCalculation operation) {
    group.getHeaderVariables().add(new DJGroupVariable(column,operation));
    return this;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.