Purpose:
dkAttrMapping is a virtual class to define an associative mapping between mapped or federated attributes and map-to or native attributes. It maps one or more mapped or federated attributes with one or more map-to or native attributes. It supports Mapped-to-Native attribute mapping with optional conversion methods. It can be used to define mapping with native attributes within one datastore (without the federation).
Note: Each instance of this class defines one associative attribute mapping, which could be a 1-to-1, 1-to-Native, Mapped-to-1, or Mapped-to-Native mapping.
Class summary:
class dkAttrMapping { public: virtual ~dkAttrMapping(); virtual DKString getName(); virtual void setName(const char* name); // (LHS) - the federated or mapped attributes : M-to-? mapping virtual void addMappedAttr(dkAttrDef* attr); virtual void removeMappedAttr(const char* name); virtual short numberOfMappedAttr(); virtual dkAttrDef* getMappedAttr(); virtual dkAttrDef* getMappedAttr(short index); virtual DKString getMappedAttrName(); virtual DKString getMappedAttrName(short index); virtual DKString* listMappedAttrNames(long& arraySize); // (RHS) - the native attributes : ?-to-N mapping virtual void addMapToAttr(dkAttrDef* attr); virtual void removeMapToAttr(const char* name); virtual short numberOfMapToAttr(); virtual dkAttrDef* getMapToAttr(); virtual dkAttrDef* getMapToAttr(short index); virtual DKString getMapToAttrName(); virtual DKString getMapToAttrName(short index); virtual DKString* listMapToAttrNames(long& arraySize); // conversion methods: virtual void setToNative(const char* fcn); virtual DKString getToNative(); virtual void setFromNative(const char* fcn); virtual DKString getFromNative(); virtual void setDLLName(const char* dllName); virtual DKString getDLLName(); virtual void setToDLLName(const char* dllName); virtual DKString getToDLLName(); virtual void setFromDLLName(const char* dllName); virtual DKString getFromDLLName(); // checking conversion requirements virtual short checkConversion(); protected: dkAttrMapping(); };
Members:
virtual DKString getName();
virtual void setName(const char* name);
Parameters
virtual void addMappedAttr(dkAttrDef* attr);
virtual void removeMappedAttr(const char* name);
virtual short numberOfMappedAttr();
Parameters
--
virtual dkAttrDef* getMappedAttr(); virtual dkAttrDef* getMappedAttr(short index);
virtual DKString getMappedAttrName(); virtual DKString getMappedAttrName(short index);
virtual DKString* listMappedAttrNames(long& arraySize);
Parameters
attr -- An attribute definition object.
virtual void addMapToAttr(dkAttrDef* attr);
virtual removeMapToAttr(const char* name);
virtual short numberOfMapToAttr();
Parameters
virtual dkAttrDef* getMapToAttr(); virtual dkAttrDef* getMapToAttr(short index);
virtual DKString getMapToAttrName(); virtual DKString getMapToAttrName(short index);
virtual DKString* listMapToAttrNames(long& arraySize);
Parameters
virtual void setToNative(const char* fcn);
virtual DKString getToNative();
Parameters
virtual void setFromNative(const char* fcn);
virtual DKString getFromNative();
Parameters
virtual void setDLLName(const char* dllName);
virtual DKString getDLLName();
dkAttributeMapping.NO_CONVERSION dkAttributeMapping.CONVERSION_1_1 dkAttributeMapping.CONVERSION_1_M dkAttributeMapping.CONVERSION_M_1
There is no practical use for M-to-N conversion.
virtual short checkConversion();
virtual DKString getToDLLName();
virtual DKString getFromDLLName();
virtual void setToDLLName(const char* dllName);
virtual void setFromDLLName(const char* dllName);
(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.