The Use Entity Name? column
The last column in the
variable table is Use Entity Name? If the
column check box is set, then it has a value of true. If the check box is not
set, then it has a value of false.
- A value of
trueis meaningful only if the value of Entity Path is an entity type. A value oftrueinstructs the Entity Name utility to calculate the Entity Name for that entity, instead of loading the entity into memory. The variable for that subentity is of typeStringand you can use the variable in the Gosu code that constructs the current Entity Name.Note: If the value of Entity Path is an entity, then you must set the value of Use Entity Type? totrue. Otherwise, a variable entry that ends in an entity value uploads that entire entity, which defeats the purpose of using Entity Names. - A value of
falseindicates that PolicyCenter does not use the Entity Path value as an entity display name. - An empty column is the
same as a value of
false. This is the default.
Set the Use Entity Name? value to
true if you want to include
the entire Entity Name for a particular subentity. For example, suppose
that you are editing the Exposure entity name and that you create a variable
called claimant with
an Entity Path of Exposure.ClaimantDenorm. Suppose
also that you set the value of Use Entity Name to true. In this case, the entity
name for the Claimant, as defined by the Contact entity name definition,
would be included in a String
variable called claimant.
PolicyCenter would then use this
value in constructing the entity name for the Exposure entity.
true
and then attempt to use a virtual field as an Entity
Path value, Studio resource verification generates an error.Evaluating null values
If the value of Use Entity
Name? is true,
then PolicyCenter always evaluates
the entity name definition, even if the foreign key is null. By convention, in this case,
the entity name definition usually returns the empty string "". In other words, the entity
name string can never be null
even if the foreign key is null.
You can use the HasContent
enhancement property on String
to test whether the display name string is empty.
Thus, as you write entity name definitions,
Guidewire recommends that you return the empty string if all the variables
in your entity name definition are null
or empty. Guidewire uses the empty string (instead of returning null) to prevent Null Pointer
Exceptions. For example, suppose that you construct an entity name such
as "X-Y-Z", in which you
add a hyphen between variables X, Y, and Z from the database. In this case,
be sure you return the empty string ""
if X, Y, and Z are all null or empty and not " - - ".
