Previous Topic: Multitable Support for JDBC ConnectorsNext Topic: Managing Accounts and Groups


Compound Class for Multitable Support Example

This example shows you how to create a simple connector named My_MultiTable_Connector that combines two database tables into the user account class.

This example uses a schema named Multi_Table schema that contains an Employees table and an Address table.

The Employees table is the main table for employee records. The table uses EmployeeID as its primary key as shown in the following diagram:

multi_table_employees

The Addresses table is a separate table of addresses that uses EmployeeID as a foreign key as shown in the following diagram:

The following diagram shows the relationship between the tables:

Multi_table

Example: Create a compound class for multitable support

This example combines the Employees table and Addresses table in the Multi_Table schema. Once combined, the attributes in both tables are jointly accessible from an endpoint account in the User Console account management screens.

  1. Create a JDBC project named My_MultiTable_Connector and specify the JDBC data source that you want to use.
  2. In the mapping tree, click the User Account class node.

    The Map Class dialog appears.

  3. Select the Multi_Table schema from the Schema drop-down list, then select the Employees table from the Table drop-down list.
  4. Map the columns in the Employees table to the attributes in the Name column.
  5. Click the Custom Types node.

    The Custom Types dialog appears.

  6. Under Compound Type classes, click Add, then type the name of the new class, for example, Address, in the table.

    Connector Xpress creates a compound class called Address and adds it to the mapping tree. Connector Xpress sets the Address compound class to Unmanaged by default.

    Connector Xpress creates an account attribute named Addresses, adds it to the mapping tree, and selects the multivalued attribute check box on the Attribute details dialog. Connector Xpress also creates a direct association from the Address class to the User Account class and adds a node named with User Account to the Mapping tree. The Addresses attribute and direct association incorporates the Address compound class into the User Account class.

    Note: The Address class has the is compound value metadata flag set to true on the Map Compound Class and Attributes dialog. This flag specifies that the class is a compound class.

  7. In the Mapping tree, click the Address class node.

    The Map Compound Class and Attributes dialog appears.

  8. Select the Multi_Table schema from the Schema drop-down list, then select the Address table from the Table drop-down list.
  9. Map the columns in the Addresses table to the attributes in the Name column.

    Note: Set the numeric fields in a compound class to Sting in the metadata. Compound classes do not support the rule string template when a field is set to Numeric.

  10. Click the With User Account node under the Address node.

    The Direct Association with User Account dialog appears.

  11. In the Address Attribute field, select Employee ID.

    Connector Xpress matches this attribute with the User Account naming attribute.

    Note: The Employee ID attribute in the Address class serves as the association attribute. The attribute has an association type metadata property (Assoc Type=COMPOUND_PARENT) set that defines it as the attribute linking this compound class to its parent class. To display this property on the Attribute Detail dialog, display the extended metadata properties.

  12. Under the User Account node, click the Attributes node.

    The Attributes Summary dialog appears.

  13. Group the mapped attributes into the groups and subgroups that you want to appear as tabs and page sections in the CA IdentityMinder User Console account management screens by creating the presentation metadata in Connector Xpress.
  14. Save your project and deploy the new connector.
  15. Generate CA IdentityMinder User Console Account Screens.

Example: Results of combining the Employees and Addresses table

The following diagram shows the results of combining the Employees table and Addresses table:

Multi_table_result

Example: Generated account screens

This example shows an account management screen after you import the My_MultiTable_Connector-RoleDef.Xml file into CA IdentityMinder:

Multi table account screen