Skip navigation links

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

B28128-03


oracle.olapi.metadata.mdm
Class MdmBaseAttribute

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.MdmAttribute
                      extended by oracle.olapi.metadata.mdm.MdmSingleValuedAttribute
                          extended by oracle.olapi.metadata.mdm.MdmBaseAttribute

All Implemented Interfaces:
MdmViewColumnOwner, MetadataObject

public final class MdmBaseAttribute
extends MdmSingleValuedAttribute
implements MdmViewColumnOwner

An MdmSingleValuedAttribute that is mapped to a column of a relational table in the database. You can find an existing MdmBaseAttribute or create a new one by using the findOrCreateBaseAttribute method of an MdmPrimaryDimension. You can get a List of the MdmBaseAttribute objects for an MdmDimension by using the getAttributes method.

The following example creates an MdmBaseAttribute for a dimension. It associates the attribute with one MdmDimensionLevel of the dimension. It commits the transaction and builds the dimension. It then gets the attributes of the dimension.

 // mdmProdDim is an MdmPrimaryDimension that has an MdmDimensionLevel named
 // ITEM.
 MdmDimensionLevel mdmItemLevel = mdmProdDim.findOrCreateDimensionLevel("ITEM");
 MemberListMap mdmItemLevelMemListMap = mdmItemLevel.findOrCreateMemberListMap();
 MdmBaseAttribute mdmPkgAttr = mdmProdDim.findOrCreateBaseAttribute("PACKAGE");
 mdmPkgAttr.setSQLDataType(new SQLDataType("VARCHAR2"));
 // Map the attribute to a column in a relational table.
 AttributeMap pkgAttrMap = 
               mdmItemLevelMemListMap.findOrCreateAttributeMap(mdmPkgAttr);
 ColumnExpression attrColExp = (ColumnExpression)
                    SyntaxObject.fromSyntax("GLOBAL.PRODUCT_DIM.ITEM_PACKAGE",
                                             metadataProvider);
 pkgAttrMap.setExpression(attrColExp);

 try 
 {
   // dp is the DataProvider for the session.
   (dp.getTransactionProvider()).commitCurrentTransaction();
 } 
 catch (Exception ex) 
 {
   println("Could not commit the Transaction. " + ex);
 }
 BuildItem bldProdDim = new BuildItem(mdmProdDim);
 ArrayList<BuildItem> items = new ArrayList();
 items.add(bldProdDim);
 BuildProcess bldProc = new BuildProcess(items);
 try 
 {
   dp.executeBuild(bldProc, 0);
 }
 catch (Exception ex)
 {
    println("Could not execute the BuildProcess.");
 }

 List<MdmAttribute> attrList =  mdmProdDim.getAttributes();

Method Summary
 java.lang.Object acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context)
          Calls the visitMdmBaseAttribute method of the MdmObjectVisitor and passes that method this MdmBaseAttribute and an Object.
 java.lang.String getAttributeGroupName()
          Gets the name of the group to which this attribute belongs.
 MdmAttributeModel getAttributeModel()
          Gets the MdmAttributeModel for this MdmBaseAttribute.
 MdmViewColumn getETAttributeColumn()
          Get the MdmViewColumn that represents the ET (Embedded Totals) values for this MdmBaseAttribute.
 SQLDataType getSQLDataType()
          Gets the SQL data type for the MdmBaseAttribute.
 boolean isMultiLingual()
          Indicates whether the attribute has values for more than one language.
 boolean isPopulateLineage()
          Indicates whether an analytic workspace associates the values of the MdmBaseAttribute only with the dimension members at the level to which the attribute is mapped or to the members of the mapped level and to the dimension members of all levels that are descendants of the mapped level.
 void setAttributeGroupName(java.lang.String group)
          Specifies the name of the group to which this attribute belongs.
 void setAttributeModel(MdmAttributeModel model)
          Specifies an MdmAttributeModel for this MdmBaseAttribute.
 void setMultiLingual(boolean isMultiLingual)
          Specifies whether the attribute has values for more than one language.
 void setPopulateLineage(boolean isPopulateLineage)
          Specifies whether an analytic workspace associates the values of the MdmBaseAttribute only with the dimension members at the level to which the attribute is mapped or to the members of the mapped level and to the dimension members of all levels that are descendants of the mapped level.
 void setSQLDataType(SQLDataType type)
          Specifies a SQL data type for the MdmBaseAttribute.

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmAttribute
getAttributeMap, getDescriptionType, getDimensionality, getModel, getPrimaryDimension, getTargetDimension, getType, isVisibleForAll, setDescriptionType, setIsVisibleForAll, setModel, setPrimaryDimension, setTargetDimension

 

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

 

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

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmObject
addDescription, addObjectClassification, findOrCreateDescription, getDescription, getDescription, getDescription, getDescriptions, getMetadataProvider, getName, getObjectClassifications, getShortDescription, isClassifiedAs, removeDescription, removeObjectClassification, 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

 

Method Detail

acceptVisitor

public java.lang.Object acceptVisitor(MdmObjectVisitor visitor,
                                      java.lang.Object context)
Calls the visitMdmBaseAttribute method of the MdmObjectVisitor and passes that method this MdmBaseAttribute and an Object.
Overrides:
acceptVisitor in class MdmAttribute
Parameters:
visitor - An MdmObjectVisitor that implements the Mdm11_ObjectVisitor interface. .
context - An Object.
Returns:
The Object returned by the visitMdmBaseAttribute method.

getAttributeModel

public final MdmAttributeModel getAttributeModel()
Gets the MdmAttributeModel for this MdmBaseAttribute.
Overrides:
getAttributeModel in class MdmAttribute
Returns:
The MdmAttributeModel for this MdmBaseAttribute.

setAttributeModel

public final void setAttributeModel(MdmAttributeModel model)
Specifies an MdmAttributeModel for this MdmBaseAttribute.
Overrides:
setAttributeModel in class MdmAttribute
Parameters:
model - The MdmAttributeModel to associate with this MdmBaseAttribute.

isMultiLingual

public final boolean isMultiLingual()
Indicates whether the attribute has values for more than one language.
Returns:
A boolean that indicates whether the attribute has values for more than one language.

setMultiLingual

public final void setMultiLingual(boolean isMultiLingual)
Specifies whether the attribute has values for more than one language.
Parameters:
isMultiLingual - A boolean that specifies whether the attribute has values for more than one language.

isPopulateLineage

public final boolean isPopulateLineage()
Indicates whether an analytic workspace associates the values of the MdmBaseAttribute only with the dimension members at the level to which the attribute is mapped or to the members of the mapped level and to the dimension members of all levels that are descendants of the mapped level.
Returns:
A boolean that is true if attribute values for the mapped level also apply to all descendant levels, or false if the attribute values apply only to the mapped level.

setPopulateLineage

public final void setPopulateLineage(boolean isPopulateLineage)
Specifies whether an analytic workspace associates the values of the MdmBaseAttribute only with the dimension members at the level to which the attribute is mapped or to the members of the mapped level and to the dimension members of all levels that are descendants of the mapped level. You should only specify true for the isPopulateLineage parameter for an MdmBaseAttribute that has the following characteristics:
Parameters:
isPopulateLineage - A boolean that is true to apply the attribute values to the dimension members at the mapped level and to the members at all descendant levels, or false to apply the attribute values only to the dimension members at the mapped level.

getAttributeGroupName

public final java.lang.String getAttributeGroupName()
Gets the name of the group to which this attribute belongs. This value can be used to group different attributes together in a user interface.
Returns:
A String that identifies the attribute group.

setAttributeGroupName

public final void setAttributeGroupName(java.lang.String group)
Specifies the name of the group to which this attribute belongs. You can use this value to group different attributes together in a user interface.
Parameters:
group - A String that identifies the attribute group.

getSQLDataType

public final SQLDataType getSQLDataType()
Gets the SQL data type for the MdmBaseAttribute.
Specified by:
getSQLDataType in class MdmAttribute
Returns:
A SQLDataType that represents the SQL data type.

setSQLDataType

public final void setSQLDataType(SQLDataType type)
Specifies a SQL data type for the MdmBaseAttribute.
Parameters:
type - The SQLDataType to associate with this MdmBaseAttribute.

getETAttributeColumn

public final MdmViewColumn getETAttributeColumn()
Get the MdmViewColumn that represents the ET (Embedded Totals) values for this MdmBaseAttribute.
Returns:
The MdmViewColumn that represents the ET column for this MdmBaseAttribute.

Skip navigation links

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