public class RtpValue extends java.lang.Object implements EssbaseCompatible
Not all methods are available for all types of Rtps. For example, requesting members on a DateAsNumber type of Rtp will throw an UnsupportedRTPValuePropertyException exception.
All Rtps referenced in the EPM Groovy script should be declared in the first line as show in the example call below.
Example call from Groovy that adds an employee on the fly and generates a calc script to assign the email and phone number of the new employee:
/*RTPS: {EmployeeParent} {EmployeeName} {EmployeePhone} {EmployeeEmail} {Scenario} {Year} {Period} {Entity} {Version}*/ Map<String, Object> newEmployee = rtps.EmployeeParent.member.newChildAsMap(rtps.EmployeeName) // Save the new employee as a dynamic child member always Dimension employeeDim = rtps.EmployeeParent.member.dimension Member employee = employeeDim.saveMember(newEmployee, DynamicChildStrategy.ALWAYS_DYNAMIC) // Generate the calc script to save employee email and phone property values """SET CREATENONMISSINGBLK ON; FIX(${fixValues(rtps.Scenario, rtps.Year, rtps.Period, rtps.Entity, rtps.Version, employee)}, "Local", "HSP_InputValue") "Employee Phone" = $rtps.EmployeePhone; "Employee Email" = $rtps.EmployeeEmail; ENDFIX;"""
Constructor and Description |
---|
RtpValue(java.lang.String name,
int type,
java.lang.String dimensionName,
java.lang.String enteredValue,
java.lang.String essbaseValue,
java.lang.String enumName,
java.lang.String cubeName,
java.lang.String appName)
Constructs an instance of this class with specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBooleanValue()
Returns the boolean value represented by this rtp.
|
java.util.Date |
getDate()
Returns a Date representation for this rtp.
|
Dimension |
getDimension()
Returns a Dimension representation for this rtp.
|
double |
getDoubleValue()
Returns the double value represented by this rtp.
|
java.lang.String |
getEnteredValue()
Returns the value entered by the end user for this rtp.
|
java.lang.String |
getEssbaseValue()
Returns the value for this rtp to be used in an Essbase calc script.
|
java.lang.String |
getFixValue()
Returns a value that can be used in a FIX statement.
|
Member |
getMember()
Returns a Member representation for this rtp.
|
java.util.List<Member> |
getMembers()
Returns a Member list representation for this rtp.
|
java.lang.String |
getName()
Returns the name of this rtp.
|
SmartList.Entry |
getSmartListEntry()
Returns a Smartlist.Entry representation for this rtp or null if the rtp
value is optional or #missing.
|
java.lang.String |
toString()
Returns the string representation for the rtp.
|
public RtpValue(java.lang.String name, int type, java.lang.String dimensionName, java.lang.String enteredValue, java.lang.String essbaseValue, java.lang.String enumName, java.lang.String cubeName, java.lang.String appName)
name
- the name of the rtptype
- the type for the rtpdimensionName
- the name of the dimensionenteredValue
- value as entered by the end useressbaseValue
- the value for this rtp to be used in a Essbase calc
scriptenumName
- the name of the smart listcubeName
- the name of the cube the rule is being launched againstappName
- the name of the application the rule is being launched
againstpublic boolean getBooleanValue()
public java.util.Date getDate()
InvalidRtpValueException
- if the rtp value does not evaluate to
a valid datepublic Dimension getDimension()
InvalidRtpValueException
- if the rtp value does not evaluate to
a valid dimensionpublic double getDoubleValue()
If the value cannot be converted to a double, then Double.NaN is returned.
public java.lang.String getEnteredValue()
public java.lang.String getEssbaseValue()
public java.lang.String getFixValue()
getFixValue
in interface EssbaseCompatible
public Member getMember() throws java.lang.Exception
InvalidRtpValueException
- if the rtp value does not evaluate to
a single memberjava.lang.Exception
- if an unexpected fault occurspublic java.util.List<Member> getMembers() throws java.lang.Exception
java.lang.Exception
- if an unexpected fault occurspublic java.lang.String getName()
public SmartList.Entry getSmartListEntry()
InvalidRtpValueException
- if the rtp value does not evaluate to
a valid smartlist entry or #missing (null).public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2017, 2024, Oracle and/or its affiliates. All rights reserved.