Skip navigation links

Oracle® OLAP Java API Reference
11g Release 1 (11.1)

B28128-01


oracle.olapi.metadata.mdm
Class MdmModel

java.lang.Object
  extended by oracle.olapi.metadata.BaseMetadataObject
      extended by oracle.olapi.metadata.mdm.MdmObject
          extended by oracle.olapi.metadata.mdm.MdmModel

All Implemented Interfaces:
Model, MetadataObject
Direct Known Subclasses:
MdmDimensionCalculationModel, MdmDimensionedObjectModel

public abstract class MdmModel
extends MdmObject
implements Model

A Model that assigns a value to an MdmAttribute or an MdmMeasure for a set of MdmDimension members. The values and the MdmDimension members are specified by the Assignment or MdmAssignment objects of the MdmModel.

An Assignment is associated with a Source. An Assignment is transient and exists on the client only for the duration of the session. Oracle OLAP applies the assignment when executing a query.

An MdmAssignment is associated with an Expression. An MdmAssignment persists on the server. Oracle OLAP adds the assignment to the MdmModel and writes it to the server when the application commits the transaction.

See Also:
Assignment, MdmAssignment

Constructor Summary
MdmModel(MdmMetadataProvider metadataProvider)
          Creates an MdmModel for MDM metadata objects provided by the specified MdmMetadataProvider.

 

Method Summary
 void assign(Qualification[] qualifications, Source assigned)
          Creates an Assignment with the default precedence and adds it to the MdmModel.
 void assign(Qualification[] qualifications, Source assigned, int precedence)
          Creates an Assignment and adds it to the MdmModel.
 void assign(java.lang.String[] values, Source assigned)
          Creates an Assignment with the default precedence and adds it to the MdmModel.
 void assign(java.lang.String[] values, Source assigned, int precedence)
          Creates an Assignment with the specified precedence and adds it to the MdmModel.
 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.
 void assign(java.lang.String value, Source assigned)
          Creates an Assignment with the default precedence and adds it to the MdmModel.
 void assign(java.lang.String value, Source assigned, int precedence)
          Creates an Assignment with the specified precedence and adds it to the MdmModel.
 Source createSolvedSource()
          Creates a Source that represents the results of the evaluation of the Assignment objects of the MdmModel.
 Source createSolvedSource(Source defaultValues)
          Creates a Source that represents the results of the evaluation of the Assignment objects of the MdmModel.
 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.
 java.util.List getAssignments()
          Gets the Assignment objects of the MdmModel.
 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; the MdmModel can inherit the Assignment objects of its parents.
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.
 void unassign(Assignment assignment)
          Removes an Assignment from the MdmModel.

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmObject
acceptVisitor, findOrCreateDescription, getDescription, getDescription, getDescription, getMetadataProvider, getName, getShortDescription, setDescription, setDescription, setDescription, setName, setShortDescription

 

Methods inherited from class oracle.olapi.metadata.BaseMetadataObject
getID, getOwner

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.olapi.data.source.Model
getAutoAssignments

 

Constructor Detail

MdmModel

public MdmModel(MdmMetadataProvider metadataProvider)
Creates an MdmModel for MDM metadata objects provided by the specified MdmMetadataProvider.
Parameters:
metadataProvider - The MdmMetadataProvider to use in creating the MdmModel.

Method Detail

getMdmSource

public abstract MdmSource getMdmSource()
Gets the MdmSource for the MdmModel.
Returns:
The MdmSource for the MdmModel.

getType

public abstract Source getType()
Gets the Source that is the type of the MdmModel.
Specified by:
getType in interface Model
Returns:
The Source that is the type of the MdmModel.

getInputs

public abstract java.util.List getInputs()
Gets the Source objects that are the inputs of the MdmModel.
Specified by:
getInputs in interface Model
Returns:
A List of the Source objects that are the inputs of the MdmModel.

getOutputs

public final java.util.List getOutputs()
Returns an empty List because an MdmModel does not have outputs. A CustomModel can have outputs.
Specified by:
getOutputs in interface Model
Returns:
An empty List.

getParentModels

public abstract java.util.List getParentModels()
Gets the MdmModel objects that are the parents of the MdmModel; the MdmModel can inherit the Assignment objects of its parents.
Specified by:
getParentModels in interface Model
Returns:
A List of the MdmModel objects that are the parents of the MdmModel.

getAssignments

public java.util.List getAssignments()
Gets the Assignment objects of the MdmModel.
Specified by:
getAssignments in interface Model
Returns:
A List of the Assignment objects of the MdmModel.

assign

public void assign(Qualification[] qualifications,
                   Source assigned)
Creates an Assignment with the default precedence and adds it to the MdmModel.
Specified by:
assign in interface Model
Parameters:
qualifications - An array of Qualification objects, each of which specifies a dimension member.
assigned - A Source that defines a value to assign as the value of a measure or attribute for the specified dimension members.

assign

public void assign(Qualification[] qualifications,
                   Source assigned,
                   int precedence)
Creates an Assignment and adds it to the MdmModel.
Specified by:
assign in interface Model
Parameters:
qualifications - An array of Qualification objects, each of which specifies a dimension member.
assigned - A Source that defines a value to assign as the value of a measure or attribute for the specified dimension members.
precedence - An integer that specifies the precedence to use for the Assignment.

assign

public void assign(java.lang.String value,
                   Source assigned)
Creates an Assignment with the default precedence and adds it to the MdmModel.
Specified by:
assign in interface Model
Parameters:
value - A String that specifies a dimension member.
assigned - A Source that defines a value to assign as the value of a measure or attribute for the specified dimension member.

assign

public void assign(java.lang.String value,
                   Source assigned,
                   int precedence)
Creates an Assignment with the specified precedence and adds it to the MdmModel.
Specified by:
assign in interface Model
Parameters:
value - A String that specifies a dimension member.
assigned - A Source that defines a value to assign as the value of a measure or attribute for the specified dimension member.
precedence - An integer that specifies the precedence to use for the Assignment.

assign

public void assign(java.lang.String[] values,
                   Source assigned)
Creates an Assignment with the default precedence and adds it to the MdmModel.
Specified by:
assign in interface Model
Parameters:
values - An array of String objects that specify dimension members.
assigned - A Source that defines a value to assign as the value of a measure or attribute for the specified dimension members.

assign

public void assign(java.lang.String[] values,
                   Source assigned,
                   int precedence)
Creates an Assignment with the specified precedence and adds it to the MdmModel.
Specified by:
assign in interface Model
Parameters:
values - An array of String objects that specify dimension members.
assigned - A Source that defines a value to assign as the value of a measure or attribute for the specified dimension members.
precedence - An integer that specifies the precedence to use for the Assignment.

unassign

public void unassign(Assignment assignment)
Removes an Assignment from the MdmModel.
Specified by:
unassign in interface Model
Parameters:
assignment - The Assignment to remove.

getDefaultPrecedence

public int getDefaultPrecedence()
Gets the default precedence value for the MdmModel.
Specified by:
getDefaultPrecedence in interface Model
Returns:
An integer that represents the precedence for Assignment objects that are created by methods that do not specify a precedence value.

setDefaultPrecedence

public 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.
Specified by:
setDefaultPrecedence in interface Model
Parameters:
precedence - The integer value to set as the default precedence.

createSolvedSource

public final Source createSolvedSource()
Creates a Source that represents the results of the evaluation of the Assignment objects of the MdmModel. The elements of the returned Source that do not have an assigned value have a value of null.
Specified by:
createSolvedSource in interface Model
Returns:
A Source that represents the results of the evaluation of the Assignment objects of the Model and that has null for unassigned values.

createSolvedSource

public final Source createSolvedSource(Source defaultValues)
Creates a Source that represents the results of the evaluation of the Assignment objects of the MdmModel. The elements of the returned Source that do not have an assigned value have the value specified by the defaultValues Source.
Specified by:
createSolvedSource in interface Model
Parameters:
defaultValues - A Source that specifies the value that you want Oracle OLAP to assign for a member of an input when the Assignment objects of the MdmmModel do not assign a value for the input member.
Returns:
A Source that represents the results of the evaluation of the Assignment objects of the MdmModel and that has the value of defaultValues for unassigned values.

findAssignment

public final MdmAssignment findAssignment(java.lang.String lhs)
Gets the existing MdmAssignment for a dimension member.
Parameters:
lhs - A String that contains the local value of the dimension member for the assignment.
Returns:
The MdmAssignment for the specified dimension member or null if no assignment exists for the member.

findOrCreateAssignment

public final MdmAssignment findOrCreateAssignment(java.lang.String lhs)
Gets the existing MdmAssignment, or creates a new one, for a dimension member.
Parameters:
lhs - A String that contains the local value of the dimension member for the assignment.
Returns:
The specified MdmAssignment or a new MdmAssignment.

assign

public final 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.
Parameters:
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.
Returns:
An MdmAssignment that represents the assigment of a value to a measure for a dimension member.

removeMdmAssignment

public final void removeMdmAssignment(MdmAssignment assignment)
Deletes the specified MdmAssignment from the list of MdmAssignment objects that are associated with this MdmModel.
Parameters:
assignment - The MdmAssignment to remove.

getMdmAssignments

public final java.util.List getMdmAssignments()
Gets the MdmAssignment objects that are associated with this MdmModel.
Returns:
A List of the MdmAssignment objects of this MdmModel.

Skip navigation links

Copyright © 2002, 2007, Oracle. All rights reserved.