Skip navigation links


com.essbase.api.datasource
Interface IEssPerformCustomCalc


public interface IEssPerformCustomCalc

Interface to perform Custom Calculation. To performs the custom calculation in Essbase use API performCustomCalc(boolean, List). Before calling this API, all the parameters must be set using the appropriate set* methods in this class.

Since:
11.1.2

Method Summary
 java.lang.String getCreditMember()
           
 java.lang.String getDebitMember()
           
 long getGroupID()
           
 java.lang.String getOffset()
           
 java.lang.String getPOV()
           
 long getRuleID()
           
 java.lang.String getScript()
           
 java.lang.String getSourceRegion()
           
 java.lang.String getTarget()
           
 boolean performCustomCalc(boolean verifyOnly, java.util.List outErrorsAndWarnings)
          Performs the custom calculation on an Essbase ASO(Aggregate Storage outline) cube.
 void setCreditMember(java.lang.String creditMember)
          Sets the creditMember - An MDX member expression that specifies the “credit” member used for negative and offsetting result values.
 void setDebitMember(java.lang.String debitMember)
          Sets the debitMember - An MDX member expression that specifies the “debit” member used for positive result values.
 void setGroupID(long groupID)
          Sets the groupID - The groupID refers to the Rule Set that this calculation is a part of.
 void setOffset(java.lang.String offset)
          Sets the offset - An MDX tuple expression that specifies where offsetting entries should be made.
 void setPOV(java.lang.String pov)
          Sets the POV - MDX set expression specifying area where the formulae will be executed
 void setRuleID(long ruleID)
          The rule ID used to identify the information (rule name, rule description) related to this allocation rule.
 void setScript(java.lang.String script)
          Sets the scripts - The contents of the custom calc script that will be executed or verified.
 void setSourceRegion(java.lang.String sourceRegion)
          Sets the sourceRegion - An MDX set expression that gives the region of the cube referred to by the formulas in the script.
 void setTarget(java.lang.String target)
          Sets the target - MDX tuple expression specifying target location for writing results of each custom calculation.

 

Method Detail

getPOV

java.lang.String getPOV()
Returns:
the POV

setPOV

void setPOV(java.lang.String pov)
Sets the POV - MDX set expression specifying area where the formulae will be executed
Parameters:
pov - the pov to set

getScript

java.lang.String getScript()
Returns:
the script

setScript

void setScript(java.lang.String script)
Sets the scripts - The contents of the custom calc script that will be executed or verified. The script should not be an empty string. An empty string will be considered invalid.
Parameters:
script - the script to set

getTarget

java.lang.String getTarget()
Returns:
the target

setTarget

void setTarget(java.lang.String target)
Sets the target - MDX tuple expression specifying target location for writing results of each custom calculation. This argument is combined with pov and LHS of each custom calculation to determine location where results are written. If there is an overlap of dimensions between this argument and LHS or pov, the order for resolving the target location is LHS first, target next and then pov.
Parameters:
target - the target to set

getDebitMember

java.lang.String getDebitMember()
Returns:
the debitMember

setDebitMember

void setDebitMember(java.lang.String debitMember)
Sets the debitMember - An MDX member expression that specifies the “debit” member used for positive result values. If this argument or creditMember argument is empty, debit/credit processing is not performed.
Parameters:
debitMember - the debitMember to set

getCreditMember

java.lang.String getCreditMember()
Returns:
the creditMember

setCreditMember

void setCreditMember(java.lang.String creditMember)
Sets the creditMember - An MDX member expression that specifies the “credit” member used for negative and offsetting result values. If this argument or debitMember argument is empty, debit/credit processing is not performed.
Parameters:
creditMember - the creditMember to set

getOffset

java.lang.String getOffset()
Returns:
the offset

setOffset

void setOffset(java.lang.String offset)
Sets the offset - An MDX tuple expression that specifies where offsetting entries should be made. If offset is empty no offset values would be written.
Parameters:
offset - the offset to set

getSourceRegion

java.lang.String getSourceRegion()
Returns:
the sourceRegion

setSourceRegion

void setSourceRegion(java.lang.String sourceRegion)
Sets the sourceRegion - An MDX set expression that gives the region of the cube referred to by the formulas in the script. The Calc Manager should generate this argument by gathering all the members on the right-hand side of all formulas in the script.
Parameters:
sourceRegion - the sourceRegion to set

getGroupID

long getGroupID()
Returns:
the groupID

setGroupID

void setGroupID(long groupID)
Sets the groupID - The groupID refers to the Rule Set that this calculation is a part of. The groupID is used to export allocated/calculated data for a batch to GL tables. Data calculated during execution will be written a load buffer corresponding to groupID, in addition to committing data to cube. If this functionality is not desired, user should pass in 0. If the value is greater than 0, this feature is turned on.

By default this feature is turned off (i.e., groupID is 0).

Parameters:
groupID - the groupID to set

getRuleID

long getRuleID()
Returns:
the ruleID

setRuleID

void setRuleID(long ruleID)
The rule ID used to identify the information (rule name, rule description) related to this allocation rule.
Parameters:
ruleID - the rule ID to set

performCustomCalc

boolean performCustomCalc(boolean verifyOnly,
                          java.util.List outErrorsAndWarnings)
                          throws com.essbase.api.base.EssException
Performs the custom calculation on an Essbase ASO(Aggregate Storage outline) cube. Before calling this API, set the necessary values, using the set methods available in this class. Note, this operation is not applicable/supported on a Block storage database.

This calculation operation could result in any of the below cases: 1) Succeeds without any warnings: In this scenario, this operation will return true and outErrorsAndWarnings will not have any messages added to your outErrorsAndWarnings object.

2) Executes, but has warning(s): In this scenario, this operation will return false, indicating the operation was executed, but has warning(s) which will be returned to you, by appending to your outErrorsAndWarnings object. Each warning message element within your outErrorsAndWarnings list is of type, EssPerformAllocationError

3) Fails with Errors (may also have warnings additionally): This will result in an EssException being thrown containing the error message from Essbase. The outErrorsAndWarnings list will be populated with the errors (and warnings if any). If there are no errors added to your outErrorsAndWarnings object, then the exception occurred may be due to other reasons like for instance, failing to connect to Essbase when trying to perform this calculation operation. In such a case, the EssException message will clearly reflect the appropriate Essbase Error code and error message.

Refer CustomCalc.java sample for an example usage.

Parameters:
verifyOnly - This is a flag to validate the custom calculation parameters without performing the calculation. If it is set to true, the allocation parameters are validated only. If it is false, the allocation is verified and executed on the associated Essbase cube.
outErrorsAndWarnings - This is output object for collecting the errors and/or warnings returned by Essbase. This object needs to be instantiated by the caller so that Essbase can populate the messages (if any). Note that, if this List object is non-empty, this operation will be appending the returned errors. So, if you are reusing your outErrorsAndWarnings object and like to have the errors/warnings corresponding to this particular call only, please make sure that you clear your list before invoking this method. The list will contain objects of type EssPerformAllocationError only.
Returns:
true - if calculation was successful; false - if calculation happened with warnings
Throws:
com.essbase.api.base.EssException - when Essbase fails to perform the calculation on the cube. Refer case (3) mentioned above for more details.
Since:
11.1.2
See Also:
EssPerformAllocationError

Skip navigation links