<implementsEntity>
The <implementsEntity> subelement specifies that an entity implements the
specified delegate. Guidewire calls an entity an implementor of a
delegate if the entity specifies the delegate in an
<implementsEntity> subelement.
If a delegate definition includes the optional requires attribute, then the implementor must provide an adapter attribute on its <implementsEntity> subelement. The adapter attribute specifies the name of a Java or Gosu type that implements the interface that the delegate definition specifies in its own requires attribute.
For example, the PolicyCenter base configuration defines a Cost delegate as follows:
<?xml version="1.0"?>
<delegate ... name="Cost" requires="gw.api.domain.financials.CostAdapter">
...
</delegate>
The base configuration defines a BACost entity that includes an <implementsEntity> subelement, which
specifies delegate with name="Cost". Therefore, the BACost entity is an implementor of the Cost delegate.
<?xml version="1.0"?>
<entity ... entity="BACost" ... >
...
<implementsEntity name="Cost" adapter="gw.lob.ba.financials.BACostAdapter" />
...
</entity>
The Cost delegate requires an implementation of the CostAdapter
interface. So in its adapter attribute, the
BACost entity specifies a BACostAdapter
class, which implements the CostAdapter interface that the
Cost adapter specifies in its requires
attribute. The following diagram illustrates the relationship between the
Cost delegate and the BACostAdapter
adapter class:
Follow these rules for defining entities that implement delegates:
- If you specify a value for the
requiresattribute in a delegate, then implementers of the delegate must specify anadapterattribute in their definitions. Theadapterattribute must specify the name of a Java or Gosu type that implements the interface specified by therequiresattribute in delegate definition. - If you do not specify a value for the
requiresattribute in a delegate, then implementers of the delegate must not specify anadapterattribute their definitions.
The Extractable Delegate
Entities that are part of the archive domain graph must implement the Extractable delegate. For example, if you
create a custom subtype of Contact, then the custom subtype must implement the Extractable delegate.
If you add an edge foreign key to an entity that is part of the archive domain graph, set the
extractable attribute on the edge foreign key to
true. The value true causes PolicyCenter to add the Extractable
delegate to the associative table generated for the edge foreign key.
Attributes of <implementsEntity>
The <implementsEntity> element contains the following attributes.
|
Description |
|---|---|
|
Required. The name of the delegate that this entity must implement. |
Subelements of <implementsEntity>
There are no subelements on the <implementsEntity> subelement.
