com.businessobjects.rebean.wi
Interface BlockAxis


public interface BlockAxis

Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.

The BlockAxis interface represents a collection of expressions, in a certain part of a block. Each block has its own parts (axes), see the various BlockType sub-interfaces for a description.


Method Summary
 void addExpr(ReportExpression expr)
          Adds an expression to this axis.
 BlockBreak getBlockBreak()
          Gets an object representing any breaks on this axis.
 BlockSort getBlockSort()
          Gets an object representing any sorts on this axis.
 int getCount()
          Gets the number of expressions in this axis.
 ReportExpression getExpr(int index)
          Returns the expression at the specified position in the axis.
 BlockCalculation getHBlockCalculation()
          Gets an object representing any horizontal calculations on this axis.
 BlockCalculation getVBlockCalculation()
          Gets an object representing any vertical calculations on this axis.
 void insertExpr(ReportExpression expr, int index)
          Inserts an expression in this axis.
 void removeAll()
          Removes any expressions from this axis.
 void removeExpr(ReportExpression expr)
          Removes all occurrences of an expression from this axis.
 void removeExprAt(int index)
          Removes the expression at the given index.
 void replaceExprAt(int index, ReportExpression newExpr)
          Replaces the current expression at index by newExpr.
 

Method Detail

addExpr

void addExpr(ReportExpression expr)
             throws REException

Adds an expression to this axis. An expression can be added several times to the same axis.

Since version 6.5.0, it is possible to call this method with an aggregated formula or a variable based on one.

Parameters:
expr - the expression to add
Throws:
ReportException - when expr is of an illegal type for this axis
ReportException - when expr is a measure and this BlockAxis belongs to a section
ReportException - when this BlockAxis belongs to a section and there already is an expression in this axis
java.lang.NullPointerException - when expr is null
REException
Since:
6.1
See Also:
FormulaExpression.isAggregation()

insertExpr

void insertExpr(ReportExpression expr,
                int index)
                throws REException
Inserts an expression in this axis. An expression can be added several times to the same axis.

Since version 6.5.0, it is possible to call this method with an aggregated formula or a variable based on one.

Parameters:
expr - the expression to add
index - the index to add the expression at
Throws:
ReportException - when expr is of an illegal type for this axis
java.lang.ArrayIndexOutOfBoundsException - when index is invalid
java.lang.NullPointerException - when expr is null
REException
Since:
6.1
See Also:
FormulaExpression.isAggregation()

removeExprAt

void removeExprAt(int index)
Removes the expression at the given index.

Parameters:
index - the index from which to remove an expression
Throws:
java.lang.ArrayIndexOutOfBoundsException - when index is invalid
Since:
6.1

replaceExprAt

void replaceExprAt(int index,
                   ReportExpression newExpr)
                   throws REException

Replaces the current expression at index by newExpr.

If this is the last occurrence of the current expression, any breaks or sorts based on that expression will be removed.

If this is an axis for a table with calculations and the ObjectType of the current expression is different from the type of newExpr, all calculations for the current expression at index that would not be valid for the type of newExpr will be removed.

If this is an axis for a section and there is a section cell, that cell will be updated too.

Parameters:
index - the index of the expression to replace
newExpr - the new expression to place at index
Throws:
ReportException - when newExpr is of an illegal type for this axis
java.lang.ArrayIndexOutOfBoundsException - when index is invalid
java.lang.NullPointerException - when newExpr is null
REException
Since:
6.1

removeExpr

void removeExpr(ReportExpression expr)
Removes all occurrences of an expression from this axis. To remove only one occurrence of an expression, use BlockAxis.removeExprAt(int).

Parameters:
expr - The expression to remove. When the expression is not defined in this axis (or expr is null), nothing happens.

removeAll

void removeAll()
Removes any expressions from this axis.


getCount

int getCount()
Gets the number of expressions in this axis.

Returns:
the number of expressions in this axis

getExpr

ReportExpression getExpr(int index)
Returns the expression at the specified position in the axis.

Parameters:
index - the index of the expression to return (0 based)
Returns:
the expression at the specified index
Throws:
java.lang.ArrayIndexOutOfBoundsException - if index is out of range (index < 0 || index >= getCount())

getBlockBreak

BlockBreak getBlockBreak()
Gets an object representing any breaks on this axis.

Returns:
an object representing any breaks on this axis

getBlockSort

BlockSort getBlockSort()
Gets an object representing any sorts on this axis. Some BlockSort objects are shared between block axes, to be able to correctly set priorities between the sort elements (the first created is the most important sort).

Returns:
an object representing any sorts on this axis

getVBlockCalculation

BlockCalculation getVBlockCalculation()
Gets an object representing any vertical calculations on this axis.

Returns:
an object representing any vertical calculations on this axis

getHBlockCalculation

BlockCalculation getHBlockCalculation()
Gets an object representing any horizontal calculations on this axis.

Returns:
an object representing any horizontal calculations on this axis