The EUID Generator controls how the enterprise-wide unique identifiers (EUIDs) are created by the master index application, including the length of the ID and the checksum value. The EUID generator can only be configured by modifying master.xml directly.
You can customize the EUID Generator by performing any of the following actions:
The default EUID generator creates sequential EUIDs based on the value specified for the EUID sequence in the sbyn_seq_table database table. If you create a new EUID generator class to process EUIDs differently, you must specify the name of the new class in the euid-generator-class element of master.xml.
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click master.xml.
Scroll to the EuidGeneratorConfig element.
Change the value of the euid-generator-class element to the path and name of the new EUID generator class.
For example:
<euid-generator-class>com.sun.mdm.index.idgen.impl.MyEuidGenerator </euid-generator-class> |
Save and close the file.
By default, the length of the EUIDs generated by the master index application is 10 characters. You can modify this value if needed. You can also specify a new starting EUID number. This is described in Creating the Master Index Database in Developing Sun Master Indexes .
If you increase the length of the EUIDs to longer than 20 characters or if the EUID length plus the checksum length is longer than 20 characters, you need to increase the length of the EUID columns in the script that creates the database tables.
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click master.xml.
Scroll to the first parameter element, IdLength, in the EuidGeneratorConfig element.
Change the value of the parameter-value element to the desired length of the EUID.
For example:
<parameter> <parameter-name>IdLength</parameter-name> <parameter-type>java.lang.Integer</parameter-type> <parameter-value>12</parameter-value> </parameter> |
Save and close the file.
A checksum value is a number appended to the end of each EUID that allows systems to validate EUIDs to ensure accurate identification of records throughout the network. For detailed information about checksum values and how they work, see Manager Service Components in Understanding Sun Master Index Configuration Options .
If you specify 0 (zero), checksum values are not used for validation. If the EUID length plus the checksum length is greater than 20, you need to increase the length of the EUID columns in the database creation scripts.
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click master.xml.
Scroll to the second parameter element, ChecksumLength, in the EuidGeneratorConfig element.
Change the value of the parameter-value element to the desired length of the checksum value.
For example:
<parameter> <parameter-name>ChecksumLength</parameter-name> <parameter-type>java.lang.Integer</parameter-type> <parameter-value>2</parameter-value> </parameter> |
Save and close the file.
You can specify a number of EUIDs to be allocated at one time to the EUID generator. This allows the generator to assign EUIDs to multiple records without needing to query the sbyn_seq_table database table each time, which improves performance. For detailed information about the chunk size and how EUIDs are allocated, see Manager Service Components in Understanding Sun Master Index Configuration Options .
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click master.xml.
Scroll to the third parameter element, ChunkSize, in the EuidGeneratorConfig element.
Change the value of the parameter-value element to the desired chunk size.
For example:
<parameter> <parameter-name>EuidGeneratorConfig</parameter-name> <parameter-type>java.lang.Integer</parameter-type> <parameter-value>100</parameter-value> </parameter> |
Save and close the file.
You cannot add or delete parameters for the default EUID Generator class, but if you create a custom EUID generator class, you can create additional parameters for the new class and delete the existing parameters if they are not used.
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click master.xml.
Scroll to the EuidGeneratorConfig element.
Create a new parameter element inside the parameters element, but outside any existing parameter elements. Add the following elements:
parameter-name – The name of the parameter.
parameter-type – The type of parameter. Valid values are java.lang.Long, java.lang.Short, java.lang.Byte, java.lang.String, java.lang.Integer, java.lang.Boolean, java.lang.Double, or java.lang.Float.
parameter-value – The value of the parameter.
For example:
<parameters> <parameter> <parameter-name>IdLength</parameter-name> <parameter-type>java.lang.Integer</parameter-type> <parameter-value>10</parameter-value> </parameter> <parameter> <parameter-name>IncrementBy</parameter-name> <parameter-type>java.lang.Integer</parameter-type> <parameter-value>5</parameter-value> </parameter> </parameters> |
Save and close the file.
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click master.xml.
Scroll to the EuidGeneratorConfig element.
To delete one parameter, do the following:
Scroll to the parameter element you want to delete.
Remove all text between and including the parameter element.
For example, to remove the StartNumber parameter in the sample below, delete all boldface text.
<parameters> <parameter> <parameter-name>IdLength</parameter-name> <parameter-type>java.lang.Integer</parameter-type> <parameter-value>10</parameter-value> </parameter> <parameter> <parameter-name>StartNumber</parameter-name> <parameter-type>java.lang.Integer</parameter-type> <parameter-value>1000000001</parameter-value> </parameter> </parameters> |
To remove all parameters, remove all text between and including the parameters element.
Save and close the file.