Common code type framework

The common code type framework provides consistent and easy use of code table functions.

The InfoSphere® MDM common code type framework includes two different sets of APIs:
  • admin code type service APIs are designed to provide administrators with the ability to store code table data directly to database and to inquire code table data directly from database.
  • operational code type service APIs, provide the operational service consumers the ability to inquire code table data, which uses the data caching mechanism.
Code types are divided into three different categories based on how they are used in InfoSphere MDM:
  • Category 1 (C1): Represents the restricted design-time code types. InfoSphere MDM design and runtime are based on the existence of a pre-populated and fixed set of records on these code types. Category 1 code types are considered fixed system code types. Some examples of these code types are: CdAcessorKey, CdAccessorTp, CdAttributeTp, and CdErrTypeTp.
  • Category 2 (C2): Represents the general design-time code types. The default InfoSphere MDM setup is based on the existence of a pre-populated set of records on these code types. Category 2 code types are considered non-fixed system code types. You can add your own code types which will be used by your software components. Some examples of these code types are: CdOperatorTp, CdBusinessTxTp, and CdSuspectTp.
  • Category 3 (C3): Represents the domain operational code types. You can modify these code types at your discretion. There is no hard coded logic in InfoSphere MDM that relies on a specific record in these code types. Some examples of these code types are: CdHierarchyTp, CdHoldingTp, CdRelTp, and CdContractRelTp.
These two set of code type service APIs share some common characteristics, and they also have some differences.
Table 1. Common and differing characteristics for admin and operational code type APIs.
Characteristics that are common to both code type service APIs: Characteristics that differ for both code type service APIs:
  • Both admin and operational code type services support inquiring on all C2 and C3 code types and return corresponding code type business objects.
  • Both admin and operational code type services support web services – all admin code type transactions and operational code type transactions are web service supported.
  • Only admin code type service APIs support persistence transactions addAdminCodeType and updateAdminCodeType, which apply to C2 and C3 code types. No persistent transactions are available for operational code type service APIs.
  • Admin code type service APIs support inquiring on all C1, C2, and C3 code types. Operational code type service APIs only support inquiring C2 and C3 code types.
  • Only admin code type service APIs support point-in-time (PIT) transactions. Operational code type service APIs do not support PIT transactions.
  • Admin code type service APIs directly access code type tables and do not use the cache mechanism. Operational code type services APIs use the cache mechanism.
  • Admin code type service APIs do not support the fallback feature. Operational code type service APIs do support the fallback feature.
The following are admin code type service APIs; refer to the transaction reference documentation for details on using them:
  • addAdminCodeType
  • updateAdminCodeType
  • getAdminCodeType
  • getAllAdminCodeTypes
  • getAllAdminCodeTypesByLangId
  • getAllAdminCodeTypesByLocale
  • getCodeTypeMetadata
  • getAllCodeTypeMetadata
The following are operational code type service APIs:
  • getOperationalCodeType
  • getAllOperationalCodeTypes
  • getAllOperationalCodeTypesByLangId
  • getAllOperationalCodeTypesByLocale
  • reloadAllOperationalCodeTypes
Additionally, the framework offers the following APIs, defined in CodeTypeComponentHelper, to validate the integrity of the code, to validate the value of a referenced code type entry in the context of other entities, or both:
  • isCodeValid
  • getCodeTypeByCode
  • getCodeTypeByValue
  • isCodeValuePairValid

Migrating to the common code type framework

In order to simplify the process of migrating to the common code type framework when you are using custom implementations for your code tables, begin by implementing them based on the InfoSphere MDM common code type framework.