public class MdmBaseMeasure extends MdmMeasure
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
method of an findOrCreateBaseMeasure
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.
Modifier and Type | Method and Description |
---|---|
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 . |
addDimensionality, getColumnObject, getCube, getDimensionality, getETMeasureColumn, getLevel, getLevelDepth, getLocalValue, getMeasureDimension, getOwnerDimension, getParentLevel, getParentLocalValue, getParentValue, getPrecedence, getType, getUnits, getValue, getValueFormat, removeDimensionality, setCube, setUnits, setValueFormat
addDimension, getDimensions, isBooleanValued, setBooleanValued
getDataType, getSource
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
getDataType, getDescription, getShortDescription, getSource
getName
public java.lang.Object acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context)
visitMdmBaseMeasure
method of the MdmObjectVisitor
and passes that method this MdmBaseMeasure
and an Object
.acceptVisitor
in class MdmObject
visitor
- An MdmObjectVisitor
that is an instance of Mdm11_ObjectVisitor
.context
- An Object
.Object
returned by the visitMdmBaseMeasure
method.public final ConsistentSolveSpecification getConsistentSolveSpecification()
ConsistentSolveSpecification
specified for this MdmBaseMeasure
.ConsistentSolveSpecification
for this MdmBaseMeasure
.public final void setConsistentSolveSpecification(ConsistentSolveSpecification input)
ConsistentSolveSpecification
for this MdmBaseMeasure
.input
- The ConsistentSolveSpecification
to associate with this MdmBaseMeasure
.public final SQLDataType getSQLDataType()
MdmBaseMeasure
. Oracle OLAP determines the data type in one of the following ways.
MdmBaseMeasure
has the AllowAutoDataTypeChange property set to true
:
MdmBaseMeasure
has MeasureMap
objects that are associated with it, then the data type is the common data type of all of the Expression
objects of the MeasureMap
objects.MdmBaseMeasure
typically has only one MeasureMap
. However, a single MdmBaseMeasure
can have multiple MeasureMap
objects, with each MeasureMap
contained by a different CubeMap
.MdmBaseMeasure
has no associated MeasureMap
objects, then the data type is the default type, which is NUMBER.MdmBaseMeasure
has the AllowAutoDataTypeChange property set to false
, which is the default value:
setSQLDataType
method of the measure, then the data type is the one specified by that method.setSQLDataType
method of the measure and the MdmBaseMeasure
has one or more MeasureMap
objects associated with it, then the data type is the common data type of all of the Expression
objects of the MeasureMap
objects that were associated with the MdmBaseMeasure
when it was first committed. If the MdmBaseMeasure
had no associated MeasureMap
objects when it was first committed, then the data type is the default type, NUMBER.SQLDataType
that represents the SQL data type.allowAutoDataTypeChange()
, setAllowAutoDataTypeChange(boolean allowAutoDataTypeChange)
public final void setSQLDataType(SQLDataType type)
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.
type
- The SQLDataType
to use as the data type for the MdmBaseMeasure
.allowAutoDataTypeChange()
, setAllowAutoDataTypeChange(boolean allowAutoDataTypeChange)
public final boolean allowAutoDataTypeChange()
boolean
that is true
if Oracle OLAP can automatically change the data type of the measure or false
otherwise.public final void setAllowAutoDataTypeChange(boolean allowAutoDataTypeChange)
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.allowAutoDataTypeChange
- Specify true
if you want to allow Oracle OLAP to automatically change the data type of the measure or false
otherwise.