Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSAttributeInfo Interface Reference

Inherited by IDSSAttributeInfo2.

List of all members.


Detailed Description

The IDSSAttributeInfo interface is used to give information about an attribute defined in a table.

Most of the interface is taken up with a collection of base attribute forms. These represent the subset of base forms of the attribute that actually appear in the table. The IDSSAttributeInfo interface is implemented when it appears inside the IDSSAttributeInfos collection, which is offered by a table object.

An implementation of this interface only records (by base attribute form number) the base attribute forms that appear inside the collection. The actual definition of the forms reside in the underlying attribute if the Default property is true, or in the LocalDefn property of the attribute info if the Default is false. This is because a table should be able to signal that it contains a particular base attribute form, but define it exactly as the attribute does, or in its own fashion.


Public Member Functions

HRESULT _NewEnum ([out, retval] IUnknown pp_NewEnum)
 Enumerator for this collection.
HRESULT Add ([in] VARIANT *pIndex)
 Insert a new base attribute form into the collection.
HRESULT Attribute ([out, retval] IDSSAttribute ppAttribute)
 The attribute being defined by this object.
HRESULT Clear ()
 Empty the collection.
HRESULT Count ([out, retval] Int32 *pCount)
 The number of base attribute forms in this collection.
HRESULT Default ([in] VARIANT_BOOL Default)
 True if the default AttributeDefn should be used.
HRESULT Default ([out, retval] VARIANT_BOOL *pDefault)
 True if the default AttributeDefn should be used.
HRESULT Item ([in] VARIANT *pIndex,[out, retval] IDSSBaseAttributeForm ppBaseForm)
 (Default) Access members of the collection.
HRESULT LocalDefn ([out, retval] IDSSAttributeDefn ppAttributeDefn)
 Local attribute definition, valid if Default is false.
HRESULT PartialAttributeID ([in] VARIANT_BOOL PartialAttributeID)
 Whether this table only contains some of the ID base forms for the attribute PartialAttributeID is a boolean property.
HRESULT PartialAttributeID ([out, retval] VARIANT_BOOL *PartialAttributeID)
 Whether this table only contains some of the ID base forms for the attribute PartialAttributeID is a boolean property.
HRESULT PartialType ([in] EnumDSSPartialType PartialType)
 Behavior when joining lookup and fact table (using this table).
HRESULT PartialType ([out, retval] EnumDSSPartialType *pPartialType)
 Behavior when joining lookup and fact table (using this table).
HRESULT Remove ([in] VARIANT *pMember)
 Delete a member from the collection.


Member Function Documentation

HRESULT IDSSAttributeInfo::_NewEnum [out, retval] IUnknown   pp_NewEnum  ) 
 

Enumerator for this collection.

This is the standard property used to return the objects in a collection. It actually returns an enumerator object. Calling methods on the enumerator object retrieves the contents of the collection.

After the enumerator object has been obtained it is possible for both members of the collection to change. The effect of this change on the members of the collection that are returned by the enumeration object is implementation dependent.
Note that the user doesn't retrieve the contents of the collection until he or she calls the Next method on the enumerator object. This property does not presuppose that all of the objects are retrieved simultaneously.
Parameters:
pp_NewEnum An IUnknown pointer to the enumerator object. The object is actually returned using the standard IEnumVARIANT interface.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::Add [in] VARIANT *  pIndex  ) 
 

Insert a new base attribute form into the collection.

Insert a new base attribute form into the collection.

We only store the base form ID in this collection. We do not return a base form because it would be unclear to the user whether this base form was from the default definition stored by the attribute or the local definition stored by a table.
Parameters:
pIndex Number = the base form ID of the base form to be added to the collection. String = the name of the base form to be added to the collection. Pointer = the base form to be added.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::Attribute [out, retval] IDSSAttribute   ppAttribute  ) 
 

The attribute being defined by this object.

An attribute info object contains information about a particular attribute. This property returns the attribute in question.

It is not possible to change the attribute that appears on a particular attribute info object. This attribute was declared when the attribute info object was created inside its IDSSAttributeInfos collection object.
Parameters:
ppAttribute The attribute being described by this attribute info.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::Clear  ) 
 

Empty the collection.

Removes and deletes all objects from this collection.

Emptying this collection has no effect on the base forms defined for the attribute. The table that contains this AttributeInfo cannot be used to obtain values for any of the base forms.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::Count [out, retval] Int32 *  pCount  ) 
 

The number of base attribute forms in this collection.

Returns the number of objects in this collection.

Parameters:
pCount The number of objects in this collection.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::Default [in] VARIANT_BOOL  Default  ) 
 

True if the default AttributeDefn should be used.

This property records whether or not the table that contains this AttributeInfo contains a custom definition for one or more of the base forms that it supports.

Another way to view this parameter is by controlling whether or not the LocalDefn property is NULL. Setting it to True is equivalent to deleting the IDSSAttributeDefn object. Setting it to False is equivalent to making an IDSSAttributeDefn object.
Parameters:
Default New value for the Default property.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::Default [out, retval] VARIANT_BOOL *  pDefault  ) 
 

True if the default AttributeDefn should be used.

This property records whether or not the table that contains this AttributeInfo contains a custom definition for one or more of the base forms that it supports.

Another way to view this parameter is by controlling whether or not the LocalDefn property is NULL. Setting it to True is equivalent to deleting the IDSSAttributeDefn object. Setting it to False is equivalent to making an IDSSAttributeDefn object.
Parameters:
pDefault True = this table uses the default definition for all base forms that appear on this table. False = this table represents one or more forms of the attribute in a non-standard manner.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::Item [in] VARIANT *  pIndex,
[out, retval] IDSSBaseAttributeForm   ppBaseForm
 

(Default) Access members of the collection.

This is the default method of the interface.

Return a base form from the collection. The required form may be specified in several ways. The base form is returned, by returning a member of the Attribute.Definition.BaseForms collection, or a member of the LocalDefn.BaseForms collection.
It is important to note that the base form ID indexes this collection, not the index number into the collection. So a statement like "For I = 1 To X.Count; Item(I) ..." does not behave as expected. If you wish to loop through all the members of this collection use the _NewEnum (i.e. "For Each Y In X") property.
Parameters:
pIndex Number = base form ID of desired base form. String = name of desired base form.
ppBaseForm Base attribute form.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::LocalDefn [out, retval] IDSSAttributeDefn   ppAttributeDefn  ) 
 

Local attribute definition, valid if Default is false.

It is possible that the table that contains this IDSSAttributeInfo object uses a non-standard definition for one or more of the base forms that appear on this table. If this is the case, then this property returns an IDSSAttributeDefn object to contain the local definitions.

If the Default property is set to True, then this property always returns NULL. To obtain an AttributeDefn object from the AttributeInfo object, the client must first set Default to False, and then read the value of this property.
Parameters:
ppAttributeDefn The local definition of this attribute for the table that contains this IDSSAttributeInfo. NULL = use the default definition of the attribute.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::PartialAttributeID [in] VARIANT_BOOL  PartialAttributeID  ) 
 

Whether this table only contains some of the ID base forms for the attribute PartialAttributeID is a boolean property.

It is used to specify whether this table only contains some of the ID base forms for the attribute.

The setting is important because we need to generate different SQL (i.e. use outer joins) if we expect that a list may be incomplete. The setting is defined in the attribute, but can be overridden in many contexts in which the attribute is used. In this case we can set a specific value for the attribute on this table.
The default value of this property is false, which means that this table contains all the ID base forms for the attribute.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::PartialAttributeID [out, retval] VARIANT_BOOL *  PartialAttributeID  ) 
 

Whether this table only contains some of the ID base forms for the attribute PartialAttributeID is a boolean property.

It is used to specify whether this table only contains some of the ID base forms for the attribute.

The setting is important because we need to generate different SQL (i.e. use outer joins) if we expect that a list may be incomplete. The setting is defined in the attribute, but can be overridden in many contexts in which the attribute is used. In this case we can set a specific value for the attribute on this table.
The default value of this property is false, which means that this table contains all the ID base forms for the attribute.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSAttributeInfo::PartialType [in] EnumDSSPartialType  PartialType  ) 
 

Behavior when joining lookup and fact table (using this table).

PartialType is an enumeration property. It is used to specify the expected complete element list versus incomplete element list relationship between a lookup table for this attribute (which usually shows all the elements) and a fact table containing the attribute (which might be complete or incomplete).

The setting is important because we need to generate different SQL (i.e. use outer joins) if we expect that a list may be incomplete. The setting is defined in the attribute, but can be overridden in many contexts in which the attribute is used. In this case we can set a specific value for the attribute on this table.
The default value of this property is DssPartialTypeDefault, which means that we use whatever value appears in the attribute.
The values for the EnumDSSPartialType enumeration are drawn from the following list:
Constant Value Comment
DssPartialTypeReserved 0 Not used.
DssPartialTypeFF 1 Both lists are complete.
DssPartialTypeFP 2 The list in the lookup table is complete, but the fact table is incomplete.
DssPartialTypePF 3 The list in the fact table is complete, but the lookup table is incomplete.
DssPartialTypePP 4 Both lists are incomplete.
DssPartialTypeDefault 5 Ignore this property. This setting is used in situations in which the property is optional.
Note 'F' = full and 'P' = partial.
Returns:
Usual COM result code:
  • S_OK
  • DSSCOM_E_RESERVED_VALUE User attempted to set property to its reserved value.
  • E_INVALIDARG User attempted to set property to a value that is not in the enumeration.

HRESULT IDSSAttributeInfo::PartialType [out, retval] EnumDSSPartialType pPartialType  ) 
 

Behavior when joining lookup and fact table (using this table).

PartialType is an enumeration property. It is used to specify the expected complete element list versus incomplete element list relationship between a lookup table for this attribute (which usually shows all the elements) and a fact table containing the attribute (which might be complete or incomplete).

The setting is important because we need to generate different SQL (i.e. use outer joins) if we expect that a list may be incomplete. The setting is defined in the attribute, but can be overridden in many contexts in which the attribute is used. In this case we can set a specific value for the attribute on this table.
The default value of this property is DssPartialTypeDefault, which means that we use whatever value appears in the attribute.
The values for the EnumDSSPartialType enumeration are drawn from the following list:
Constant Value Comment
DssPartialTypeReserved 0 Not used.
DssPartialTypeFF 1 Both lists are complete.
DssPartialTypeFP 2 The list in the lookup table is complete, but the fact table is incomplete.
DssPartialTypePF 3 The list in the fact table is complete, but the lookup table is incomplete.
DssPartialTypePP 4 Both lists are incomplete.
DssPartialTypeDefault 5 Ignore this property. This setting is used in situations in which the property is optional.
Note 'F' = full and 'P' = partial.
Returns:
Usual COM result code:
  • S_OK
  • DSSCOM_E_RESERVED_VALUE User attempted to set property to its reserved value.
  • E_INVALIDARG User attempted to set property to a value that is not in the enumeration.

HRESULT IDSSAttributeInfo::Remove [in] VARIANT *  pMember  ) 
 

Delete a member from the collection.

Remove an object from the collection. The object to be removed can be referred to in several different ways depending on the type used in the VARIANT argument.

Removing a base form from this collection has no effect on the base forms defined for the attribute. It just means that the table that contains this AttributeInfo cannot be used to obtain values for this base form.
Parameters:
pMember Number = the base form ID (not the index number) of the base form to be removed. String = name of the base form to be removed. pointer = pointer to the base form to be removed.
Returns:
Usual COM result code:
  • S_OK


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.