org.olap4j
Enum AllocationPolicy

java.lang.Object
  extended by java.lang.Enum<AllocationPolicy>
      extended by org.olap4j.AllocationPolicy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AllocationPolicy>

public enum AllocationPolicy
extends java.lang.Enum<AllocationPolicy>

Enumeration of the policies that can be used to modify the values of child cells when their parent cell is modified in a writeback operation.

Since:
Aug 22, 2006
Version:
$Id: Cell.java 229 2009-05-08 19:11:29Z jhyde $
Author:
jhyde
See Also:
Cell.setValue(java.lang.Object, org.olap4j.AllocationPolicy, java.lang.Object...)

Enum Constant Summary
EQUAL_ALLOCATION
          Every atomic cell that contributes to the updated cell will be assigned an equal value that is: <atomic cell value> = <value> / Count(atomic cells contained in <tuple>)
EQUAL_INCREMENT
          Every atomic cell that contributes to the updated cell will be changed according to: <atomic cell value> = <atomic cell value> + (<value> - <existing value>) / Count(atomic cells contained in <tuple>)
WEIGHTED_ALLOCATION
          Every atomic cell that contributes to the updated cell will be assigned an equal value that is: <atomic cell value> = <value> * <weight value expression>
WEIGHTED_INCREMENT
          Every atomic cell that contributes to the updated cell will be changed according to: <atomic cell value> = <atomic cell value> + (<value> - <existing value>) * <weight value expression>
 
Method Summary
static AllocationPolicy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static AllocationPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EQUAL_ALLOCATION

public static final AllocationPolicy EQUAL_ALLOCATION
Every atomic cell that contributes to the updated cell will be assigned an equal value that is:
<atomic cell value> = <value> / Count(atomic cells contained in <tuple>)


EQUAL_INCREMENT

public static final AllocationPolicy EQUAL_INCREMENT
Every atomic cell that contributes to the updated cell will be changed according to:
<atomic cell value> = <atomic cell value> + (<value> - <existing value>) / Count(atomic cells contained in <tuple>)


WEIGHTED_ALLOCATION

public static final AllocationPolicy WEIGHTED_ALLOCATION
Every atomic cell that contributes to the updated cell will be assigned an equal value that is:
<atomic cell value> = <value> * <weight value expression>

Takes an optional argument, weight_value_expression. If weight_value_expression is not provided, the following expression is assigned to it by default:

<weight value expression> = <atomic cell value> / <existing value>

The value of weight value expression should be expressed as a value between 0 and 1. This value specifies the ratio of the allocated value you want to assign to the atomic cells that are affected by the allocation. It is the client application programmer's responsibilffity to create expressions whose rollup aggregate values will equal the allocated value of the expression.


WEIGHTED_INCREMENT

public static final AllocationPolicy WEIGHTED_INCREMENT
Every atomic cell that contributes to the updated cell will be changed according to:
<atomic cell value> = <atomic cell value> + (<value> - <existing value>) * <weight value expression>

Takes an optional argument, weight_value_expression. If weight_value_expression is not provided, the following expression is assigned to it by default:

<weight value expression> = <atomic cell value> / <existing value>

The value of weight value expression should be expressed as a value between 0 and 1. This value specifies the ratio of the allocated value you want to assign to the atomic cells that are affected by the allocation. It is the client application programmer's responsibility to create expressions whose rollup aggregate values will equal the allocated value of the expression.

Method Detail

values

public static AllocationPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AllocationPolicy c : AllocationPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AllocationPolicy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

SourceForge.net_Logo