Skip navigation links

Oracle® OLAP Java API Reference
11g Release 2 (11.2)

E10794-06


oracle.olapi.metadata.mdm
Class MdmBaseMeasure

java.lang.Object
  extended by oracle.olapi.metadata.BaseMetadataObject
      extended by oracle.olapi.metadata.mdm.MdmObject
          extended by oracle.olapi.metadata.mdm.MdmSource
              extended by oracle.olapi.metadata.mdm.MdmDimensionedObject
                  extended by oracle.olapi.metadata.mdm.MdmMeasure
                      extended by oracle.olapi.metadata.mdm.MdmBaseMeasure

All Implemented Interfaces:
MdmMember, MdmViewColumnOwner, MetadataObject

public class MdmBaseMeasure
extends MdmMeasure

An MdmMeasure that is mapped to a persistent physical storage structure. An MdmBaseMeasure can have a ConsistentSolveSpecification that specifies how Oracle OLAP generates solved data for the measure.

With the findOrCreateBaseMeasure method of an MdmCube, you can get an existing MdmBaseMeasure or create a new one. Committing the Transaction in which you create a base measure makes the MdmBaseMeasure a persistent object. It adds the MdmBaseMeasure to the data dictionary, which makes it available to other applications.

When you create an MdmBaseMeasure, you can specify a SQL data type for it with the setSQLDataType method. If you do not specify a SQL data type but you do associate a MeasureMap with the measure, Oracle OLAP automatically sets the SQL data type of the measure to be the data type of the Expression in the MeasureMap. If the MdmBaseMeasure has no MeasureMap and has no specified SQL data type, Oracle OLAP assigns it the default SQL data type of NUMBER.

For an existing MdmBaseMeasure, the AllowAutoDataTypeChange property of the measure determines how the SQL data type can change. If the AllowAutoDataTypeChange property is false, which is the default setting, you can only change the SQL data type of the measure by using the setSQLDataType method; adding or removing MeasureMap objects, or changing the Expression of a MeasureMap, does not change the SQL data type of the MdmBaseMeasure.

However, if the AllowAutoDataTypeChange property is true, then the setSQLDataType method does not change the SQL data type of the MdmBaseMeasure. Instead, Oracle OLAP automatically sets the SQL data type of the MdmBaseMeasure to the data type that is common to all of the Expression objects in the MeasureMap objects that are associated with the MdmBaseMeasure. Therefore, if the AllowAutoDataTypeChange property is true, then adding or removing a MeasureMap in a CubeMap, or changing the Expression of a MeasureMap, may change the SQL data type of the MdmBaseMeasure. You can set the value of the AllowAutoDataTypeChange property with the setAllowAutoDataTypeChange method.

You can get the SQL data type with the getSQLDataType method. For the data type returned in the various conditions, see Possible Data Types Returned by getSQLDataType table.


Method Summary
 java.lang.Object acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context)
          Calls the visitMdmBaseMeasure method of the MdmObjectVisitor and passes that method this MdmBaseMeasure and an Object.
 boolean allowAutoDataTypeChange()
          Indicates whether Oracle OLAP is allowed to automatically change the data type of the measure.
 ConsistentSolveSpecification getConsistentSolveSpecification()
          Gets the ConsistentSolveSpecification specified for this MdmBaseMeasure.
 SQLDataType getSQLDataType()
          Gets the SQL data type for the MdmBaseMeasure.
 void setAllowAutoDataTypeChange(boolean allowAutoDataTypeChange)
          Specifies whether to allow Oracle OLAP to automatically change the data type of the measure.
 void setConsistentSolveSpecification(ConsistentSolveSpecification input)
          Specifies a ConsistentSolveSpecification for this MdmBaseMeasure.
 void setSQLDataType(SQLDataType type)
          Specifies a SQL data type for the MdmBaseMeasure.

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmMeasure
addDimensionality, getCube, getDimensionality, getETMeasureColumn, getLevel, getLevelDepth, getLocalValue, getMeasureDimension, getOwnerDimension, getParentLevel, getParentLocalValue, getParentValue, getPrecedence, getType, getUnits, getValue, getValueFormat, removeDimensionality, setCube, setUnits, setValueFormat

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmDimensionedObject
addDimension, getDimensions, isBooleanValued, setBooleanValued

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmSource
getDataType, getSource

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmObject
addDescription, addObjectClassification, findOrCreateDescription, getDescription, getDescription, getDescription, getDescriptions, getMetadataProvider, getName, getNewName, getObjectClassifications, getShortDescription, isClassifiedAs, removeDescription, removeObjectClassification, setDescription, setDescription, setDescription, setName, setShortDescription

 

Methods inherited from class oracle.olapi.metadata.BaseMetadataObject
getContainedByObject, 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.metadata.mdm.MdmMember
getDataType, getDescription, getShortDescription, getSource

 

Method Detail

acceptVisitor

public java.lang.Object acceptVisitor(MdmObjectVisitor visitor,
                                      java.lang.Object context)
Calls the visitMdmBaseMeasure method of the MdmObjectVisitor and passes that method this MdmBaseMeasure and an Object.
Specified by:
acceptVisitor in class MdmObject
Parameters:
visitor - An MdmObjectVisitor that is an instance of Mdm11_ObjectVisitor.
context - An Object.
Returns:
The Object returned by the visitMdmBaseMeasure method.

getConsistentSolveSpecification

public final ConsistentSolveSpecification getConsistentSolveSpecification()
Gets the ConsistentSolveSpecification specified for this MdmBaseMeasure.
Returns:
The ConsistentSolveSpecification for this MdmBaseMeasure.

setConsistentSolveSpecification

public final void setConsistentSolveSpecification(ConsistentSolveSpecification input)
Specifies a ConsistentSolveSpecification for this MdmBaseMeasure.
Parameters:
input - The ConsistentSolveSpecification to associate with this MdmBaseMeasure.

getSQLDataType

public final SQLDataType getSQLDataType()
Gets the SQL data type for the MdmBaseMeasure. Oracle OLAP determines the data type in one of the following ways. For the data type returned in the various conditions, see Possible Data Types Returned by getSQLDataType.
Returns:
A SQLDataType that represents the SQL data type.
See Also:
allowAutoDataTypeChange(), setAllowAutoDataTypeChange(boolean allowAutoDataTypeChange)

setSQLDataType

public final void setSQLDataType(SQLDataType type)
Specifies a SQL data type for the MdmBaseMeasure. If the MdmBaseMeasure does not have a specified SQL data type and the measure has one or more associated MeasureMap objects with valid expressions, then Oracle OLAP uses the common data type of the values specified by the mappings. If you do not specify a SQL data type and the measure does not have an associated MeasureMap, then Oracle OLAP uses the default SQL data type of NUMBER.

If the AutoDataTypeChange property of the MdmBaseMeasure is set to true, then Oracle OLAP ignores the data type specified by this method and automatically sets the SQL data type.

Parameters:
type - The SQLDataType to use as the data type for the MdmBaseMeasure.
See Also:
allowAutoDataTypeChange(), setAllowAutoDataTypeChange(boolean allowAutoDataTypeChange)

allowAutoDataTypeChange

public final boolean allowAutoDataTypeChange()
Indicates whether Oracle OLAP is allowed to automatically change the data type of the measure.
Returns:
A boolean that is true if Oracle OLAP can automatically change the data type of the measure or false otherwise.

setAllowAutoDataTypeChange

public final void setAllowAutoDataTypeChange(boolean allowAutoDataTypeChange)
Specifies whether to allow Oracle OLAP to automatically change the data type of the measure. If you specify true to allow the automatic changing of data types, then Oracle OLAP evaluates the expressions of the MeasureMap of each CubeMap object of the MdmCube that contains the measure. Based on the data types of those expressions, Oracle OLAP determines the appropriate data type for the measure. If the measure mappings have different data types, then Oracle OLAP automatically assigns a data type that is a common supertype of all of the mapped expressions.
Parameters:
allowAutoDataTypeChange - Specify true if you want to allow Oracle OLAP to automatically change the data type of the measure or false otherwise.

Skip navigation links

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