/*
 * CrosstabGroup.java
 *
 * Created on 5 gennaio 2006, 15.52
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package it.businesslogic.ireport.crosstab;

/**
 *
 * @author Administrator
 */
public class CrosstabGroup {
    
    
    protected CrosstabCell headerCell = null;
    protected CrosstabCell totalCell = null;
    private int size = 0;
    
    private boolean hasHeader = true;
    private boolean hasTotal = true;
    
    protected String name = "";
    protected String totalPosition = "None";
    protected String headerPosition = "";
    
    private String bucketExpression = "";
    private String bucketExpressionClass = "";
    private String bucketOrder = "Ascending";
    private String bucketComparatorExpression = "";
    
    /** Creates a new instance of CrosstabGroup */
    public CrosstabGroup() {
    }

    public CrosstabCell getHeaderCell() {
        return headerCell;
    }

    public void setHeaderCell(CrosstabCell headerCell) {
        this.headerCell = headerCell;
    }

    public CrosstabCell getTotalCell() {
        return totalCell;
    }

    public void setTotalCell(CrosstabCell totalCell) {
        this.totalCell = totalCell;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTotalPosition() {
        return totalPosition;
    }

    public void setTotalPosition(String totalPosition) {
        this.totalPosition = totalPosition;
    }

    public String getHeaderPosition() {
        return headerPosition;
    }

    public void setHeaderPosition(String headerPosition) {
        this.headerPosition = headerPosition;
    }

    public String getBucketExpression() {
        return bucketExpression;
    }

    public void setBucketExpression(String bucketExpression) {
        this.bucketExpression = bucketExpression;
    }

    public String getBucketOrder() {
        return bucketOrder;
    }

    public void setBucketOrder(String bucketOrder) {
        this.bucketOrder = bucketOrder;
    }

    public String getBucketComparatorExpression() {
        return bucketComparatorExpression;
    }

    public void setBucketComparatorExpression(String bucketComparatorExpression) {
        this.bucketComparatorExpression = bucketComparatorExpression;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public boolean isHasHeader() {
        return true;
    }

    public void setHasHeader(boolean hasHeader) {
        this.hasHeader = hasHeader;
    }

    public String getBucketExpressionClass() {
        return bucketExpressionClass;
    }

    public void setBucketExpressionClass(String bucketExpressionClass) {
        this.bucketExpressionClass = bucketExpressionClass;
    }

    public boolean isHasTotal() {
        return !getTotalPosition().equals("None");
    }

    public void setHasTotal(boolean hasTotal) {
        this.hasTotal = hasTotal;
    }
    
    public String toString()
    {
        return "" + name;
    }
    
    
}
