MetaLabelInfo Class - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
Product Category
Teradata Tools and Utilities

MetaLabelInfo Class

This class manages labels in the repository by using the usual Read, Write and Delete routines. It also provides for the labeling of objects across entire metamodels, or just a class in a metamodel or a specific list of objects.

 

Property

Type

Description

Common Properties

 

See “Common Properties” on page 349

CreatorName

BSTR

The creator name for the label. If not supplied, the owner name is used.

Read

Purpose:

Gets the label object identified, from the repository. The usual object identifiers must be set to identify the label object.

Syntax

HRESULT Read();

Write

Purpose:

This routine Writes the in-memory label object (contained in this object) to the repository. If the LOID = 0, a new label object is created, otherwise, the existing one (identified by the MetaLabelInfo's identifier information) is located and updated.

Syntax

HRESULT Write();

Delete

Purpose:

This routine removes this label object from the repository.

Syntax

HRESULT Delete();

CreatorName

Purpose:

Sets or gets the CreatorName property for the object. If this property value is not provided by the caller when the label is created, the name of the creating user is used.

Syntax:

HRESULT get_CreatorName(
[out, retval] BSTR* CreatorName);
HRESULT put_CreatorName(
[in] BSTR CreatorName);

ApplyToModel

Purpose:

Applies this label to all the objects in all the classes of the metamodel identified by the ModelID.

Description:

The label is applied to only the currently published version of each object. Unlike the next two calls (ApplyToClass and ApplyToObjects), the bPropagate parameter does not exist; it is always assumed to be “true”, that is, the label will be applied to all objects in all classes of the metamodel and all the destination targets of all those objects.

Requirements:

The label object must have its LOID or GOID or Name set.

Syntax:

HRESULT ApplyToModel(
[in] long ModelID);

ApplyToClass

Purpose:

This routine applies this label to all objects in the specified class.

Description:

If bPropagate is VARIANT_TRUE (true), the label will also be applied recursively to all destination objects reachable from the class's objects, else only the specific objects in the class will receive the label. The label is only applied to the currently published version for each object in a class.

Requirements:

The label object must have its LOID or GOID or Name set.

Syntax:

HRESULT ApplyToClass(
[in] long ClassID, 
[in] VARIANT_BOOL bPropagate);

ApplyToObjects

Purpose:

This routine applies this label to all objects in the objectList.

Description:

The keys in the objectList parameter need only have their ObjectID property set; all other key properties are ignored. If bPropagate is VARIANT_TRUE (true), the label will also be applied recursively to all destination objects in the objectList, reachable from the objects, else only the specific objects themselves will receive the label.

If bMoveLabel is VARIANT_TRUE (true), then any of the objects that have the label already applied to an "inactive" version, will have the label removed from that version and applied to the "current" version of the object.

If bMoveLabel is VARIANT_FALSE (the default), and an object in the list has the label already applied to an "inactive" version, the engine will return an error. When there are no errors, the label is applied to the currently published version of each object.

Requirements:

The label object must have its LOID or GOID or Name set.

Syntax:

HRESULT ApplyToObjects(
[in] IMetaInfoKeyList* objectList, 
[in] VARIANT_BOOL bPropagate)
[in] VARIANT_BOOL bMoveLabel);

RemoveFromObjects

Purpose:

This routine removes the label from the objects in the objectList parameter.

Description:

If the bPropagate parameter is VARIANT_TRUE, the label will also be removed from all objects reachable from the objects in the objectList.

To delete the label from the repository, and by default remove it from all the repository objects to which it is applied, use the Delete routine for this interface.

Requirements:

The label object must have its LOID or GOID or Name set.

Syntax:

HRESULT RemoveFromObjects(
[in] IMetaInfoKeyList* objectList, 
[in] VARIANT_BOOL bPropagate);

GetObjectKeys

Purpose:

This routine returns an IMetaVersionedInfoClassKey (in the "keyList" IMetaVersionedInfoClassKeyList parameter) for each object version in the repository, in a metamodel, or in a class that has the current label attached to it.

Description:

If all of the four parameters ModelGUID, ModelID, ClassGUID, and ClassID are null or not specified, then all object versions in the repository with the current label are returned. If one of ModelGUID or ModelID is not null, then all object versions in the metamodel with the current label are returned. If both ModelGUID and ModelID are null and one of ClassGUID or ClassID is not null, then all object versions in the class with the current label are returned.

Requirements:

The label object must have its LOID or GOID or Name set.

Syntax:

HRESULT GetObjectKeys(
[in, optional] long ModelID,
[in, optional] BSTR ModelGUID,
[in, optional] long ClassID,
[in, optional] BSTR ClassGUID,
[out, retval] IMetaVersionedInfoClassKeyList** objList);