|
Oracle® OLAP Java API Reference 11g Release 2 (11.2) E10794-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.olapi.metadata.BaseMetadataObject
oracle.olapi.metadata.mdm.MdmObject
oracle.olapi.metadata.mdm.MdmSource
oracle.olapi.metadata.mdm.MdmDimensionedObject
oracle.olapi.metadata.mdm.MdmAttribute
oracle.olapi.metadata.mdm.MdmSingleValuedAttribute
oracle.olapi.metadata.mdm.MdmBaseAttribute
public final class MdmBaseAttribute
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 method of an findOrCreateBaseAttributeMdmPrimaryDimension. 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()Gets 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 |
|---|
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 |
| 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 |
| Method Detail |
|---|
public java.lang.Object acceptVisitor(MdmObjectVisitor visitor,
java.lang.Object context)
visitMdmBaseAttribute method of the MdmObjectVisitor and passes that method this MdmBaseAttribute and an Object.acceptVisitor in class MdmObjectvisitor - An MdmObjectVisitor that implements the Mdm11_ObjectVisitor interface. .context - An Object.Object returned by the visitMdmBaseAttribute method.public final MdmAttributeModel getAttributeModel()
MdmAttributeModel for this MdmBaseAttribute.getAttributeModel in class MdmAttributeMdmAttributeModel for this MdmBaseAttribute.public final void setAttributeModel(MdmAttributeModel model)
MdmAttributeModel for this MdmBaseAttribute.setAttributeModel in class MdmAttributemodel - The MdmAttributeModel to associate with this MdmBaseAttribute.public final boolean isMultiLingual()
boolean that indicates whether the attribute has values for more than one language.public final void setMultiLingual(boolean isMultiLingual)
isMultiLingual - A boolean that specifies whether the attribute has values for more than one language.public final boolean isPopulateLineage()
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.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.public final void setPopulateLineage(boolean isPopulateLineage)
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:
MdmDimensionLevel.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.public final java.lang.String getAttributeGroupName()
String that identifies the attribute group.public final void setAttributeGroupName(java.lang.String group)
group - A String that identifies the attribute group.public final SQLDataType getSQLDataType()
MdmBaseAttribute.getSQLDataType in class MdmAttributeSQLDataType that represents the SQL data type.public final void setSQLDataType(SQLDataType type)
MdmBaseAttribute.type - The SQLDataType to associate with this MdmBaseAttribute.public final MdmViewColumn getETAttributeColumn()
MdmViewColumn that represents the ET (Embedded Totals) values for this MdmBaseAttribute.MdmViewColumn that represents the ET column for this MdmBaseAttribute.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||