Data entities and the application database

PolicyCenter defines each data entity as a root XML element in the file that bears its name. For example, PolicyCenter defines the Activity data entity in Activity.eti:

<entity xmlns="http://guidewire.com/datamodel"
        entity="Activity"
        ...
        type="retireable">
  ...
</entity>

Notice that for the base configuration Activity object, PolicyCenter sets the type attribute to retireable. The type attribute that determines how PolicyCenter manages the data entity in the PolicyCenter database. For example:

  • If a data entity has a type value of versionable, PolicyCenter stores instances of the entity in the database with a specific ID and version number.
  • If a data entity has a type value of retireable, PolicyCenter stores instances of the entity in the database and preserves the instances even when you retire, or hide them. When you retire specific instances, PolicyCenter does not display them in the interface. However, the database still stores them until PolicyCenter archives them or expressly deletes them with a special function.
Important: For each data entity in the PolicyCenter data model and for each entity type that you declare, PolicyCenter automatically generates a field named ID that is of data type key. An ID field is the internally managed primary key for the object. Do not attempt to create entity fields of type key. The key type is for Guidewire internal use only. Guidewire also reserves the exclusive use of the following additional data types: foreignkey, typekey, and typelistkey.

The following table lists the possible values for the entity type attribute. Use only those type attributes marked for general use to create or extend an data entity. Do not attempt to create or extend an entity with a type attribute marked for internal-use.

Type attribute

Usage

Description

editable

General use

An editable entity is a versionable entity. PolicyCenter automatically stores the version number of an editable entity. In addition to the standard versionable attributes of version and ID, an editable entity has the following additional attributes:

  • CreateUser and CreateTime
  • UpdateUser and UpdateTime

effdated

General use

An effdated entity is an editable entity. effdated entities have effective date fields, meaning start and end dates, used within Guidewire PolicyCenter. An effdated entity is a member of an effective dated graph, rooted at an effdatedbranch entity. PolicyCenter auto-splits the date fields during editing in some modes.

effdatedbranch

Internal use

An effdated branch entity is a retireable entity. effdatedbranch entities define the entity type of the root of a tree that contains effdated entities.

Guidewire recommends not to attempt to create an entity with a type attribute of effdatedbranch.

effdatedcontainer

Internal use only

An effdatedcontainer entity is a retireable entity. effdatedcontainer entities define the entity type that has branch children. Guidewire recommends not to attempt to create an entity with a type attribute of effdatedcontainer.

joinarray

Internal use only

A joinarray entity works in a similar manner as a versionable entity. Guidewire recommends not to use this entity type. Use versionable instead.

keyable

Internal use only

All entities are keyable entities, except for those entities with an explicit nonkeyable entity type. Moreover, all entity types other than the nonkeyable entity type have the keyable entity type as an ancestor.

A keyable entity has an ID. You can delete keyable entities from the database.

nonkeyable

Internal use only

Do not use.

retireable

General use

A retireable entity is an editable entity. retireable entities are the most common type of entity. Most, but not all, base entities are of this type.

After PolicyCenter adds an instance of a retireable data entity to the database, PolicyCenter never deletes the instance. Instead, PolicyCenter retires the instance. For example, if you select a retireable instance in a list view and then click Delete, PolicyCenter preserves the instance in the database. However, PolicyCenter inserts an integer in the Retired column for the row that represents the instance. Any non-zero value in the Retired column indicates that PolicyCenter considers the instance retired.

PolicyCenter automatically creates the following fields for retireable entities:

  • ID and PublicID
  • CreateUser and CreateTime
  • UpdateUser and UpdateTime
  • Retired  
  • BeanVersion  

These are the same fields as those PolicyCenter creates for editable entities, with the addition of the Retired property.

IMPORTANT Although it is extremely common for a base entity to be retireable, it is not required. You cannot assume this to be the case. Always check the Data Dictionary to determine whether an entity can be retired.
Note: The preservation of retireable entity instances terminates when an archiving process or an application-specific process deletes the entity instances.

versionable

General use

A versionable entity is a keyable entity. versionable entities have a version and an ID. Entities of this type can detect concurrent updates. It is possible to delete entities of this type from the database.