public abstract class MdmModel extends MdmObject implements Model
Model
that assigns values for MdmDimension
members. The values and the MdmDimension
members are specified by the MdmAssignment
objects of the MdmModel
. Each MdmAssignment
contains an Expression
that specifies the value to use for the dimension member that is associated with the MdmAssignment
.
When an MdmModel
is an instance of an MdmDimensionCalculationModel
for an MdmPrimaryDimension
, it persists on the server. You can use it in a ModelCommand
in a build process or in a ConsistentSolveSpecification
for an MdmCube
.
MdmAssignment
, AggregationFunctionExpression
Constructor and Description |
---|
MdmModel(MdmMetadataProvider metadataProvider)
Creates an
MdmModel for MDM metadata objects provided by the specified MdmMetadataProvider . |
Modifier and Type | Method and Description |
---|---|
MdmAssignment |
assign(java.lang.String lhs, Expression rhs)
Gets the existing
MdmAssignment , or creates a new one, for a dimension member and assigns the value of the Expression as the measure value for the member. |
MdmAssignment |
findAssignment(java.lang.String lhs)
Gets the existing
MdmAssignment for a dimension member. |
MdmAssignment |
findOrCreateAssignment(java.lang.String lhs)
Gets the existing
MdmAssignment , or creates a new one, for a dimension member. |
int |
getDefaultPrecedence()
Gets the default precedence value for the
MdmModel . |
abstract java.util.List |
getInputs()
Gets the
Source objects that are the inputs of the MdmModel . |
java.util.List |
getMdmAssignments()
Gets the
MdmAssignment objects that are associated with this MdmModel . |
abstract MdmSource |
getMdmSource()
Gets the
MdmSource for the MdmModel . |
java.util.List |
getOutputs()
Returns an empty
List because an MdmModel does not have outputs. |
abstract java.util.List |
getParentModels()
Gets the
MdmModel objects that are the parents of the MdmModel . |
abstract Source |
getType()
Gets the
Source that is the type of the MdmModel . |
void |
removeMdmAssignment(MdmAssignment assignment)
Deletes the specified
MdmAssignment from the list of MdmAssignment objects that are associated with this MdmModel . |
void |
setDefaultPrecedence(int precedence)
Specifies the default precedence, which is the precedence value for
Assignment objects that are created by methods that do not specify a value. |
acceptVisitor, addDescription, addObjectClassification, findOrCreateDescription, getDescription, getDescription, getDescription, getDescriptions, getMetadataProvider, getObjectClassifications, getShortDescription, isClassifiedAs, removeDescription, removeObjectClassification, setDescription, setDescription, setDescription, setName, setShortDescription
getContainedByObject, getID, getName, getNewName, getOwner
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assign, assign, assign, assign, assign, assign, createSolvedSource, createSolvedSource, getAssignments, unassign
public MdmModel(MdmMetadataProvider metadataProvider)
MdmModel
for MDM metadata objects provided by the specified MdmMetadataProvider
.metadataProvider
- The MdmMetadataProvider
to use in creating the MdmModel
.public abstract MdmSource getMdmSource()
MdmSource
for the MdmModel
.MdmSource
for the MdmModel
.public abstract Source getType()
Source
that is the type of the MdmModel
.public abstract java.util.List getInputs()
Source
objects that are the inputs of the MdmModel
.public final java.util.List getOutputs()
List
because an MdmModel
does not have outputs. A CustomModel
can have outputs.getOutputs
in interface Model
List
.public abstract java.util.List getParentModels()
MdmModel
objects that are the parents of the MdmModel
.getParentModels
in interface Model
List
of the MdmModel
objects that are the parents of the MdmModel
.public int getDefaultPrecedence()
MdmModel
.getDefaultPrecedence
in interface Model
Assignment
objects that are created by methods that do not specify a precedence value.public void setDefaultPrecedence(int precedence)
Assignment
objects that are created by methods that do not specify a value.setDefaultPrecedence
in interface Model
precedence
- The integer value to set as the default precedence.public final MdmAssignment findAssignment(java.lang.String lhs)
MdmAssignment
for a dimension member.lhs
- A String
that contains the local value of the dimension member for the assignment.MdmAssignment
for the specified dimension member or null
if no assignment exists for the member.public final MdmAssignment findOrCreateAssignment(java.lang.String lhs)
MdmAssignment
, or creates a new one, for a dimension member.lhs
- A String
that contains the local value of the dimension member for the assignment.MdmAssignment
or a new MdmAssignment
.public final MdmAssignment assign(java.lang.String lhs, Expression rhs)
MdmAssignment
, or creates a new one, for a dimension member and assigns the value of the Expression
as the measure value for the member.lhs
- A String
that contains the local value of the dimension member for the assignment.rhs
- An Expression
that specifies the value to assign to a measure for the member.MdmAssignment
that represents the assigment of a value to a measure for a dimension member.public final void removeMdmAssignment(MdmAssignment assignment)
MdmAssignment
from the list of MdmAssignment
objects that are associated with this MdmModel
.assignment
- The MdmAssignment
to remove.public final java.util.List getMdmAssignments()
MdmAssignment
objects that are associated with this MdmModel
.List
of the MdmAssignment
objects of this MdmModel
.