NameOwnerFieldId class

Guidewire provides a gw.api.name.NameOwnerFieldId class that provides type safety for Name entity fields. If you extend the Contact entity or the ABContact entity with a new name column, you must add the new column to this class as a new constant.

Constants that represent name fields

In the base configuration, NameOwnerFieldId provides the following constants that represent name fields.
Available constants for person name
PREFIX
FIRSTNAME
MIDDLENAME
PARTICLE
LASTNAME
SUFFIX
FIRSTNAMEKANJI
LASTNAMEKANJI
Available constants for non-person name
NP_NAME
NAMEKANJI

For example, you add the new Contact name column MyNameColumn to the NameOwnerFieldId class with the following code:

public static final var MYNAMECOLUMN : 
    NameOwnerFieldId = new NameOwnerFieldId("MyNameColumn")

Constants that use name field ID constants

Class NameOwnerFieldId also defines a set of constants that use the following name field ID constants:

public final static var ALL_PCF_FIELDS : Set<NameOwnerFieldId> =
  { PREFIX, FIRSTNAME, MIDDLENAME, PARTICLE, LASTNAME, SUFFIX, FIRSTNAMEKANJI, 
    LASTNAMEKANJI, NP_NAME, NAMEKANJI }.freeze()

 /** Fields used for non-Person names */
public final static var ALL_CONTACT_PCF_FIELDS : Set<NameOwnerFieldId> = 
  { NP_NAME, NAMEKANJI }.freeze()

 /** Required fields (union of fields for both Persons and non-Persons) */
public final static var REQUIRED_NAME_FIELDS : Set<NameOwnerFieldId> =
  { LASTNAME, NP_NAME }.freeze()

 /** Fields shown in display names */
public static final var DISPLAY_NAME_FIELDS : Set<NameOwnerFieldId> = {
  FIRSTNAME, PARTICLE, LASTNAME, SUFFIX }.freeze()

 /** Fields for simple name */
public final static var FIRST_LAST_FIELDS : Set<NameOwnerFieldId> =
  { FIRSTNAME, LASTNAME }.freeze()

 public final static var HIDDEN_FOR_SEARCH : Set<NameOwnerFieldId> =
  { PREFIX, MIDDLENAME, PARTICLE, SUFFIX }.freeze()

You can add a new Contact name column to one of these constants by using its constant name, such as MYNAMECOLUMN. For example:

public final static var ALL_PCF_FIELDS : Set<NameOwnerFieldId> =
  {PREFIX, 
   FIRSTNAME, 
   MIDDLENAME,
   MYNAMECOLUMN, 
   PARTICLE, 
   LASTNAME, 
   SUFFIX, 
   FIRSTNAMEKANJI, 
   LASTNAMEKANJI, 
   NP_NAME, 
   NAMEKANJI
  }.freeze()